[
  {
    "path": ".devcontainer/Dockerfile",
    "content": "# Dockerfile for DevContainer\nFROM node:24.4.0-bullseye-slim\n\n# Install essential packages\nRUN apt-get update && apt-get install -y \\\n    curl \\\n    bash \\\n    git \\\n    && apt-get clean \\\n    && rm -rf /var/lib/apt/lists/*\n\n# Set up PNPM\nENV PNPM_HOME=\"/pnpm\"\nENV PATH=\"$PNPM_HOME:$PATH\"\nRUN corepack enable && corepack prepare pnpm@10.22.0 --activate\n\n# Create workspace directory\nWORKDIR /workspaces/dokploy\n\n# Set up user permissions\nUSER node"
  },
  {
    "path": ".devcontainer/devcontainer.json",
    "content": "{\n\t\"name\": \"Dokploy development container\",\n\t\"build\": {\n\t\t\"dockerfile\": \"Dockerfile\",\n\t\t\"context\": \"..\"\n\t},\n\t\"features\": {\n\t\t\"ghcr.io/devcontainers/features/docker-in-docker:2\": {\n\t\t\t\"moby\": true,\n\t\t\t\"version\": \"latest\"\n\t\t},\n\t\t\"ghcr.io/devcontainers/features/git:1\": {\n\t\t\t\"ppa\": true,\n\t\t\t\"version\": \"latest\"\n\t\t},\n\t\t\"ghcr.io/devcontainers/features/go:1\": {\n\t\t\t\"version\": \"1.20\"\n\t\t}\n\t},\n\t\"customizations\": {\n\t\t\"vscode\": {\n\t\t\t\"extensions\": [\n\t\t\t\t\"ms-vscode.vscode-typescript-next\",\n\t\t\t\t\"bradlc.vscode-tailwindcss\",\n\t\t\t\t\"ms-vscode.vscode-json\",\n\t\t\t\t\"biomejs.biome\",\n\t\t\t\t\"golang.go\",\n\t\t\t\t\"redhat.vscode-xml\",\n\t\t\t\t\"github.vscode-github-actions\",\n\t\t\t\t\"github.copilot\",\n\t\t\t\t\"github.copilot-chat\"\n\t\t\t]\n\t\t}\n\t},\n\t\"forwardPorts\": [3000, 5432, 6379],\n\t\"portsAttributes\": {\n\t\t\"3000\": {\n\t\t\t\"label\": \"Dokploy App\",\n\t\t\t\"onAutoForward\": \"notify\"\n\t\t},\n\t\t\"5432\": {\n\t\t\t\"label\": \"PostgreSQL\",\n\t\t\t\"onAutoForward\": \"silent\"\n\t\t},\n\t\t\"6379\": {\n\t\t\t\"label\": \"Redis\",\n\t\t\t\"onAutoForward\": \"silent\"\n\t\t}\n\t},\n\t\"remoteUser\": \"node\",\n\t\"workspaceFolder\": \"/workspaces/dokploy\",\n\t\"runArgs\": [\"--name\", \"dokploy-devcontainer\"]\n}\n"
  },
  {
    "path": ".dockerignore",
    "content": "node_modules\n.git\n.gitignore\n*.md\ndist"
  },
  {
    "path": ".github/CODEOWNERS",
    "content": "# These owners will be the default owners for everything in\n*       @siumauricio\n"
  },
  {
    "path": ".github/FUNDING.yml",
    "content": "# These are supported funding model platforms\n\ngithub: [siumauricio]\npatreon: #\nopen_collective: dokploy\nko_fi: # Replace with a single Ko-fi username\ntidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel\ncommunity_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry\nliberapay: # Replace with a single Liberapay username\nissuehunt: # Replace with a single IssueHunt username\notechie: # Replace with a single Otechie username\nlfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry\ncustom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.yml",
    "content": "name: Bug Report\ndescription: Create a bug report\nlabels: [\"needs-triage🔍\"]\nbody:\n  - type: markdown\n    attributes:\n      value: |\n        Before opening a new issue, please do a search of existing issues.\n\n        If you need help with your own project, you can start a discussion in the [Q&A Section](https://github.com/Dokploy/dokploy/discussions).\n  - type: textarea\n    attributes:\n      label: To Reproduce\n      description: |\n        A detailed, step-by-step description of how to reproduce the issue is required. \n        Please ensure your report includes clear instructions using numbered lists. \n\n        If possible, provide a link to a repository or project where the issue can be reproduced.\n      placeholder: |\n        1. Create a application\n        2. Click X\n        3. Y will happen\n\n        Make sure to:\n        - Use numbered lists to outline steps clearly.\n        - Include all relevant commands and configurations.\n        - Provide a link to a reproducible repository if applicable.\n    validations:\n      required: true\n  - type: textarea\n    attributes:\n      label: Current vs. Expected behavior\n      description: A clear and concise description of what the bug is, and what you expected to happen.\n      placeholder: \"Following the steps from the previous section, I expected A to happen, but I observed B instead\"\n    validations:\n      required: true\n  - type: textarea\n    attributes:\n      label: Provide environment information\n      description: Please provide the following information about your environment.\n      render: bash\n      placeholder: |\n        Operating System:\n          OS: Ubuntu 20.04\n          Arch: arm64\n        Dokploy version: 0.2.2'\n        VPS Provider: DigitalOcean, Hetzner, Linode, etc.\n        What applications/services are you tying to deploy?\n         eg - Database, Nextjs App, laravel, etc.\n    validations:\n      required: true\n  - type: dropdown\n    attributes:\n      label: Which area(s) are affected? (Select all that apply)\n      multiple: true\n      options:\n        - \"Installation\"\n        - \"Application\"\n        - \"Databases\"\n        - \"Docker Compose\"\n        - \"Traefik\"\n        - \"Docker\"\n        - \"Remote server\"\n        - \"Local Development\"\n        - \"Cloud Version\"\n    validations:\n      required: true\n  - type: dropdown\n    attributes:\n      label: Are you deploying the applications where Dokploy is installed or on a remote server?\n      options:\n        - \"Same server where Dokploy is installed\"\n        - \"Remote server\"\n        - \"Both\"\n    validations:\n      required: true\n  - type: textarea\n    attributes:\n      label: Additional context\n      description: |\n        Any extra information that might help us investigate.\n      placeholder: |\n        I tested on a DigitalOcean VPS with Ubuntu 20.04 and Docker version 20.10.12.\n\n  - type: dropdown\n    attributes:\n      label: Will you send a PR to fix it?\n      description: Let us know if you are planning to submit a pull request to address this issue.\n\n      options:\n        - \"Yes\"\n        - \"No\"\n        - \"Maybe, need help\"\n    validations:\n      required: true\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/config.yml",
    "content": "blank_issues_enabled: false\ncontact_links:\n  - name: Questions?\n    url: https://github.com/Dokploy/dokploy/discussions\n    about: Ask your questions here."
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature-request.yml",
    "content": "name: Feature Request\ndescription: Suggest a new feature or improvement to the project\nlabels: [\"enhancement\"]\nbody:\n  - type: textarea\n    attributes:\n      label: What problem will this feature address?\n      description: A clear and concise description of what the problem is.\n      placeholder: |\n        I'm always frustrated when I can't do X\n    validations:\n      required: true\n  - type: textarea\n    attributes:\n      label: Describe the solution you'd like\n      description: A clear and concise description of what you want to happen.\n      placeholder: Add X to the core\n    validations:\n      required: true\n  - type: textarea\n    attributes:\n      label: Describe alternatives you've considered\n      description: A clear and concise description of any alternative solutions or features you've considered.\n      placeholder: |\n        Maybe use Y as a workaround?\n    validations:\n      required: true\n  - type: textarea\n    attributes:\n      label: Additional context\n      description: Add any other context or screenshots about the feature request here.\n    validations:\n      required: false\n\n  - type: dropdown\n    attributes:\n      label: Will you send a PR to implement it?\n      description: Let us know if you are planning to submit a pull request to implement this feature.\n      options:\n        - \"Yes\"\n        - \"No\"\n        - \"Maybe, need help\"\n    validations:\n      required: true\n"
  },
  {
    "path": ".github/pull_request_template.md",
    "content": "## What is this PR about?\n\nPlease describe in a short paragraph what this PR is about.\n\n## Checklist\n\nBefore submitting this PR, please make sure that:\n\n- [ ] You created a dedicated branch based on the `canary` branch.\n- [ ] You have read the suggestions in the CONTRIBUTING.md file https://github.com/Dokploy/dokploy/blob/canary/CONTRIBUTING.md#pull-request\n- [ ] You have tested this PR in your local instance. If you have not tested it yet, please do so before submitting. This helps avoid wasting maintainers' time reviewing code that has not been verified by you.\n\n## Issues related (if applicable)\n\ncloses #123\n\n## Screenshots (if applicable)\n\n"
  },
  {
    "path": ".github/workflows/create-pr.yml",
    "content": "name: Auto PR to main when version changes\n\non:\n  push:\n    branches:\n      - canary\n\npermissions:\n  contents: write\n  pull-requests: write\n\njobs:\n  create-pr:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout Repository\n        uses: actions/checkout@v4\n        with:\n          fetch-depth: 0\n\n      - name: Get version from package.json\n        run: echo \"VERSION=$(jq -r .version ./apps/dokploy/package.json)\" >> $GITHUB_ENV\n\n      - name: Get latest GitHub tag\n        run: |\n          LATEST_TAG=$(git ls-remote --tags origin | awk -F'/' '{print $3}' | sort -V | tail -n1)\n          echo \"LATEST_TAG=$LATEST_TAG\" >> $GITHUB_ENV\n          echo $LATEST_TAG\n      - name: Compare versions\n        run: |\n          if [ \"${{ env.VERSION }}\" != \"${{ env.LATEST_TAG }}\" ]; then\n            VERSION_CHANGED=\"true\"\n          else\n            VERSION_CHANGED=\"false\"\n          fi\n          echo \"VERSION_CHANGED=$VERSION_CHANGED\" >> $GITHUB_ENV\n          echo \"Comparing versions:\"\n          echo \"Current version: ${{ env.VERSION }}\"\n          echo \"Latest tag: ${{ env.LATEST_TAG }}\"\n          echo \"Version changed: $VERSION_CHANGED\"\n      - name: Check if a PR already exists\n        run: |\n          PR_EXISTS=$(gh pr list --state open --base main --head canary --json number --jq '. | length')\n          echo \"PR_EXISTS=$PR_EXISTS\" >> $GITHUB_ENV\n        env:\n          GH_TOKEN: ${{ secrets.GH_PAT }}\n\n      - name: Create Pull Request\n        if: env.VERSION_CHANGED == 'true' && env.PR_EXISTS == '0'\n        run: |\n          git config --global user.name \"github-actions[bot]\"\n          git config --global user.email \"41898282+github-actions[bot]@users.noreply.github.com\"\n\n          git fetch origin main\n          git checkout canary\n          git push origin canary\n\n          gh pr create \\\n            --title \"🚀 Release ${{ env.VERSION }}\" \\\n            --body '\n            This PR promotes changes from `canary` to `main` for version ${{ env.VERSION }}.\n\n            ### 🔍 Changes Include:\n            - Version bump to ${{ env.VERSION }}\n            - All changes from canary branch\n\n            ### ✅ Pre-merge Checklist:\n            - [ ] All tests passing\n            - [ ] Documentation updated\n            - [ ] Docker images built and tested\n\n            > 🤖 This PR was automatically generated by [GitHub Actions](https://github.com/actions)' \\\n            --base main \\\n            --head canary \\\n            --label \"release\" --label \"automated pr\" || true \\\n            --reviewer siumauricio \\\n            --assignee siumauricio\n        env:\n          GH_TOKEN: ${{ github.token }}\n"
  },
  {
    "path": ".github/workflows/deploy.yml",
    "content": "name: Build Docker images\n\non:\n  push:\n    branches: [main, canary]\n  workflow_dispatch:\n\njobs:\n  build-and-push-cloud-image:\n    runs-on: ubuntu-latest\n\n    steps:\n      - name: Checkout repository\n        uses: actions/checkout@v3\n\n      - name: Set tag and version\n        id: meta-cloud\n        run: |\n          VERSION=$(jq -r .version apps/dokploy/package.json)\n          echo \"version=$VERSION\" >> $GITHUB_OUTPUT\n          if [ \"${{ github.ref }}\" = \"refs/heads/main\" ]; then\n            echo \"tags=siumauricio/cloud:latest,siumauricio/cloud:${VERSION}\" >> $GITHUB_OUTPUT\n          else\n            echo \"tags=siumauricio/cloud:canary\" >> $GITHUB_OUTPUT\n          fi\n\n      - name: Log in to Docker Hub\n        uses: docker/login-action@v2\n        with:\n          username: ${{ secrets.DOCKERHUB_USERNAME }}\n          password: ${{ secrets.DOCKERHUB_TOKEN }}\n\n      - name: Build and push Docker image\n        uses: docker/build-push-action@v4\n        with:\n          context: .\n          file: ./Dockerfile.cloud\n          push: true\n          tags: ${{ steps.meta-cloud.outputs.tags }}\n          platforms: linux/amd64\n          build-args: |\n            NEXT_PUBLIC_UMAMI_HOST=${{ secrets.NEXT_PUBLIC_UMAMI_HOST }}\n            NEXT_PUBLIC_UMAMI_WEBSITE_ID=${{ secrets.NEXT_PUBLIC_UMAMI_WEBSITE_ID }}\n            NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=${{ secrets.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY }}\n\n  build-and-push-schedule-image:\n    runs-on: ubuntu-latest\n\n    steps:\n      - name: Checkout repository\n        uses: actions/checkout@v3\n\n      - name: Set tag and version\n        id: meta-schedule\n        run: |\n          VERSION=$(jq -r .version apps/dokploy/package.json)\n          if [ \"${{ github.ref }}\" = \"refs/heads/main\" ]; then\n            echo \"tags=siumauricio/schedule:latest,siumauricio/schedule:${VERSION}\" >> $GITHUB_OUTPUT\n          else\n            echo \"tags=siumauricio/schedule:canary\" >> $GITHUB_OUTPUT\n          fi\n\n      - name: Log in to Docker Hub\n        uses: docker/login-action@v2\n        with:\n          username: ${{ secrets.DOCKERHUB_USERNAME }}\n          password: ${{ secrets.DOCKERHUB_TOKEN }}\n\n      - name: Build and push Docker image\n        uses: docker/build-push-action@v4\n        with:\n          context: .\n          file: ./Dockerfile.schedule\n          push: true\n          tags: ${{ steps.meta-schedule.outputs.tags }}\n          platforms: linux/amd64\n\n  build-and-push-server-image:\n    runs-on: ubuntu-latest\n\n    steps:\n      - name: Checkout repository\n        uses: actions/checkout@v3\n\n      - name: Set tag and version\n        id: meta-server\n        run: |\n          VERSION=$(jq -r .version apps/dokploy/package.json)\n          if [ \"${{ github.ref }}\" = \"refs/heads/main\" ]; then\n            echo \"tags=siumauricio/server:latest,siumauricio/server:${VERSION}\" >> $GITHUB_OUTPUT\n          else\n            echo \"tags=siumauricio/server:canary\" >> $GITHUB_OUTPUT\n          fi\n\n      - name: Log in to Docker Hub\n        uses: docker/login-action@v2\n        with:\n          username: ${{ secrets.DOCKERHUB_USERNAME }}\n          password: ${{ secrets.DOCKERHUB_TOKEN }}\n\n      - name: Build and push Docker image\n        uses: docker/build-push-action@v4\n        with:\n          context: .\n          file: ./Dockerfile.server\n          push: true\n          tags: ${{ steps.meta-server.outputs.tags }}\n          platforms: linux/amd64\n"
  },
  {
    "path": ".github/workflows/dokploy.yml",
    "content": "name: Dokploy Docker Build\n\non:\n  push:\n    branches: [main, canary, \"fix/re-apply-database-migration-fix\"]\n  workflow_dispatch:\n\nenv:\n  IMAGE_NAME: dokploy/dokploy\n\njobs:\n  docker-amd:\n    runs-on: ubuntu-22.04\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n\n      - name: Set up Docker Buildx\n        uses: docker/setup-buildx-action@v3\n\n      - name: Login to Docker Hub\n        uses: docker/login-action@v3\n        with:\n          username: ${{ secrets.DOCKERHUB_USERNAME }}\n          password: ${{ secrets.DOCKERHUB_TOKEN }}\n\n      - name: Set tag and version\n        id: meta\n        run: |\n          if [ \"${{ github.ref }}\" = \"refs/heads/main\" ]; then\n            TAG=\"latest\"\n            VERSION=$(node -p \"require('./apps/dokploy/package.json').version\")\n          elif [ \"${{ github.ref }}\" = \"refs/heads/canary\" ]; then\n            TAG=\"canary\"\n          else\n            TAG=\"feature\"\n          fi\n          echo \"tags=${IMAGE_NAME}:${TAG}-amd64\" >> $GITHUB_OUTPUT\n\n      - name: Prepare env file\n        run: |\n          cp apps/dokploy/.env.production.example .env.production\n          cp apps/dokploy/.env.production.example apps/dokploy/.env.production\n\n      - name: Build and push\n        uses: docker/build-push-action@v5\n        with:\n          context: .\n          platforms: linux/amd64\n          push: true\n          tags: ${{ steps.meta.outputs.tags }}\n  docker-arm:\n    runs-on: ubuntu-24.04-arm\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n\n      - name: Set up Docker Buildx\n        uses: docker/setup-buildx-action@v3\n\n      - name: Login to Docker Hub\n        uses: docker/login-action@v3\n        with:\n          username: ${{ secrets.DOCKERHUB_USERNAME }}\n          password: ${{ secrets.DOCKERHUB_TOKEN }}\n\n      - name: Set tag and version\n        id: meta\n        run: |\n          VERSION=$(node -p \"require('./apps/dokploy/package.json').version\")\n          if [ \"${{ github.ref }}\" = \"refs/heads/main\" ]; then\n            TAG=\"latest\"\n            VERSION=$(node -p \"require('./apps/dokploy/package.json').version\")\n          elif [ \"${{ github.ref }}\" = \"refs/heads/canary\" ]; then\n            TAG=\"canary\"\n          else\n            TAG=\"feature\"\n          fi\n          echo \"tags=${IMAGE_NAME}:${TAG}-arm64\" >> $GITHUB_OUTPUT\n\n      - name: Prepare env file\n        run: |\n          cp apps/dokploy/.env.production.example .env.production\n          cp apps/dokploy/.env.production.example apps/dokploy/.env.production\n\n      - name: Build and push\n        uses: docker/build-push-action@v5\n        with:\n          context: .\n          platforms: linux/arm64\n          push: true\n          tags: ${{ steps.meta.outputs.tags }}\n\n  combine-manifests:\n    needs: [docker-amd, docker-arm]\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n\n      - name: Set up Docker Buildx\n        uses: docker/setup-buildx-action@v3\n\n      - name: Login to Docker Hub\n        uses: docker/login-action@v3\n        with:\n          username: ${{ secrets.DOCKERHUB_USERNAME }}\n          password: ${{ secrets.DOCKERHUB_TOKEN }}\n\n      - name: Create and push manifests\n        run: |\n          if [ \"${{ github.ref }}\" = \"refs/heads/main\" ]; then\n            VERSION=$(node -p \"require('./apps/dokploy/package.json').version\")\n            TAG=\"latest\"\n\n            docker buildx imagetools create -t ${IMAGE_NAME}:${TAG} \\\n              ${IMAGE_NAME}:${TAG}-amd64 \\\n              ${IMAGE_NAME}:${TAG}-arm64\n\n            docker buildx imagetools create -t ${IMAGE_NAME}:${VERSION} \\\n              ${IMAGE_NAME}:${TAG}-amd64 \\\n              ${IMAGE_NAME}:${TAG}-arm64\n\n          elif [ \"${{ github.ref }}\" = \"refs/heads/canary\" ]; then\n            TAG=\"canary\"\n            docker buildx imagetools create -t ${IMAGE_NAME}:${TAG} \\\n              ${IMAGE_NAME}:${TAG}-amd64 \\\n              ${IMAGE_NAME}:${TAG}-arm64\n\n          else\n            TAG=\"feature\"\n            docker buildx imagetools create -t ${IMAGE_NAME}:${TAG} \\\n              ${IMAGE_NAME}:${TAG}-amd64 \\\n              ${IMAGE_NAME}:${TAG}-arm64\n          fi\n\n  generate-release:\n    needs: [combine-manifests]\n    if: github.ref == 'refs/heads/main'\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n        with:\n          fetch-depth: 0\n\n      - name: Get version\n        id: get_version\n        run: |\n          VERSION=$(node -p \"require('./apps/dokploy/package.json').version\")\n          echo \"version=$VERSION\" >> $GITHUB_OUTPUT\n\n      - name: Create Release\n        uses: softprops/action-gh-release@v2\n        with:\n          tag_name: ${{ steps.get_version.outputs.version }}\n          name: ${{ steps.get_version.outputs.version }}\n          generate_release_notes: true\n          draft: false\n          prerelease: false\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n"
  },
  {
    "path": ".github/workflows/format.yml",
    "content": "name: autofix.ci\n\non:\n  push:\n    branches: [canary]\n  pull_request:\n    branches: [canary]\n\njobs:\n  format:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout code\n        uses: actions/checkout@v4\n\n      - name: Setup biomeJs\n        uses: biomejs/setup-biome@v2  \n\n      - name: Run Biome formatter\n        run:  biome format --write\n\n      - uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27 # v1.3.2\n"
  },
  {
    "path": ".github/workflows/monitoring.yml",
    "content": "name: Dokploy Monitoring Build\n\non:\n  push:\n    branches: [main, canary]\n\nenv:\n  IMAGE_NAME: dokploy/monitoring\n\njobs:\n  docker-amd:\n    runs-on: ubuntu-22.04\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n\n      - name: Set up Docker Buildx\n        uses: docker/setup-buildx-action@v3\n\n      - name: Login to Docker Hub\n        uses: docker/login-action@v3\n        with:\n          username: ${{ secrets.DOCKERHUB_USERNAME }}\n          password: ${{ secrets.DOCKERHUB_TOKEN }}\n\n      - name: Set tag\n        id: meta\n        run: |\n          if [ \"${{ github.ref }}\" = \"refs/heads/main\" ]; then\n            TAG=\"latest\"\n          elif [ \"${{ github.ref }}\" = \"refs/heads/canary\" ]; then\n            TAG=\"canary\"\n          else\n            TAG=\"feature\"\n          fi\n          echo \"tags=${IMAGE_NAME}:${TAG}-amd64\" >> $GITHUB_OUTPUT\n\n      - name: Build and push\n        uses: docker/build-push-action@v5\n        with:\n          context: .\n          file: ./Dockerfile.monitoring\n          platforms: linux/amd64\n          push: true\n          tags: ${{ steps.meta.outputs.tags }}\n  docker-arm:\n    runs-on: ubuntu-24.04-arm\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n\n      - name: Set up Docker Buildx\n        uses: docker/setup-buildx-action@v3\n\n      - name: Login to Docker Hub\n        uses: docker/login-action@v3\n        with:\n          username: ${{ secrets.DOCKERHUB_USERNAME }}\n          password: ${{ secrets.DOCKERHUB_TOKEN }}\n\n      - name: Set\n        id: meta\n        run: |\n          if [ \"${{ github.ref }}\" = \"refs/heads/main\" ]; then\n            TAG=\"latest\"\n          elif [ \"${{ github.ref }}\" = \"refs/heads/canary\" ]; then\n            TAG=\"canary\"\n          else\n            TAG=\"feature\"\n          fi\n          echo \"tags=${IMAGE_NAME}:${TAG}-arm64\" >> $GITHUB_OUTPUT\n\n      - name: Build and push\n        uses: docker/build-push-action@v5\n        with:\n          context: .\n          file: ./Dockerfile.monitoring\n          platforms: linux/arm64\n          push: true\n          tags: ${{ steps.meta.outputs.tags }}\n\n  combine-manifests:\n    needs: [docker-amd, docker-arm]\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n\n      - name: Set up Docker Buildx\n        uses: docker/setup-buildx-action@v3\n\n      - name: Login to Docker Hub\n        uses: docker/login-action@v3\n        with:\n          username: ${{ secrets.DOCKERHUB_USERNAME }}\n          password: ${{ secrets.DOCKERHUB_TOKEN }}\n\n      - name: Create and push manifests\n        run: |\n          if [ \"${{ github.ref }}\" = \"refs/heads/main\" ]; then\n            TAG=\"latest\"\n\n            docker buildx imagetools create -t ${IMAGE_NAME}:${TAG} \\\n              ${IMAGE_NAME}:${TAG}-amd64 \\\n              ${IMAGE_NAME}:${TAG}-arm64\n\n          elif [ \"${{ github.ref }}\" = \"refs/heads/canary\" ]; then\n            TAG=\"canary\"\n            docker buildx imagetools create -t ${IMAGE_NAME}:${TAG} \\\n              ${IMAGE_NAME}:${TAG}-amd64 \\\n              ${IMAGE_NAME}:${TAG}-arm64\n\n          else\n            TAG=\"feature\"\n            docker buildx imagetools create -t ${IMAGE_NAME}:${TAG} \\\n              ${IMAGE_NAME}:${TAG}-amd64 \\\n              ${IMAGE_NAME}:${TAG}-arm64\n          fi\n"
  },
  {
    "path": ".github/workflows/pr-quality.yml",
    "content": "\nname: PR Quality\n\npermissions:\n  contents: read\n  issues: read\n  pull-requests: write\n\non:\n  pull_request_target:\n    types: [opened, reopened]\n\njobs:\n  anti-slop:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: peakoss/anti-slop@v0\n        with:\n          max-failures: 4\n          blocked-commit-authors: \"claude,copilot\"\n          require-description: true\n          min-account-age: 5\n"
  },
  {
    "path": ".github/workflows/pull-request.yml",
    "content": "name: Pull Request\n\non:\n  pull_request:\n    branches: [main, canary]\n\npermissions:\n  contents: read\n\njobs:\n  pr-check:\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        job: [build, test, typecheck]\n    steps:\n      - uses: actions/checkout@v4\n      - uses: pnpm/action-setup@v4\n      - uses: actions/setup-node@v4\n        with:\n          node-version: 24.4.0\n          cache: \"pnpm\"\n      \n      - name: Install Nixpacks\n        if: matrix.job == 'test'\n        run:  |\n          export NIXPACKS_VERSION=1.41.0\n          curl -sSL https://nixpacks.com/install.sh | bash\n          echo \"Nixpacks installed $NIXPACKS_VERSION\"\n\n      - name: Install Railpack\n        if: matrix.job == 'test'\n        run:  |\n          export RAILPACK_VERSION=0.15.4\n          curl -sSL https://railpack.com/install.sh | bash\n          echo \"Railpack installed $RAILPACK_VERSION\"\n      \n      - name: Add build tools to PATH\n        if: matrix.job == 'test'\n        run: echo \"$HOME/.local/bin\" >> $GITHUB_PATH\n      \n      - name: Initialize Docker Swarm\n        if: matrix.job == 'test'\n        run: |\n          docker swarm init\n          docker network create --driver overlay dokploy-network || true\n          echo \"✅ Docker Swarm initialized\"\n      \n      - run: pnpm install --frozen-lockfile\n      - run: pnpm server:build\n      - run: pnpm ${{ matrix.job }}\n"
  },
  {
    "path": ".github/workflows/sync-openapi-docs.yml",
    "content": "name: Generate and Sync OpenAPI\n\non:\n  push:\n    branches:\n      - canary\n      - main\n    paths:\n      - 'apps/dokploy/server/api/routers/**'\n      - 'packages/server/src/services/**'\n      - 'packages/server/src/db/schema/**'\n\n  workflow_dispatch:\n\njobs:\n  generate-and-commit:\n    name: Generate OpenAPI and commit to Dokploy repo\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout Dokploy repository\n        uses: actions/checkout@v4\n        with:\n          token: ${{ secrets.GITHUB_TOKEN }}\n      - uses: pnpm/action-setup@v4\n      - uses: actions/setup-node@v4\n        with:\n          node-version: 24.4.0\n          cache: \"pnpm\"\n\n      - name: Install dependencies\n        run: pnpm install --frozen-lockfile\n\n      - name: Generate OpenAPI specification\n        run: |\n          pnpm generate:openapi\n          \n          # Verifica que se generó correctamente\n          if [ ! -f openapi.json ]; then\n            echo \"❌ openapi.json not found\"\n            exit 1\n          fi\n          \n          echo \"✅ OpenAPI specification generated successfully\"\n\n      - name: Sync to website repository\n        run: |\n          # Clona el repositorio de website\n          git clone https://x-access-token:${{ secrets.DOCS_SYNC_TOKEN }}@github.com/dokploy/website.git website-repo\n          \n          cd website-repo\n          \n          # Copia el openapi.json al website (sobrescribe)\n          mkdir -p apps/docs/public\n          cp -f ../openapi.json apps/docs/public/openapi.json\n          \n          # Configura git\n          git config user.name \"Dokploy Bot\"\n          git config user.email \"bot@dokploy.com\"\n          \n          # Agrega y commitea siempre\n          git add apps/docs/public/openapi.json\n          git commit -m \"chore: sync OpenAPI specification [skip ci]\" \\\n            -m \"Source: ${{ github.repository }}@${{ github.sha }}\" \\\n            -m \"Updated: $(date -u +'%Y-%m-%d %H:%M:%S UTC')\" \\\n            --allow-empty\n          \n          git push\n          \n          echo \"✅ OpenAPI synced to website successfully\"\n\n"
  },
  {
    "path": ".gitignore",
    "content": "# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.\n\n# Dependencies\nnode_modules\n.pnp\n.pnp.js\n.docker\n\n# Local env files\n.env\n.env.local\n.env.development.local\n.env.test.local\n.env.production.local\n\nopenapi.json\n\n# Testing\ncoverage\n\n# Turbo\n.turbo\n\n# Vercel\n.vercel\n\n# Build Outputs\n.next/\nout/\ndist\n\n\n# Debug\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Editor\n.idea\n\n# Misc\n.DS_Store\n*.pem\n\n\n.db"
  },
  {
    "path": ".nvmrc",
    "content": "24.4.0"
  },
  {
    "path": ".vscode/extensions.json",
    "content": "{\n\t\"recommendations\": [\"biomejs.biome\"]\n}\n"
  },
  {
    "path": ".vscode/settings.json",
    "content": "{\n\t\"editor.formatOnSave\": true,\n\t\"editor.defaultFormatter\": \"biomejs.biome\",\n\t\"editor.codeActionsOnSave\": {\n\t\t\"source.fixAll.biome\": \"explicit\",\n\t\t\"source.organizeImports.biome\": \"explicit\"\n\t}\n}\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "# Contributing\n\nHey, thanks for your interest in contributing to Dokploy! We appreciate your help and taking your time to contribute.\n\nBefore you start, please first discuss the feature/bug you want to add with the owners and community via github issues.\n\nWe have a few guidelines to follow when contributing to this project:\n\n- [Commit Convention](#commit-convention)\n- [Setup](#setup)\n- [Development](#development)\n- [Build](#build)\n- [Pull Request](#pull-request)\n- [Important Considerations](#important-considerations-for-pull-requests)\n\n## Commit Convention\n\nBefore you create a Pull Request, please make sure your commit message follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification.\n\n### Commit Message Format\n\n```\n<type>[optional scope]: <description>\n\n[optional body]\n\n[optional footer(s)]\n```\n\n#### Type\n\nMust be one of the following:\n\n- **feat**: A new feature\n- **fix**: A bug fix\n- **docs**: Documentation only changes\n- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)\n- **refactor**: A code change that neither fixes a bug nor adds a feature\n- **perf**: A code change that improves performance\n- **test**: Adding missing tests or correcting existing tests\n- **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)\n- **ci**: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)\n- **chore**: Other changes that don't modify `src` or `test` files\n- **revert**: Reverts a previous commit\n\nExample:\n\n```\nfeat: add new feature\n```\n\n## Setup\n\nBefore you start, please make the clone based on the `canary` branch, since the `main` branch is the source of truth and should always reflect the latest stable release, also the PRs will be merged to the `canary` branch.\n\nWe use Node v24.4.0 and recommend this specific version. If you have nvm installed, you can run `nvm install 24.4.0 && nvm use` in the root directory.\n\n```bash\ngit clone https://github.com/dokploy/dokploy.git\ncd dokploy\npnpm install\ncp apps/dokploy/.env.example apps/dokploy/.env\n```\n\n## Requirements\n\n- [Docker](/GUIDES.md#docker)\n\n### Setup\n\nRun the command that will spin up all the required services and files.\n\n```bash\npnpm run dokploy:setup\n```\n\nRun this script\n\n```bash\npnpm run server:script\n```\n\nNow run the development server.\n\n```bash\npnpm run dokploy:dev\n```\n\nGo to http://localhost:3000 to see the development server\n\n> [!NOTE]\n> This project uses Biome. If your editor is configured to use another formatter such as Prettier, it's recommended to either change it to use Biome or turn it off.\n\n## Build\n\n```bash\npnpm run dokploy:build\n```\n\n## Docker\n\nTo build the docker image\n\n```bash\npnpm run docker:build\n```\n\nTo push the docker image\n\n```bash\npnpm run docker:push\n```\n\n## Password Reset\n\nIn the case you lost your password, you can reset it using the following command\n\n```bash\npnpm run reset-password\n```\n\nIf you want to test the webhooks on development mode using localtunnel, make sure to install [`localtunnel`](https://localtunnel.app/)\n\n```bash\npnpm dlx localtunnel --port 3000\n```\n\nIf you run into permission issues of docker run the following command\n\n```bash\nsudo chown -R USERNAME dokploy or sudo chown -R $(whoami) ~/.docker\n```\n\n## Application deploy\n\nIn case you want to deploy the application on your machine and you selected nixpacks or buildpacks, you need to install first.\n\n```bash\n# Install Nixpacks\ncurl -sSL https://nixpacks.com/install.sh -o install.sh \\\n    && chmod +x install.sh \\\n    && ./install.sh\n```\n\n```bash\n# Install Railpack\ncurl -sSL https://railpack.com/install.sh | sh\n```\n\n```bash\n# Install Buildpacks\ncurl -sSL \"https://github.com/buildpacks/pack/releases/download/v0.39.1/pack-v0.39.1-linux.tgz\" | tar -C /usr/local/bin/ --no-same-owner -xzv pack\n```\n\n## Pull Request\n\n- The `canary` branch is the source of truth and should always reflect the latest stable release.\n- Create a new branch for each feature or bug fix.\n- Make sure to add tests for your changes.\n- Make sure to update the documentation for any changes Go to the [docs.dokploy.com](https://docs.dokploy.com) website to see the changes.\n- When creating a pull request, please provide a clear and concise description of the changes made.\n- If you include a video or screenshot, would be awesome so we can see the changes in action.\n- If your pull request fixes an open issue, please reference the issue in the pull request description.\n- Once your pull request is merged, you will be automatically added as a contributor to the project.\n\n### Important Considerations for Pull Requests\n\n- **Testing is Mandatory:** All Pull Requests **must be tested** by the PR author before submission. You must verify that your changes work as expected in a local development environment (see [Setup](#setup)). **Pull Requests that have not been tested by their creator will be rejected.** This policy keeps the PR history clean and values contributors who submit verified, working code. Untested PRs are often recognizable by disproportionately large or scattered changes for simple tasks—please test first.\n- **Focus and Scope:** Each Pull Request should ideally address a single, well-defined problem or introduce one new feature. This greatly facilitates review and reduces the chances of introducing unintended side effects.\n- **Avoid Unfocused Changes:** Please avoid submitting Pull Requests that contain only minor changes such as whitespace adjustments, IDE-generated formatting, or removal of unused variables, unless these are part of a larger, clearly defined refactor or a dedicated \"cleanup\" Pull Request that addresses a specific `good first issue` or maintenance task.\n- **Issue Association:** For any significant change, it's highly recommended to open an issue first to discuss the proposed solution with the community and maintainers. This ensures alignment and avoids duplicated effort. If your PR resolves an existing issue, please link it in the description (e.g., `Fixes #123`, `Closes #456`).\n- **Large Features:** Pull Requests that introduce very large or broad features **will not be accepted** unless the idea is first outlined and discussed in a GitHub issue. Large features should be designed together with the Dokploy team so the project stays coherent and moves in the same direction. Open an issue to propose and align on the design before implementing.\n\nThank you for your contribution!\n\n## Templates\n\nTo add a new template, go to `https://github.com/Dokploy/templates` repository and read the README.md file.\n\n### Recommendations\n\n- Use the same name of the folder as the id of the template.\n- The logo should be in the public folder.\n- If you want to show a domain in the UI, please add the `_HOST` suffix at the end of the variable name.\n- Test first on a vps or a server to make sure the template works.\n\n## Docs & Website\n\nTo contribute to the Dokploy docs or website, please go to this [repository](https://github.com/Dokploy/website).\n"
  },
  {
    "path": "Dockerfile",
    "content": "# syntax=docker/dockerfile:1\nFROM node:24.4.0-slim AS base\nENV PNPM_HOME=\"/pnpm\"\nENV PATH=\"$PNPM_HOME:$PATH\"\nRUN corepack enable\nRUN corepack prepare pnpm@10.22.0 --activate\n\nFROM base AS build\nCOPY . /usr/src/app\nWORKDIR /usr/src/app\n\nRUN apt-get update && apt-get install -y python3 make g++ git python3-pip pkg-config libsecret-1-dev && rm -rf /var/lib/apt/lists/*\n\n# Install dependencies\nRUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile\n\n# Deploy only the dokploy app\n\nENV NODE_ENV=production\nRUN pnpm --filter=@dokploy/server build\nRUN pnpm --filter=./apps/dokploy run build\n\nRUN pnpm --filter=./apps/dokploy --prod deploy --legacy /prod/dokploy\n\nRUN cp -R /usr/src/app/apps/dokploy/.next /prod/dokploy/.next\nRUN cp -R /usr/src/app/apps/dokploy/dist /prod/dokploy/dist\n\nFROM base AS dokploy\nWORKDIR /app\n\n# Set production\nENV NODE_ENV=production\n\nRUN apt-get update && apt-get install -y curl unzip zip apache2-utils iproute2 rsync git-lfs && git lfs install && rm -rf /var/lib/apt/lists/*\n\n# Copy only the necessary files\nCOPY --from=build /prod/dokploy/.next ./.next\nCOPY --from=build /prod/dokploy/dist ./dist\nCOPY --from=build /prod/dokploy/next.config.mjs ./next.config.mjs\nCOPY --from=build /prod/dokploy/public ./public\nCOPY --from=build /prod/dokploy/package.json ./package.json\nCOPY --from=build /prod/dokploy/drizzle ./drizzle\nCOPY .env.production ./.env\nCOPY --from=build /prod/dokploy/components.json ./components.json\nCOPY --from=build /prod/dokploy/node_modules ./node_modules\n\n\n# Install docker\nRUN curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh --version 28.5.2 && rm get-docker.sh && curl https://rclone.org/install.sh | bash\n\n# Install Nixpacks and tsx\n# | VERBOSE=1 VERSION=1.21.0 bash\n\nARG NIXPACKS_VERSION=1.41.0\nRUN curl -sSL https://nixpacks.com/install.sh -o install.sh \\\n    && chmod +x install.sh \\\n    && ./install.sh \\\n    && pnpm install -g tsx\n\n# Install Railpack\nARG RAILPACK_VERSION=0.15.4\nRUN curl -sSL https://railpack.com/install.sh | bash\n\n# Install buildpacks\nCOPY --from=buildpacksio/pack:0.39.1 /usr/local/bin/pack /usr/local/bin/pack\n\nEXPOSE 3000\n\nHEALTHCHECK --interval=10s --timeout=3s --retries=10 \\\n  CMD curl -fs http://localhost:3000/api/trpc/settings.health || exit 1\n\n  CMD [\"sh\", \"-c\", \"pnpm run wait-for-postgres && exec pnpm start\"]\n"
  },
  {
    "path": "Dockerfile.cloud",
    "content": "# syntax=docker/dockerfile:1\nFROM node:24.4.0-slim AS base\nENV PNPM_HOME=\"/pnpm\"\nENV PATH=\"$PNPM_HOME:$PATH\"\nRUN corepack enable\nRUN corepack prepare pnpm@10.22.0 --activate\n\nFROM base AS build\nCOPY . /usr/src/app\nWORKDIR /usr/src/app\n\nRUN apt-get update && apt-get install -y python3 make g++ git python3-pip pkg-config libsecret-1-dev && rm -rf /var/lib/apt/lists/*\n\n# Install dependencies\nRUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm --filter=@dokploy/server --filter=./apps/dokploy install --frozen-lockfile\n\n\n# Deploy only the dokploy app\n# ARG NEXT_PUBLIC_UMAMI_HOST\n# ENV NEXT_PUBLIC_UMAMI_HOST=$NEXT_PUBLIC_UMAMI_HOST\n\n# ARG NEXT_PUBLIC_UMAMI_WEBSITE_ID\n# ENV NEXT_PUBLIC_UMAMI_WEBSITE_ID=$NEXT_PUBLIC_UMAMI_WEBSITE_ID\n\nARG NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY\nENV NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=$NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY\n\nENV NODE_ENV=production\nRUN pnpm --filter=@dokploy/server build\nRUN pnpm --filter=./apps/dokploy run build\n\nRUN pnpm --filter=./apps/dokploy --prod deploy --legacy /prod/dokploy\n\nRUN cp -R /usr/src/app/apps/dokploy/.next /prod/dokploy/.next\nRUN cp -R /usr/src/app/apps/dokploy/dist /prod/dokploy/dist\n\nFROM base AS dokploy\nWORKDIR /app\n\n# Set production\nENV NODE_ENV=production\n\nRUN apt-get update && apt-get install -y curl unzip apache2-utils && rm -rf /var/lib/apt/lists/*\n\n# Copy only the necessary files\nCOPY --from=build /prod/dokploy/.next ./.next\nCOPY --from=build /prod/dokploy/dist ./dist\nCOPY --from=build /prod/dokploy/next.config.mjs ./next.config.mjs\nCOPY --from=build /prod/dokploy/public ./public\nCOPY --from=build /prod/dokploy/package.json ./package.json\nCOPY --from=build /prod/dokploy/drizzle ./drizzle\nCOPY --from=build /prod/dokploy/components.json ./components.json\nCOPY --from=build /prod/dokploy/node_modules ./node_modules\n\n\n# Install RCLONE\nRUN curl https://rclone.org/install.sh | bash\n\n# tsx\nRUN pnpm install -g tsx\n\nEXPOSE 3000\nCMD [ \"pnpm\", \"start\" ]\n"
  },
  {
    "path": "Dockerfile.monitoring",
    "content": "# syntax=docker/dockerfile:1\n# Build stage\nFROM golang:1.21-alpine3.19 AS builder\n\n# Instalar dependencias necesarias\nRUN apk add --no-cache gcc musl-dev sqlite-dev\n\n# Establecer el directorio de trabajo\nWORKDIR /app\n\n# Copiar todo el código fuente primero\nCOPY . .\n\n# Movernos al directorio de la aplicación golang\nWORKDIR /app/apps/monitoring\n\n# Descargar dependencias\nRUN go mod download\n\n# Compilar la aplicación\nRUN CGO_ENABLED=1 GOOS=linux go build -o main main.go\n\n# Etapa final\nFROM alpine:3.19\n\n# Instalar SQLite y otras dependencias necesarias\nRUN apk add --no-cache sqlite-libs docker-cli\n\nWORKDIR /app\n\n# Copiar el binario compilado y el archivo monitor.go\nCOPY --from=builder /app/apps/monitoring/main ./main\nCOPY --from=builder /app/apps/monitoring/main.go ./monitor.go\n\n# COPY --from=builder /app/apps/golang/.env ./.env\n\n# Exponer el puerto\nENV PORT=3001\nEXPOSE 3001\n\n# Ejecutar la aplicación\nCMD [\"./main\"]"
  },
  {
    "path": "Dockerfile.schedule",
    "content": "# syntax=docker/dockerfile:1\nFROM node:24.4.0-slim AS base\nENV PNPM_HOME=\"/pnpm\"\nENV PATH=\"$PNPM_HOME:$PATH\"\nRUN corepack enable\nRUN corepack prepare pnpm@10.22.0 --activate\n\nFROM base AS build\nCOPY . /usr/src/app\nWORKDIR /usr/src/app\n\nRUN apt-get update && apt-get install -y python3 make g++ git python3-pip pkg-config libsecret-1-dev && rm -rf /var/lib/apt/lists/*\n\n# Install dependencies\nRUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm --filter=@dokploy/server --filter=./apps/schedules install --frozen-lockfile\n\n# Deploy only the dokploy app\n\nENV NODE_ENV=production\nRUN pnpm --filter=@dokploy/server build\nRUN pnpm --filter=./apps/schedules run build\n\nRUN pnpm --filter=./apps/schedules --prod deploy --legacy /prod/schedules\n\nRUN cp -R /usr/src/app/apps/schedules/dist /prod/schedules/dist\n\nFROM base AS dokploy\nWORKDIR /app\n\n# Set production\nENV NODE_ENV=production\n\n# Copy only the necessary files\nCOPY --from=build /prod/schedules/dist ./dist\nCOPY --from=build /prod/schedules/package.json ./package.json\nCOPY --from=build /prod/schedules/node_modules ./node_modules\n\nENV HOSTNAME=0.0.0.0\nCMD [\"pnpm\", \"start\"]\n"
  },
  {
    "path": "Dockerfile.server",
    "content": "# syntax=docker/dockerfile:1\nFROM node:24.4.0-slim AS base\nENV PNPM_HOME=\"/pnpm\"\nENV PATH=\"$PNPM_HOME:$PATH\"\nRUN corepack enable\nRUN corepack prepare pnpm@10.22.0 --activate\n\nFROM base AS build\nCOPY . /usr/src/app\nWORKDIR /usr/src/app\n\nRUN apt-get update && apt-get install -y python3 make g++ git python3-pip pkg-config libsecret-1-dev && rm -rf /var/lib/apt/lists/*\n\n# Install dependencies\nRUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm --filter=@dokploy/server --filter=./apps/api install --frozen-lockfile\n\n# Deploy only the dokploy app\n\nENV NODE_ENV=production\nRUN pnpm --filter=@dokploy/server build\nRUN pnpm --filter=./apps/api run build\n\nRUN pnpm --filter=./apps/api --prod deploy --legacy /prod/api\n\nRUN cp -R /usr/src/app/apps/api/dist /prod/api/dist\n\nFROM base AS dokploy\nWORKDIR /app\n\n# Set production\nENV NODE_ENV=production\n\n# Copy only the necessary files\nCOPY --from=build /prod/api/dist ./dist\nCOPY --from=build /prod/api/package.json ./package.json\nCOPY --from=build /prod/api/node_modules ./node_modules\n\nENV HOSTNAME=0.0.0.0\nCMD [\"pnpm\", \"start\"]\n"
  },
  {
    "path": "GUIDES.md",
    "content": "# Docker\n\nHere's how to install docker on different operating systems:\n\n## macOS\n\n1. Visit [Docker Desktop for Mac](https://www.docker.com/products/docker-desktop)\n2. Download the Docker Desktop installer\n3. Double-click the downloaded `.dmg` file\n4. Drag Docker to your Applications folder\n5. Open Docker Desktop from Applications\n6. Follow the onboarding tutorial if desired\n\n## Linux\n\n### Ubuntu\n\n```bash\n# Uninstall old versions\nfor pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done\n\n# Update package index\nsudo apt-get update\n\n# Install prerequisites\nsudo apt-get install ca-certificates curl\nsudo install -m 0755 -d /etc/apt/keyrings\n\n# Add Docker's official GPG key\nsudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc\nsudo chmod a+r /etc/apt/keyrings/docker.asc\n\n# Add the repository to Apt sources\necho \\\n  \"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \\\n  $(. /etc/os-release && echo \"${UBUNTU_CODENAME:-$VERSION_CODENAME}\") stable\" | \\\n  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null\n\n# Install Docker Engine\nsudo apt-get update\nsudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin\n```\n\n## Windows\n\n1. Enable WSL2 if not already enabled\n2. Visit [Docker Desktop for Windows](https://www.docker.com/products/docker-desktop)\n3. Download the installer\n4. Run the installer and follow the prompts\n5. Start Docker Desktop from the Start menu"
  },
  {
    "path": "LICENSE.MD",
    "content": "Copyright 2026-present Dokploy Technology, Inc.\n\nPortions of this software are licensed as follows:\n\n* All content that resides under a \"/proprietary\" directory of this repository, if that directory exists, is licensed under the license defined in \"LICENSE_PROPRIETARY\".\n* Content outside of the above mentioned directories or restrictions above is available under the \"Apache License 2.0\" license as defined below.\n\n## Apache License 2.0\n\nCopyright 2026-present Dokploy Technology, Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and limitations under the License.\n\n\n"
  },
  {
    "path": "LICENSE_PROPRIETARY.md",
    "content": "The Dokploy Source Available license (DSAL) version 1.0\n\nCopyright (c) 2026-present Dokploy Technology, Inc.\n\nWith regard to the Dokploy Software:This software and associated documentation files (the \"Software\") may only beused in production, if you (and any entity that you represent) have agreed to, and are in compliance with, a valid commercial agreement from Dokploy.Subject to the foregoing sentence, you are free to modify this Software and publish patches to the Software. You agree that Dokploy and/or its licensors (as applicable) retain all right, title and interest in and to all such modifications and/or patches, and all such modifications and/or patches may only be used, copied, modified, displayed, distributed, or otherwise exploited with a valid Dokploy Source Available License.  Notwithstanding the foregoing, you may copy and modify the Software for development and testing purposes, without requiring a subscription.  You agree that Dokploy and/or its licensors (as applicable) retain all right, title and interest in and to all such modifications.  You are not granted any other rights beyond what is expressly stated herein.  Subject to theforegoing, it is forbidden to copy, merge, publish, distribute, sublicense,and/or sell the Software.\n\nThis Dokploy Source Available license applies only to the part of this Software that is in a /proprietary folder. The full text of this License shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.\n\nFor all third party components incorporated into the Dokploy Software, thosecomponents are licensed under the original license provided by the owner of the applicable component."
  },
  {
    "path": "README.md",
    "content": "<div align=\"center\">\n  <a href=\"https://dokploy.com\">\n    <img src=\".github/sponsors/logo.png\" alt=\"Dokploy - Open Source Alternative to Vercel, Heroku and Netlify.\" width=\"100%\"  />\n  </a>\n  </br>\n  </br>\n  <p>Join us on Discord for help, feedback, and discussions!</p>\n  <a href=\"https://discord.gg/2tBnJ3jDJc\">\n    <img src=\"https://discordapp.com/api/guilds/1234073262418563112/widget.png?style=banner2\" alt=\"Discord Shield\"/>\n  </a>\n</div>\n<br />\n\n\nDokploy is a free, self-hostable Platform as a Service (PaaS) that simplifies the deployment and management of applications and databases.\n\n## ✨ Features\n\nDokploy includes multiple features to make your life easier.\n\n- **Applications**: Deploy any type of application (Node.js, PHP, Python, Go, Ruby, etc.).\n- **Databases**: Create and manage databases with support for MySQL, PostgreSQL, MongoDB, MariaDB, and Redis.\n- **Backups**: Automate backups for databases to an external storage destination.\n- **Docker Compose**: Native support for Docker Compose to manage complex applications.\n- **Multi Node**: Scale applications to multiple nodes using Docker Swarm to manage the cluster.\n- **Templates**: Deploy open-source templates (Plausible, Pocketbase, Calcom, etc.) with a single click.\n- **Traefik Integration**: Automatically integrates with Traefik for routing and load balancing.\n- **Real-time Monitoring**: Monitor CPU, memory, storage, and network usage for every resource.\n- **Docker Management**: Easily deploy and manage Docker containers.\n- **CLI/API**: Manage your applications and databases using the command line or through the API.\n- **Notifications**: Get notified when your deployments succeed or fail (via Slack, Discord, Telegram, Email, etc.).\n- **Multi Server**: Deploy and manage your applications remotely to external servers.\n- **Self-Hosted**: Self-host Dokploy on your VPS.\n\n## 🚀 Getting Started\n\nTo get started, run the following command on a VPS:\n\nWant to skip the installation process? [Try the Dokploy Cloud](https://app.dokploy.com).\n\n```bash\ncurl -sSL https://dokploy.com/install.sh | sh\n```\n\nFor detailed documentation, visit [docs.dokploy.com](https://docs.dokploy.com).\n\n\n[Github Sponsors](https://github.com/sponsors/Siumauricio)\n\n### Contributors 🤝\n\n<a href=\"https://github.com/dokploy/dokploy/graphs/contributors\">\n  <img src=\"https://contrib.rocks/image?repo=dokploy/dokploy\" alt=\"Contributors\" />\n</a>\n\n## 📺 Video Tutorial\n\n<a href=\"https://youtu.be/mznYKPvhcfw\">\n  <img src=\"https://dokploy.com/banner.png\" alt=\"Watch the video\" width=\"400\"/>\n</a>\n\n## 🤝 Contributing\n\nCheck out the [Contributing Guide](CONTRIBUTING.md) for more information.\n"
  },
  {
    "path": "SECURITY.md",
    "content": "# Dokploy Security Policy\n\nAt Dokploy, security is a top priority. We appreciate the help of security researchers and the community in identifying and reporting vulnerabilities.\n\n## How to Report a Vulnerability\n\nIf you have discovered a security vulnerability in Dokploy, we ask that you report it responsibly by following these guidelines:\n\n1.  **Contact us:** Send an email to [contact@dokploy.com](mailto:contact@dokploy.com).\n2.  **Provide clear details:** Include as much information as possible to help us understand and reproduce the vulnerability. This should include:\n    *   A clear description of the vulnerability.\n    *   Steps to reproduce the vulnerability.\n    *   Any sample code, screenshots, or videos that might be helpful.\n    *   The potential impact of the vulnerability.\n3.  **Do not make the vulnerability public:** Please refrain from publicly disclosing the vulnerability until we have had the opportunity to investigate and address it. This is crucial for protecting our users.\n4.  **Allow us time:** We will endeavor to acknowledge receipt of your report as soon as possible and keep you informed of our progress. The time to resolve the vulnerability may vary depending on its complexity and severity.\n\n## What We Expect From You\n\n*   Do not access user data or systems beyond what is necessary to demonstrate the vulnerability.\n*   Do not perform denial-of-service (DoS) attacks, spamming, or social engineering.\n*   Do not modify or destroy data that does not belong to you.\n\n## Our Commitment\n\nWe are committed to working with you quickly and responsibly to address any legitimate security vulnerability.\n\nThank you for helping us keep Dokploy secure for everyone.\n"
  },
  {
    "path": "TERMS_AND_CONDITIONS.md",
    "content": "# Terms & Conditions\n\n**Dokploy core** is a free and open-source solution intended as an alternative to established cloud platforms like Vercel and Netlify.\n\nThe Dokploy team endeavors to mitigate potential defects and issues through stringent testing and adherence to principles of clean coding. Dokploy is provided \"AS IS\" without any warranties, express or implied. Refer to the [License](https://github.com/Dokploy/Dokploy/blob/main/LICENSE) for details on permissions and restrictions.\n\n\n### Description of Service:\n\n**Dokploy core** is an open-source tool designed to simplify the deployment of applications for both personal and business use. Users are permitted to install, modify, and operate Dokploy independently or within their organizations to improve their development and deployment operations. It is important to note that any commercial resale or redistribution of Dokploy as a service is strictly forbidden without explicit consent. This prohibition ensures the preservation of Dokploy's open-source character for the benefit of the entire community.\n\n### Our Responsibility\n\nThe Dokploy development team commits to maintaining the functionality of the software and addressing major issues promptly. While we welcome suggestions for new features, the decision to include them rests solely with the core developers of Dokploy.\n\n### Usage Data\n\n**Dokploy** does not collect any user data. It is distributed as a free and open-source tool under the terms of \"AS IS\", without any implied warranties or conditions.\n\n### Future Changes\n\nThe Terms of Service and Terms & Conditions are subject to change without prior notice.\n"
  },
  {
    "path": "apps/api/.gitignore",
    "content": "# dev\n.yarn/\n!.yarn/releases\n.vscode/*\n!.vscode/launch.json\n!.vscode/*.code-snippets\n.idea/workspace.xml\n.idea/usage.statistics.xml\n.idea/shelf\n\n# deps\nnode_modules/\n\n# env\n.env\n.env.production\n\n# logs\nlogs/\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\n# misc\n.DS_Store\n"
  },
  {
    "path": "apps/api/README.md",
    "content": "```\nnpm install\nnpm run dev\n```\n\n```\nopen http://localhost:3000\n```\n"
  },
  {
    "path": "apps/api/package.json",
    "content": "{\n\t\"name\": \"@dokploy/api\",\n\t\"version\": \"0.0.1\",\n\t\"type\": \"module\",\n\t\"scripts\": {\n\t\t\"dev\": \"PORT=4000 tsx watch src/index.ts\",\n\t\t\"build\": \"rimraf dist && tsc --project tsconfig.json\",\n\t\t\"start\": \"node dist/index.js\",\n\t\t\"typecheck\": \"tsc --noEmit\"\n\t},\n\t\"dependencies\": {\n\t\t\"inngest\": \"3.40.1\",\n\t\t\"@dokploy/server\": \"workspace:*\",\n\t\t\"@hono/node-server\": \"^1.14.3\",\n\t\t\"@hono/zod-validator\": \"0.7.6\",\n\t\t\"dotenv\": \"^16.4.5\",\n\t\t\"hono\": \"^4.11.7\",\n\t\t\"pino\": \"9.4.0\",\n\t\t\"pino-pretty\": \"11.2.2\",\n\t\t\"react\": \"18.2.0\",\n\t\t\"react-dom\": \"18.2.0\",\n\t\t\"redis\": \"4.7.0\",\n\t\t\"zod\": \"^4.3.6\"\n\t},\n\t\"devDependencies\": {\n\t\t\"@types/node\": \"^24.4.0\",\n\t\t\"@types/react\": \"^18.2.37\",\n\t\t\"@types/react-dom\": \"^18.2.15\",\n\t\t\"rimraf\": \"6.1.3\",\n\t\t\"tsx\": \"^4.16.2\",\n\t\t\"typescript\": \"^5.8.3\"\n\t},\n\t\"packageManager\": \"pnpm@10.22.0\",\n\t\"engines\": {\n\t\t\"node\": \"^24.4.0\",\n\t\t\"pnpm\": \">=10.22.0\"\n\t}\n}\n"
  },
  {
    "path": "apps/api/src/index.ts",
    "content": "import { serve } from \"@hono/node-server\";\nimport { Hono } from \"hono\";\nimport \"dotenv/config\";\nimport { zValidator } from \"@hono/zod-validator\";\nimport { Inngest } from \"inngest\";\nimport { serve as serveInngest } from \"inngest/hono\";\nimport { logger } from \"./logger.js\";\nimport {\n\tcancelDeploymentSchema,\n\ttype DeployJob,\n\tdeployJobSchema,\n} from \"./schema.js\";\nimport { fetchDeploymentJobs } from \"./service.js\";\nimport { deploy } from \"./utils.js\";\n\nconst app = new Hono();\n\n// Initialize Inngest client\nexport const inngest = new Inngest({\n\tid: \"dokploy-deployments\",\n\tname: \"Dokploy Deployment Service\",\n});\n\nexport const deploymentFunction = inngest.createFunction(\n\t{\n\t\tid: \"deploy-application\",\n\t\tname: \"Deploy Application\",\n\t\tconcurrency: [\n\t\t\t{\n\t\t\t\tkey: \"event.data.serverId\",\n\t\t\t\tlimit: 1,\n\t\t\t},\n\t\t],\n\t\tretries: 0,\n\t\tcancelOn: [\n\t\t\t{\n\t\t\t\tevent: \"deployment/cancelled\",\n\t\t\t\tif: \"async.data.applicationId == event.data.applicationId || async.data.composeId == event.data.composeId\",\n\t\t\t\ttimeout: \"1h\", // Allow cancellation for up to 1 hour\n\t\t\t},\n\t\t],\n\t},\n\t{ event: \"deployment/requested\" },\n\n\tasync ({ event, step }) => {\n\t\tconst jobData = event.data as DeployJob;\n\n\t\treturn await step.run(\"execute-deployment\", async () => {\n\t\t\tlogger.info(\"Deploying started\");\n\n\t\t\ttry {\n\t\t\t\tconst result = await deploy(jobData);\n\t\t\t\tlogger.info(\"Deployment finished\", result);\n\n\t\t\t\t// Send success event\n\t\t\t\tawait inngest.send({\n\t\t\t\t\tname: \"deployment/completed\",\n\t\t\t\t\tdata: {\n\t\t\t\t\t\t...jobData,\n\t\t\t\t\t\tresult,\n\t\t\t\t\t\tstatus: \"success\",\n\t\t\t\t\t},\n\t\t\t\t});\n\n\t\t\t\treturn result;\n\t\t\t} catch (error) {\n\t\t\t\tlogger.error(\"Deployment failed\", { jobData, error });\n\n\t\t\t\t// Send failure event\n\t\t\t\tawait inngest.send({\n\t\t\t\t\tname: \"deployment/failed\",\n\t\t\t\t\tdata: {\n\t\t\t\t\t\t...jobData,\n\t\t\t\t\t\terror: error instanceof Error ? error.message : String(error),\n\t\t\t\t\t\tstatus: \"failed\",\n\t\t\t\t\t},\n\t\t\t\t});\n\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t});\n\t},\n);\n\napp.use(async (c, next) => {\n\tif (c.req.path === \"/health\" || c.req.path === \"/api/inngest\") {\n\t\treturn next();\n\t}\n\n\tconst authHeader = c.req.header(\"X-API-Key\");\n\n\tif (process.env.API_KEY !== authHeader) {\n\t\treturn c.json({ message: \"Invalid API Key\" }, 403);\n\t}\n\n\treturn next();\n});\n\napp.post(\"/deploy\", zValidator(\"json\", deployJobSchema), async (c) => {\n\tconst data = c.req.valid(\"json\");\n\tlogger.info(\"Received deployment request\", data);\n\n\ttry {\n\t\t// Send event to Inngest instead of adding to Redis queue\n\t\tawait inngest.send({\n\t\t\tname: \"deployment/requested\",\n\t\t\tdata,\n\t\t});\n\n\t\tlogger.info(\"Deployment event sent to Inngest\", {\n\t\t\tserverId: data.serverId,\n\t\t});\n\n\t\treturn c.json(\n\t\t\t{\n\t\t\t\tmessage: \"Deployment Added to Inngest Queue\",\n\t\t\t\tserverId: data.serverId,\n\t\t\t},\n\t\t\t200,\n\t\t);\n\t} catch (error) {\n\t\tlogger.error(\"Failed to send deployment event\", error);\n\t\treturn c.json(\n\t\t\t{\n\t\t\t\tmessage: \"Failed to queue deployment\",\n\t\t\t\terror: error instanceof Error ? error.message : String(error),\n\t\t\t},\n\t\t\t500,\n\t\t);\n\t}\n});\n\napp.post(\n\t\"/cancel-deployment\",\n\tzValidator(\"json\", cancelDeploymentSchema),\n\tasync (c) => {\n\t\tconst data = c.req.valid(\"json\");\n\t\tlogger.info(\"Received cancel deployment request\", data);\n\n\t\ttry {\n\t\t\t// Send cancellation event to Inngest\n\n\t\t\tawait inngest.send({\n\t\t\t\tname: \"deployment/cancelled\",\n\t\t\t\tdata,\n\t\t\t});\n\n\t\t\tconst identifier =\n\t\t\t\tdata.applicationType === \"application\"\n\t\t\t\t\t? `applicationId: ${data.applicationId}`\n\t\t\t\t\t: `composeId: ${data.composeId}`;\n\n\t\t\tlogger.info(\"Deployment cancellation event sent\", {\n\t\t\t\t...data,\n\t\t\t\tidentifier,\n\t\t\t});\n\n\t\t\treturn c.json({\n\t\t\t\tmessage: \"Deployment cancellation requested\",\n\t\t\t\tapplicationType: data.applicationType,\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tlogger.error(\"Failed to send deployment cancellation event\", error);\n\t\t\treturn c.json(\n\t\t\t\t{\n\t\t\t\t\tmessage: \"Failed to cancel deployment\",\n\t\t\t\t\terror: error instanceof Error ? error.message : String(error),\n\t\t\t\t},\n\t\t\t\t500,\n\t\t\t);\n\t\t}\n\t},\n);\n\napp.get(\"/health\", async (c) => {\n\treturn c.json({ status: \"ok\" });\n});\n\n// List deployment jobs (Inngest runs) for a server - same shape as BullMQ queue for the UI\napp.get(\"/jobs\", async (c) => {\n\tconst serverId = c.req.query(\"serverId\");\n\tif (!serverId) {\n\t\treturn c.json({ message: \"serverId is required\" }, 400);\n\t}\n\n\ttry {\n\t\tconst rows = await fetchDeploymentJobs(serverId);\n\t\treturn c.json(rows);\n\t} catch (error) {\n\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\tif (message.includes(\"INNGEST_BASE_URL\")) {\n\t\t\treturn c.json(\n\t\t\t\t{ message: \"INNGEST_BASE_URL is required to list deployment jobs\" },\n\t\t\t\t503,\n\t\t\t);\n\t\t}\n\t\tlogger.error(\"Failed to fetch jobs from Inngest\", { serverId, error });\n\t\treturn c.json([], 200);\n\t}\n});\n\n// Serve Inngest functions endpoint\napp.on(\n\t[\"GET\", \"POST\", \"PUT\"],\n\t\"/api/inngest\",\n\tserveInngest({\n\t\tclient: inngest,\n\t\tfunctions: [deploymentFunction],\n\t}),\n);\n\nconst port = Number.parseInt(process.env.PORT || \"3000\");\nlogger.info(\"Starting Deployments Server with Inngest ✅\", port);\nserve({ fetch: app.fetch, port });\n"
  },
  {
    "path": "apps/api/src/logger.ts",
    "content": "import pino from \"pino\";\n\nexport const logger = pino({\n\ttransport: {\n\t\ttarget: \"pino-pretty\",\n\t\toptions: {\n\t\t\tcolorize: true,\n\t\t},\n\t},\n});\n"
  },
  {
    "path": "apps/api/src/schema.ts",
    "content": "import { z } from \"zod\";\n\nexport const deployJobSchema = z.discriminatedUnion(\"applicationType\", [\n\tz.object({\n\t\tapplicationId: z.string(),\n\t\ttitleLog: z.string().optional(),\n\t\tdescriptionLog: z.string().optional(),\n\t\tserver: z.boolean().optional(),\n\t\ttype: z.enum([\"deploy\", \"redeploy\"]),\n\t\tapplicationType: z.literal(\"application\"),\n\t\tserverId: z.string().min(1),\n\t}),\n\tz.object({\n\t\tcomposeId: z.string(),\n\t\ttitleLog: z.string().optional(),\n\t\tdescriptionLog: z.string().optional(),\n\t\tserver: z.boolean().optional(),\n\t\ttype: z.enum([\"deploy\", \"redeploy\"]),\n\t\tapplicationType: z.literal(\"compose\"),\n\t\tserverId: z.string().min(1),\n\t}),\n\tz.object({\n\t\tapplicationId: z.string(),\n\t\tpreviewDeploymentId: z.string(),\n\t\ttitleLog: z.string().optional(),\n\t\tdescriptionLog: z.string().optional(),\n\t\tserver: z.boolean().optional(),\n\t\ttype: z.enum([\"deploy\", \"redeploy\"]),\n\t\tapplicationType: z.literal(\"application-preview\"),\n\t\tserverId: z.string().min(1),\n\t}),\n]);\n\nexport type DeployJob = z.infer<typeof deployJobSchema>;\n\nexport const cancelDeploymentSchema = z.discriminatedUnion(\"applicationType\", [\n\tz.object({\n\t\tapplicationId: z.string(),\n\t\tapplicationType: z.literal(\"application\"),\n\t}),\n\tz.object({\n\t\tcomposeId: z.string(),\n\t\tapplicationType: z.literal(\"compose\"),\n\t}),\n]);\n\nexport type CancelDeploymentJob = z.infer<typeof cancelDeploymentSchema>;\n"
  },
  {
    "path": "apps/api/src/service.ts",
    "content": "import { logger } from \"./logger.js\";\n\nconst baseUrl = process.env.INNGEST_BASE_URL ?? \"\";\nconst signingKey = process.env.INNGEST_SIGNING_KEY ?? \"\";\n\nconst DEFAULT_MAX_EVENTS = 500;\nconst MAX_EVENTS = DEFAULT_MAX_EVENTS;\n\n/** Event shape from GET /v1/events (https://api.inngest.com/v1/events) */\ntype InngestEventRow = {\n\tinternal_id?: string;\n\taccountID?: string;\n\tenvironmentID?: string;\n\tsource?: string;\n\tsourceID?: string | null;\n\t/** RFC3339 timestamp – API uses receivedAt, dev server may use received_at */\n\treceivedAt?: string;\n\treceived_at?: string;\n\tid: string;\n\tname: string;\n\tdata: Record<string, unknown>;\n\tuser?: unknown;\n\tts: number;\n\tv?: string | null;\n\tmetadata?: {\n\t\tfetchedAt: string;\n\t\tcachedUntil: string | null;\n\t};\n};\n\n/** Run shape from GET /v1/events/{eventId}/runs – the actual job execution */\ntype InngestRun = {\n\trun_id: string;\n\tevent_id: string;\n\tstatus: string; // \"Running\" | \"Completed\" | \"Failed\" | \"Cancelled\" | \"Queued\"?\n\trun_started_at?: string;\n\tended_at?: string | null;\n\toutput?: unknown;\n\t// dev server / API may use different casing\n\trun_started_at_ms?: number;\n};\n\nfunction getEventReceivedAt(ev: InngestEventRow): string | undefined {\n\treturn ev.receivedAt ?? ev.received_at;\n}\n\n/** Map Inngest run status to BullMQ-style state for the UI */\nfunction runStatusToState(\n\tstatus: string,\n): \"pending\" | \"active\" | \"completed\" | \"failed\" | \"cancelled\" {\n\tconst s = status.toLowerCase();\n\tif (s === \"running\") return \"active\";\n\tif (s === \"completed\") return \"completed\";\n\tif (s === \"failed\") return \"failed\";\n\tif (s === \"cancelled\") return \"cancelled\";\n\tif (s === \"queued\") return \"pending\";\n\treturn \"pending\";\n}\n\nexport const fetchInngestEvents = async () => {\n\tconst maxEvents = MAX_EVENTS;\n\tconst all: InngestEventRow[] = [];\n\tlet cursor: string | undefined;\n\n\tdo {\n\t\tconst params = new URLSearchParams({ limit: \"100\" });\n\t\tif (cursor) {\n\t\t\tparams.set(\"cursor\", cursor);\n\t\t}\n\n\t\tconst res = await fetch(`${baseUrl}/v1/events?${params}`, {\n\t\t\theaders: {\n\t\t\t\tAuthorization: `Bearer ${signingKey}`,\n\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t},\n\t\t});\n\n\t\tif (!res.ok) {\n\t\t\tlogger.warn(\"Inngest API error\", {\n\t\t\t\tstatus: res.status,\n\t\t\t\tbody: await res.text(),\n\t\t\t});\n\t\t\tbreak;\n\t\t}\n\n\t\tconst body = (await res.json()) as {\n\t\t\tdata?: InngestEventRow[];\n\t\t\tcursor?: string;\n\t\t\tnextCursor?: string;\n\t\t};\n\t\tconst data = Array.isArray(body.data) ? body.data : [];\n\t\tall.push(...data);\n\n\t\t// Next page: API may return cursor/nextCursor, or use last event's internal_id (per API docs)\n\t\tconst nextCursor =\n\t\t\tbody.cursor ?? body.nextCursor ?? data[data.length - 1]?.internal_id;\n\t\tconst hasMore = data.length === 100 && nextCursor && all.length < maxEvents;\n\t\tcursor = hasMore ? nextCursor : undefined;\n\t} while (cursor);\n\n\treturn all.slice(0, maxEvents);\n};\n\n/** Fetch runs for a single event (GET /v1/events/{eventId}/runs) – runs are the actual jobs */\nexport const fetchInngestRunsForEvent = async (\n\teventId: string,\n): Promise<InngestRun[]> => {\n\tconst res = await fetch(\n\t\t`${baseUrl}/v1/events/${encodeURIComponent(eventId)}/runs`,\n\t\t{\n\t\t\theaders: {\n\t\t\t\tAuthorization: `Bearer ${signingKey}`,\n\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t},\n\t\t},\n\t);\n\tif (!res.ok) {\n\t\tlogger.warn(\"Inngest runs API error\", {\n\t\t\teventId,\n\t\t\tstatus: res.status,\n\t\t\tbody: await res.text(),\n\t\t});\n\t\treturn [];\n\t}\n\tconst body = (await res.json()) as { data?: InngestRun[] };\n\treturn Array.isArray(body.data) ? body.data : [];\n};\n\n/** One row for the queue UI (BullMQ-compatible shape) */\nexport type DeploymentJobRow = {\n\tid: string;\n\tname: string;\n\tdata: Record<string, unknown>;\n\ttimestamp: number;\n\tprocessedOn?: number;\n\tfinishedOn?: number;\n\tfailedReason?: string;\n\tstate: string;\n};\n\n/** Build queue rows from events + their runs (one row per run, or pending if no run yet) */\nfunction buildDeploymentRowsFromRuns(\n\tevents: InngestEventRow[],\n\trunsByEventId: Map<string, InngestRun[]>,\n\tserverId: string,\n): DeploymentJobRow[] {\n\tconst requested = events.filter(\n\t\t(e) =>\n\t\t\te.name === \"deployment/requested\" &&\n\t\t\t(e.data as Record<string, unknown>)?.serverId === serverId,\n\t);\n\tconst rows: DeploymentJobRow[] = [];\n\n\tfor (const ev of requested) {\n\t\tconst data = (ev.data ?? {}) as Record<string, unknown>;\n\t\tconst runs = runsByEventId.get(ev.id) ?? [];\n\n\t\tif (runs.length === 0) {\n\t\t\t// Queued: event received but no run yet\n\t\t\trows.push({\n\t\t\t\tid: ev.id,\n\t\t\t\tname: ev.name,\n\t\t\t\tdata,\n\t\t\t\ttimestamp: ev.ts,\n\t\t\t\tprocessedOn: ev.ts,\n\t\t\t\tfinishedOn: undefined,\n\t\t\t\tfailedReason: undefined,\n\t\t\t\tstate: \"pending\",\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\n\t\tfor (const run of runs) {\n\t\t\tconst state = runStatusToState(run.status);\n\t\t\tconst runStartedMs =\n\t\t\t\trun.run_started_at_ms ??\n\t\t\t\t(run.run_started_at ? new Date(run.run_started_at).getTime() : ev.ts);\n\t\t\tconst endedMs = run.ended_at\n\t\t\t\t? new Date(run.ended_at).getTime()\n\t\t\t\t: undefined;\n\t\t\tconst failedReason =\n\t\t\t\tstate === \"failed\" &&\n\t\t\t\trun.output &&\n\t\t\t\ttypeof run.output === \"object\" &&\n\t\t\t\t\"error\" in run.output\n\t\t\t\t\t? String((run.output as { error?: unknown }).error)\n\t\t\t\t\t: undefined;\n\n\t\t\trows.push({\n\t\t\t\tid: run.run_id,\n\t\t\t\tname: ev.name,\n\t\t\t\tdata,\n\t\t\t\ttimestamp: runStartedMs,\n\t\t\t\tprocessedOn: runStartedMs,\n\t\t\t\tfinishedOn:\n\t\t\t\t\tstate === \"completed\" || state === \"failed\" || state === \"cancelled\"\n\t\t\t\t\t\t? endedMs\n\t\t\t\t\t\t: undefined,\n\t\t\t\tfailedReason,\n\t\t\t\tstate,\n\t\t\t});\n\t\t}\n\t}\n\n\treturn rows.sort((a, b) => (b.timestamp ?? 0) - (a.timestamp ?? 0));\n}\n\n/** Fetch deployment jobs for a server: events → runs → rows (correct model: runs = jobs) */\nexport const fetchDeploymentJobs = async (\n\tserverId: string,\n): Promise<DeploymentJobRow[]> => {\n\tif (!signingKey) {\n\t\tlogger.warn(\"INNGEST_SIGNING_KEY not set, returning empty jobs list\");\n\t\treturn [];\n\t}\n\tif (!baseUrl) {\n\t\tthrow new Error(\"INNGEST_BASE_URL is required to list deployment jobs\");\n\t}\n\n\tconst events = await fetchInngestEvents();\n\n\tconst requestedForServer = events.filter(\n\t\t(e) =>\n\t\t\te.name === \"deployment/requested\" &&\n\t\t\t(e.data as Record<string, unknown>)?.serverId === serverId,\n\t);\n\t// Limit to avoid too many run fetches\n\tconst toFetch = requestedForServer.slice(0, 50);\n\tconst runsByEventId = new Map<string, InngestRun[]>();\n\n\tawait Promise.all(\n\t\ttoFetch.map(async (ev) => {\n\t\t\tconst runs = await fetchInngestRunsForEvent(ev.id);\n\t\t\trunsByEventId.set(ev.id, runs);\n\t\t}),\n\t);\n\n\treturn buildDeploymentRowsFromRuns(toFetch, runsByEventId, serverId);\n};\n"
  },
  {
    "path": "apps/api/src/utils.ts",
    "content": "import {\n\tdeployApplication,\n\tdeployCompose,\n\tdeployPreviewApplication,\n\trebuildApplication,\n\trebuildCompose,\n\trebuildPreviewApplication,\n\tupdateApplicationStatus,\n\tupdateCompose,\n\tupdatePreviewDeployment,\n} from \"@dokploy/server\";\nimport type { DeployJob } from \"./schema.js\";\n\nexport const deploy = async (job: DeployJob) => {\n\ttry {\n\t\tif (job.applicationType === \"application\") {\n\t\t\tawait updateApplicationStatus(job.applicationId, \"running\");\n\t\t\tif (job.server) {\n\t\t\t\tif (job.type === \"redeploy\") {\n\t\t\t\t\tawait rebuildApplication({\n\t\t\t\t\t\tapplicationId: job.applicationId,\n\t\t\t\t\t\ttitleLog: job.titleLog || \"Rebuild deployment\",\n\t\t\t\t\t\tdescriptionLog: job.descriptionLog || \"\",\n\t\t\t\t\t});\n\t\t\t\t} else if (job.type === \"deploy\") {\n\t\t\t\t\tawait deployApplication({\n\t\t\t\t\t\tapplicationId: job.applicationId,\n\t\t\t\t\t\ttitleLog: job.titleLog || \"Manual deployment\",\n\t\t\t\t\t\tdescriptionLog: job.descriptionLog || \"\",\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (job.applicationType === \"compose\") {\n\t\t\tawait updateCompose(job.composeId, {\n\t\t\t\tcomposeStatus: \"running\",\n\t\t\t});\n\n\t\t\tif (job.server) {\n\t\t\t\tif (job.type === \"redeploy\") {\n\t\t\t\t\tawait rebuildCompose({\n\t\t\t\t\t\tcomposeId: job.composeId,\n\t\t\t\t\t\ttitleLog: job.titleLog || \"Rebuild deployment\",\n\t\t\t\t\t\tdescriptionLog: job.descriptionLog || \"\",\n\t\t\t\t\t});\n\t\t\t\t} else if (job.type === \"deploy\") {\n\t\t\t\t\tawait deployCompose({\n\t\t\t\t\t\tcomposeId: job.composeId,\n\t\t\t\t\t\ttitleLog: job.titleLog || \"Manual deployment\",\n\t\t\t\t\t\tdescriptionLog: job.descriptionLog || \"\",\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (job.applicationType === \"application-preview\") {\n\t\t\tawait updatePreviewDeployment(job.previewDeploymentId, {\n\t\t\t\tpreviewStatus: \"running\",\n\t\t\t});\n\t\t\tif (job.server) {\n\t\t\t\tif (job.type === \"redeploy\") {\n\t\t\t\t\tawait rebuildPreviewApplication({\n\t\t\t\t\t\tapplicationId: job.applicationId,\n\t\t\t\t\t\ttitleLog: job.titleLog || \"Rebuild Preview Deployment\",\n\t\t\t\t\t\tdescriptionLog: job.descriptionLog || \"\",\n\t\t\t\t\t\tpreviewDeploymentId: job.previewDeploymentId,\n\t\t\t\t\t});\n\t\t\t\t} else if (job.type === \"deploy\") {\n\t\t\t\t\tawait deployPreviewApplication({\n\t\t\t\t\t\tapplicationId: job.applicationId,\n\t\t\t\t\t\ttitleLog: job.titleLog || \"Preview Deployment\",\n\t\t\t\t\t\tdescriptionLog: job.descriptionLog || \"\",\n\t\t\t\t\t\tpreviewDeploymentId: job.previewDeploymentId,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} catch (e) {\n\t\tif (job.applicationType === \"application\") {\n\t\t\tawait updateApplicationStatus(job.applicationId, \"error\");\n\t\t} else if (job.applicationType === \"compose\") {\n\t\t\tawait updateCompose(job.composeId, {\n\t\t\t\tcomposeStatus: \"error\",\n\t\t\t});\n\t\t} else if (job.applicationType === \"application-preview\") {\n\t\t\tawait updatePreviewDeployment(job.previewDeploymentId, {\n\t\t\t\tpreviewStatus: \"error\",\n\t\t\t});\n\t\t}\n\n\t\tthrow e;\n\t}\n\n\treturn true;\n};\n"
  },
  {
    "path": "apps/api/tsconfig.json",
    "content": "{\n\t\"compilerOptions\": {\n\t\t\"target\": \"ESNext\",\n\t\t\"module\": \"ESNext\",\n\t\t\"moduleResolution\": \"Node\",\n\t\t\"strict\": true,\n\t\t\"skipLibCheck\": true,\n\t\t\"outDir\": \"dist\",\n\t\t\"jsx\": \"react-jsx\",\n\t\t\"jsxImportSource\": \"hono/jsx\",\n\t\t\"baseUrl\": \".\",\n\t\t\"paths\": {\n\t\t\t\"@/*\": [\"./*\"],\n\t\t\t\"@dokploy/server/*\": [\"../../packages/server/src/*\"]\n\t\t}\n\t},\n\t\"exclude\": [\"node_modules\", \"dist\"]\n}\n"
  },
  {
    "path": "apps/dokploy/.dockerignore",
    "content": "node_modules\n.git\n.gitignore\n*.md\ndist"
  },
  {
    "path": "apps/dokploy/.gitignore",
    "content": "# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.\n\n# dependencies\n/node_modules\n/.pnp\n.pnp.js\n/redis-data\ntraefik.yml\n.docker\n.env.production\n\n# testing\n/coverage\n/dist\n/production-server\n# database\n/prisma/db.sqlite\n/prisma/db.sqlite-journal\n/logs\n\n# next.js\n/.next/\n/out/\nnext-env.d.ts\n/dokploy\n/config\n\n# production\n/build\n\n# misc\n.DS_Store\n*.pem\n\n# debug\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n.pnpm-debug.log*\n\n# local env files\n# do not commit any .env files to git, except for the .env.example file. https://create.t3.gg/en/usage/env-variables#using-environment-variables\n.env\n.env*.local\n\n# vercel\n.vercel\n\n# typescript\n*.tsbuildinfo\n\n# otros\n/.data\n/.main\n.vscode\n\n*.lockb\n*.rdb\n.idea\n"
  },
  {
    "path": "apps/dokploy/__test__/cluster/upload.test.ts",
    "content": "import type { Registry } from \"@dokploy/server\";\nimport { getRegistryTag } from \"@dokploy/server\";\nimport { describe, expect, it } from \"vitest\";\n\ndescribe(\"getRegistryTag\", () => {\n\t// Helper to create a mock registry\n\tconst createMockRegistry = (overrides: Partial<Registry> = {}): Registry => {\n\t\treturn {\n\t\t\tregistryId: \"test-registry-id\",\n\t\t\tregistryName: \"Test Registry\",\n\t\t\tusername: \"myuser\",\n\t\t\tpassword: \"test-password\",\n\t\t\tregistryUrl: \"docker.io\",\n\t\t\tregistryType: \"cloud\",\n\t\t\timagePrefix: null,\n\t\t\tcreatedAt: new Date().toISOString(),\n\t\t\torganizationId: \"test-org-id\",\n\t\t\t...overrides,\n\t\t};\n\t};\n\n\tdescribe(\"with username (no imagePrefix)\", () => {\n\t\tit(\"should handle simple image name without tag\", () => {\n\t\t\tconst registry = createMockRegistry({ username: \"myuser\" });\n\t\t\tconst result = getRegistryTag(registry, \"nginx\");\n\t\t\texpect(result).toBe(\"docker.io/myuser/nginx\");\n\t\t});\n\n\t\tit(\"should handle image name with tag\", () => {\n\t\t\tconst registry = createMockRegistry({ username: \"myuser\" });\n\t\t\tconst result = getRegistryTag(registry, \"nginx:latest\");\n\t\t\texpect(result).toBe(\"docker.io/myuser/nginx:latest\");\n\t\t});\n\n\t\tit(\"should handle image name with username already present (no duplication)\", () => {\n\t\t\tconst registry = createMockRegistry({ username: \"myuser\" });\n\t\t\tconst result = getRegistryTag(registry, \"myuser/myprivaterepo\");\n\t\t\t// Should not duplicate username\n\t\t\texpect(result).toBe(\"docker.io/myuser/myprivaterepo\");\n\t\t});\n\n\t\tit(\"should handle image name with username and tag already present\", () => {\n\t\t\tconst registry = createMockRegistry({ username: \"myuser\" });\n\t\t\tconst result = getRegistryTag(registry, \"myuser/myprivaterepo:latest\");\n\t\t\t// Should not duplicate username\n\t\t\texpect(result).toBe(\"docker.io/myuser/myprivaterepo:latest\");\n\t\t});\n\n\t\tit(\"should handle complex image name with username\", () => {\n\t\t\tconst registry = createMockRegistry({ username: \"siumauricio\" });\n\t\t\tconst result = getRegistryTag(\n\t\t\t\tregistry,\n\t\t\t\t\"siumauricio/app-parse-multi-byte-port-e32uh7\",\n\t\t\t);\n\t\t\t// Should not duplicate username\n\t\t\texpect(result).toBe(\n\t\t\t\t\"docker.io/siumauricio/app-parse-multi-byte-port-e32uh7\",\n\t\t\t);\n\t\t});\n\n\t\tit(\"should handle image name with different username (should not duplicate)\", () => {\n\t\t\tconst registry = createMockRegistry({ username: \"myuser\" });\n\t\t\tconst result = getRegistryTag(registry, \"otheruser/myprivaterepo\");\n\t\t\texpect(result).toBe(\"docker.io/myuser/myprivaterepo\");\n\t\t});\n\n\t\tit(\"should handle image name with full registry URL (no username)\", () => {\n\t\t\tconst registry = createMockRegistry({ username: \"myuser\" });\n\t\t\tconst result = getRegistryTag(registry, \"docker.io/nginx\");\n\t\t\t// Should add username since imageName doesn't have one\n\t\t\texpect(result).toBe(\"docker.io/myuser/nginx\");\n\t\t});\n\n\t\tit(\"should handle image name with custom registry URL and username\", () => {\n\t\t\tconst registry = createMockRegistry({ username: \"myuser\" });\n\t\t\tconst result = getRegistryTag(registry, \"ghcr.io/myuser/repo\");\n\t\t\t// Should not duplicate username even if registry URL is different\n\t\t\texpect(result).toBe(\"docker.io/myuser/repo\");\n\t\t});\n\n\t\tit(\"should handle image name with custom registry URL (different username)\", () => {\n\t\t\tconst registry = createMockRegistry({ username: \"myuser\" });\n\t\t\tconst result = getRegistryTag(registry, \"ghcr.io/otheruser/repo\");\n\t\t\t// Should use registry username, not the one in imageName\n\t\t\texpect(result).toBe(\"docker.io/myuser/repo\");\n\t\t});\n\t});\n\n\tdescribe(\"with imagePrefix\", () => {\n\t\tit(\"should use imagePrefix instead of username\", () => {\n\t\t\tconst registry = createMockRegistry({\n\t\t\t\tusername: \"myuser\",\n\t\t\t\timagePrefix: \"myorg\",\n\t\t\t});\n\t\t\tconst result = getRegistryTag(registry, \"nginx\");\n\t\t\texpect(result).toBe(\"docker.io/myorg/nginx\");\n\t\t});\n\n\t\tit(\"should use imagePrefix with image tag\", () => {\n\t\t\tconst registry = createMockRegistry({\n\t\t\t\tusername: \"myuser\",\n\t\t\t\timagePrefix: \"myorg\",\n\t\t\t});\n\t\t\tconst result = getRegistryTag(registry, \"nginx:latest\");\n\t\t\texpect(result).toBe(\"docker.io/myorg/nginx:latest\");\n\t\t});\n\n\t\tit(\"should handle imagePrefix with username already in image name\", () => {\n\t\t\tconst registry = createMockRegistry({\n\t\t\t\tusername: \"myuser\",\n\t\t\t\timagePrefix: \"myorg\",\n\t\t\t});\n\t\t\tconst result = getRegistryTag(registry, \"myuser/myprivaterepo\");\n\t\t\texpect(result).toBe(\"docker.io/myorg/myprivaterepo\");\n\t\t});\n\n\t\tit(\"should handle imagePrefix matching image name prefix\", () => {\n\t\t\tconst registry = createMockRegistry({\n\t\t\t\tusername: \"myuser\",\n\t\t\t\timagePrefix: \"myorg\",\n\t\t\t});\n\t\t\tconst result = getRegistryTag(registry, \"myorg/myprivaterepo\");\n\t\t\t// Should not duplicate prefix\n\t\t\texpect(result).toBe(\"docker.io/myorg/myprivaterepo\");\n\t\t});\n\t});\n\n\tdescribe(\"without registryUrl\", () => {\n\t\tit(\"should work without registryUrl\", () => {\n\t\t\tconst registry = createMockRegistry({\n\t\t\t\tusername: \"myuser\",\n\t\t\t\tregistryUrl: \"\",\n\t\t\t});\n\t\t\tconst result = getRegistryTag(registry, \"nginx\");\n\t\t\texpect(result).toBe(\"myuser/nginx\");\n\t\t});\n\n\t\tit(\"should work without registryUrl with imagePrefix\", () => {\n\t\t\tconst registry = createMockRegistry({\n\t\t\t\tusername: \"myuser\",\n\t\t\t\timagePrefix: \"myorg\",\n\t\t\t\tregistryUrl: \"\",\n\t\t\t});\n\t\t\tconst result = getRegistryTag(registry, \"nginx\");\n\t\t\texpect(result).toBe(\"myorg/nginx\");\n\t\t});\n\n\t\tit(\"should handle username already present without registryUrl\", () => {\n\t\t\tconst registry = createMockRegistry({\n\t\t\t\tusername: \"myuser\",\n\t\t\t\tregistryUrl: \"\",\n\t\t\t});\n\t\t\tconst result = getRegistryTag(registry, \"myuser/myprivaterepo\");\n\t\t\t// Should not duplicate username\n\t\t\texpect(result).toBe(\"myuser/myprivaterepo\");\n\t\t});\n\t});\n\n\tdescribe(\"with custom registryUrl\", () => {\n\t\tit(\"should handle custom registry URL\", () => {\n\t\t\tconst registry = createMockRegistry({\n\t\t\t\tusername: \"myuser\",\n\t\t\t\tregistryUrl: \"ghcr.io\",\n\t\t\t});\n\t\t\tconst result = getRegistryTag(registry, \"nginx\");\n\t\t\texpect(result).toBe(\"ghcr.io/myuser/nginx\");\n\t\t});\n\n\t\tit(\"should handle custom registry URL with imagePrefix\", () => {\n\t\t\tconst registry = createMockRegistry({\n\t\t\t\tusername: \"myuser\",\n\t\t\t\timagePrefix: \"myorg\",\n\t\t\t\tregistryUrl: \"ghcr.io\",\n\t\t\t});\n\t\t\tconst result = getRegistryTag(registry, \"nginx\");\n\t\t\texpect(result).toBe(\"ghcr.io/myorg/nginx\");\n\t\t});\n\n\t\tit(\"should handle custom registry URL with username already present\", () => {\n\t\t\tconst registry = createMockRegistry({\n\t\t\t\tusername: \"myuser\",\n\t\t\t\tregistryUrl: \"ghcr.io\",\n\t\t\t});\n\t\t\tconst result = getRegistryTag(registry, \"myuser/myprivaterepo\");\n\t\t\t// Should not duplicate username\n\t\t\texpect(result).toBe(\"ghcr.io/myuser/myprivaterepo\");\n\t\t});\n\t});\n\n\tdescribe(\"edge cases\", () => {\n\t\tit(\"should handle empty image name\", () => {\n\t\t\tconst registry = createMockRegistry({ username: \"myuser\" });\n\t\t\tconst result = getRegistryTag(registry, \"\");\n\t\t\texpect(result).toBe(\"docker.io/myuser/\");\n\t\t});\n\n\t\tit(\"should handle image name with multiple slashes\", () => {\n\t\t\tconst registry = createMockRegistry({ username: \"myuser\" });\n\t\t\tconst result = getRegistryTag(registry, \"org/suborg/repo\");\n\t\t\texpect(result).toBe(\"docker.io/myuser/repo\");\n\t\t});\n\n\t\tit(\"should handle image name with username at different position\", () => {\n\t\t\tconst registry = createMockRegistry({ username: \"myuser\" });\n\t\t\tconst result = getRegistryTag(registry, \"org/myuser/repo\");\n\t\t\texpect(result).toBe(\"docker.io/myuser/repo\");\n\t\t});\n\t});\n\n\tdescribe(\"special characters in username\", () => {\n\t\tit(\"should handle Harbor robot account username with $ (e.g. robot$library+dokploy)\", () => {\n\t\t\tconst registry = createMockRegistry({\n\t\t\t\tusername: \"robot$library+dokploy\",\n\t\t\t});\n\t\t\tconst result = getRegistryTag(registry, \"nginx\");\n\t\t\texpect(result).toBe(\"docker.io/robot$library+dokploy/nginx\");\n\t\t});\n\n\t\tit(\"should handle username with $ and other special characters\", () => {\n\t\t\tconst registry = createMockRegistry({\n\t\t\t\tusername: \"robot$test+app\",\n\t\t\t});\n\t\t\tconst result = getRegistryTag(registry, \"myapp:latest\");\n\t\t\texpect(result).toBe(\"docker.io/robot$test+app/myapp:latest\");\n\t\t});\n\n\t\tit(\"should handle username with multiple $ symbols\", () => {\n\t\t\tconst registry = createMockRegistry({\n\t\t\t\tusername: \"user$name$test\",\n\t\t\t});\n\t\t\tconst result = getRegistryTag(registry, \"app\");\n\t\t\texpect(result).toBe(\"docker.io/user$name$test/app\");\n\t\t});\n\n\t\tit(\"should handle username with + and - symbols\", () => {\n\t\t\tconst registry = createMockRegistry({\n\t\t\t\tusername: \"robot+test-user\",\n\t\t\t});\n\t\t\tconst result = getRegistryTag(registry, \"nginx:latest\");\n\t\t\texpect(result).toBe(\"docker.io/robot+test-user/nginx:latest\");\n\t\t});\n\t});\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/compose/compose.test.ts",
    "content": "import type { ComposeSpecification } from \"@dokploy/server\";\nimport { addSuffixToAllProperties } from \"@dokploy/server\";\nimport { expect, test } from \"vitest\";\nimport { parse } from \"yaml\";\n\nconst composeFile1 = `\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    container_name: web_container\n    depends_on:\n      - app\n    networks:\n      - frontend\n    volumes_from:\n      - data\n    links:\n      - db\n    extends:\n      service: base_service\n    configs:\n      - source: web_config\n\n  app:\n    image: node:14\n    networks:\n      - backend\n      - frontend\n\n  db:\n    image: postgres:13\n    networks:\n      - backend\n\n  data:\n    image: busybox\n    volumes:\n      - /data\n\n  base_service:\n    image: base:latest\n\nnetworks:\n  frontend:\n    driver: bridge\n  backend:\n    driver: bridge\n\nvolumes:\n  web_data:\n    driver: local\n\nconfigs:\n  web_config:\n    file: ./web_config.yml\n\nsecrets:\n  db_password:\n    file: ./db_password.txt\n`;\n\nconst expectedComposeFile1 = parse(`\nversion: \"3.8\"\n\nservices:\n  web-testhash:\n    image: nginx:latest\n    container_name: web_container-testhash\n    depends_on:\n      - app-testhash\n    networks:\n      - frontend-testhash\n    volumes_from:\n      - data-testhash\n    links:\n      - db-testhash\n    extends:\n      service: base_service-testhash\n    configs:\n      - source: web_config-testhash\n\n  app-testhash:\n    image: node:14\n    networks:\n      - backend-testhash\n      - frontend-testhash\n\n  db-testhash:\n    image: postgres:13\n    networks:\n      - backend-testhash\n\n  data-testhash:\n    image: busybox\n    volumes:\n      - /data\n\n  base_service-testhash:\n    image: base:latest\n\nnetworks:\n  frontend-testhash:\n    driver: bridge\n  backend-testhash:\n    driver: bridge\n\nvolumes:\n  web_data-testhash:\n    driver: local\n\nconfigs:\n  web_config-testhash:\n    file: ./web_config.yml\n\nsecrets:\n  db_password-testhash:\n    file: ./db_password.txt\n`) as ComposeSpecification;\n\ntest(\"Add suffix to all properties in compose file 1\", () => {\n\tconst composeData = parse(composeFile1) as ComposeSpecification;\n\tconst suffix = \"testhash\";\n\n\tconst updatedComposeData = addSuffixToAllProperties(composeData, suffix);\n\n\texpect(updatedComposeData).toEqual(expectedComposeFile1);\n});\n\nconst composeFile2 = `\nversion: \"3.8\"\n\nservices:\n  frontend:\n    image: nginx:latest\n    depends_on:\n      - backend\n    networks:\n      - public\n    volumes_from:\n      - logs\n    links:\n      - cache\n    extends:\n      service: shared_service\n    secrets:\n      - db_password\n\n  backend:\n    image: node:14\n    networks:\n      - private\n      - public\n\n  cache:\n    image: redis:latest\n    networks:\n      - private\n\n  logs:\n    image: busybox\n    volumes:\n      - /logs\n\n  shared_service:\n    image: shared:latest\n\nnetworks:\n  public:\n    driver: bridge\n  private:\n    driver: bridge\n\nvolumes:\n  logs:\n    driver: local\n\nconfigs:\n  app_config:\n    file: ./app_config.yml\n\nsecrets:\n  db_password:\n    file: ./db_password.txt\n`;\n\nconst expectedComposeFile2 = parse(`\nversion: \"3.8\"\n\nservices:\n  frontend-testhash:\n    image: nginx:latest\n    depends_on:\n      - backend-testhash\n    networks:\n      - public-testhash\n    volumes_from:\n      - logs-testhash\n    links:\n      - cache-testhash\n    extends:\n      service: shared_service-testhash\n    secrets:\n      - db_password-testhash\n\n  backend-testhash:\n    image: node:14\n    networks:\n      - private-testhash\n      - public-testhash\n\n  cache-testhash:\n    image: redis:latest\n    networks:\n      - private-testhash\n\n  logs-testhash:\n    image: busybox\n    volumes:\n      - /logs\n\n  shared_service-testhash:\n    image: shared:latest\n\nnetworks:\n  public-testhash:\n    driver: bridge\n  private-testhash:\n    driver: bridge\n\nvolumes:\n  logs-testhash:\n    driver: local\n\nconfigs:\n  app_config-testhash:\n    file: ./app_config.yml\n\nsecrets:\n  db_password-testhash:\n    file: ./db_password.txt\n`) as ComposeSpecification;\n\ntest(\"Add suffix to all properties in compose file 2\", () => {\n\tconst composeData = parse(composeFile2) as ComposeSpecification;\n\tconst suffix = \"testhash\";\n\n\tconst updatedComposeData = addSuffixToAllProperties(composeData, suffix);\n\n\texpect(updatedComposeData).toEqual(expectedComposeFile2);\n});\n\nconst composeFile3 = `\nversion: \"3.8\"\n\nservices:\n  service_a:\n    image: service_a:latest\n    depends_on:\n      - service_b\n    networks:\n      - net_a\n    volumes_from:\n      - data_volume\n    links:\n      - service_c\n    extends:\n      service: common_service\n    configs:\n      - source: service_a_config\n\n  service_b:\n    image: service_b:latest\n    networks:\n      - net_b\n      - net_a\n\n  service_c:\n    image: service_c:latest\n    networks:\n      - net_b\n\n  data_volume:\n    image: busybox\n    volumes:\n      - /data\n\n  common_service:\n    image: common:latest\n\nnetworks:\n  net_a:\n    driver: bridge\n  net_b:\n    driver: bridge\n\nvolumes:\n  data_volume:\n    driver: local\n\nconfigs:\n  service_a_config:\n    file: ./service_a_config.yml\n\nsecrets:\n  service_secret:\n    file: ./service_secret.txt\n`;\n\nconst expectedComposeFile3 = parse(`\nversion: \"3.8\"\n\nservices:\n  service_a-testhash:\n    image: service_a:latest\n    depends_on:\n      - service_b-testhash\n    networks:\n      - net_a-testhash\n    volumes_from:\n      - data_volume-testhash\n    links:\n      - service_c-testhash\n    extends:\n      service: common_service-testhash\n    configs:\n      - source: service_a_config-testhash\n\n  service_b-testhash:\n    image: service_b:latest\n    networks:\n      - net_b-testhash\n      - net_a-testhash\n\n  service_c-testhash:\n    image: service_c:latest\n    networks:\n      - net_b-testhash\n\n  data_volume-testhash:\n    image: busybox\n    volumes:\n      - /data\n\n  common_service-testhash:\n    image: common:latest\n\nnetworks:\n  net_a-testhash:\n    driver: bridge\n  net_b-testhash:\n    driver: bridge\n\nvolumes:\n  data_volume-testhash:\n    driver: local\n\nconfigs:\n  service_a_config-testhash:\n    file: ./service_a_config.yml\n\nsecrets:\n  service_secret-testhash:\n    file: ./service_secret.txt\n`) as ComposeSpecification;\n\ntest(\"Add suffix to all properties in compose file 3\", () => {\n\tconst composeData = parse(composeFile3) as ComposeSpecification;\n\tconst suffix = \"testhash\";\n\n\tconst updatedComposeData = addSuffixToAllProperties(composeData, suffix);\n\n\texpect(updatedComposeData).toEqual(expectedComposeFile3);\n});\n\nconst composeFile = `\nversion: \"3.8\"\n\nservices:\n  plausible_db:\n    image: postgres:16-alpine\n    restart: always\n    volumes:\n      - db-data:/var/lib/postgresql/data\n    environment:\n      - POSTGRES_PASSWORD=postgres\n\n  plausible_events_db:\n    image: clickhouse/clickhouse-server:24.3.3.102-alpine\n    restart: always\n    volumes:\n      - event-data:/var/lib/clickhouse\n      - event-logs:/var/log/clickhouse-server\n      - ./clickhouse/clickhouse-config.xml:/etc/clickhouse-server/config.d/logging.xml:ro\n      - ./clickhouse/clickhouse-user-config.xml:/etc/clickhouse-server/users.d/logging.xml:ro\n    ulimits:\n      nofile:\n        soft: 262144\n        hard: 262144\n\n  plausible:\n    image: ghcr.io/plausible/community-edition:v2.1.0\n    restart: always\n    command: sh -c \"sleep 10 && /entrypoint.sh db createdb && /entrypoint.sh db migrate && /entrypoint.sh run\"\n    depends_on:\n      - plausible_db\n      - plausible_events_db\n    ports:\n      - 127.0.0.1:8000:8000\n    env_file:\n      - plausible-conf.env\n\nvolumes:\n  db-data:\n    driver: local\n  event-data:\n    driver: local\n  event-logs:\n    driver: local\n`;\n\nconst expectedComposeFile = parse(`\nversion: \"3.8\"\n\nservices:\n  plausible_db-testhash:\n    image: postgres:16-alpine\n    restart: always\n    volumes:\n      - db-data-testhash:/var/lib/postgresql/data\n    environment:\n      - POSTGRES_PASSWORD=postgres\n\n  plausible_events_db-testhash:\n    image: clickhouse/clickhouse-server:24.3.3.102-alpine\n    restart: always\n    volumes:\n      - event-data-testhash:/var/lib/clickhouse\n      - event-logs-testhash:/var/log/clickhouse-server\n      - ./clickhouse/clickhouse-config.xml:/etc/clickhouse-server/config.d/logging.xml:ro\n      - ./clickhouse/clickhouse-user-config.xml:/etc/clickhouse-server/users.d/logging.xml:ro\n    ulimits:\n      nofile:\n        soft: 262144\n        hard: 262144\n\n  plausible-testhash:\n    image: ghcr.io/plausible/community-edition:v2.1.0\n    restart: always\n    command: sh -c \"sleep 10 && /entrypoint.sh db createdb && /entrypoint.sh db migrate && /entrypoint.sh run\"\n    depends_on:\n      - plausible_db-testhash\n      - plausible_events_db-testhash\n    ports:\n      - 127.0.0.1:8000:8000\n    env_file:\n      - plausible-conf.env\n\nvolumes:\n  db-data-testhash:\n    driver: local\n  event-data-testhash:\n    driver: local\n  event-logs-testhash:\n    driver: local\n`) as ComposeSpecification;\n\ntest(\"Add suffix to all properties in Plausible compose file\", () => {\n\tconst composeData = parse(composeFile) as ComposeSpecification;\n\tconst suffix = \"testhash\";\n\n\tconst updatedComposeData = addSuffixToAllProperties(composeData, suffix);\n\n\texpect(updatedComposeData).toEqual(expectedComposeFile);\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/compose/config/config-root.test.ts",
    "content": "import type { ComposeSpecification } from \"@dokploy/server\";\nimport { addSuffixToConfigsRoot, generateRandomHash } from \"@dokploy/server\";\nimport { expect, test } from \"vitest\";\nimport { parse } from \"yaml\";\n\ntest(\"Generate random hash with 8 characters\", () => {\n\tconst hash = generateRandomHash();\n\n\texpect(hash).toBeDefined();\n\texpect(hash.length).toBe(8);\n});\n\nconst composeFile = `\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n\nconfigs:\n  web-config:\n    file: ./web-config.yml\n`;\n\ntest(\"Add suffix to configs in root property\", () => {\n\tconst composeData = parse(composeFile) as ComposeSpecification;\n\n\tconst suffix = generateRandomHash();\n\n\tif (!composeData?.configs) {\n\t\treturn;\n\t}\n\tconst configs = addSuffixToConfigsRoot(composeData.configs, suffix);\n\n\texpect(configs).toBeDefined();\n\tfor (const configKey of Object.keys(configs)) {\n\t\texpect(configKey).toContain(`-${suffix}`);\n\t\texpect(configs[configKey]).toBeDefined();\n\t}\n});\n\nconst composeFileMultipleConfigs = `\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    configs:\n      - source: web-config\n        target: /etc/nginx/nginx.conf\n      - source: another-config\n        target: /etc/nginx/another.conf\n\nconfigs:\n  web-config:\n    file: ./web-config.yml\n  another-config:\n    file: ./another-config.yml\n`;\n\ntest(\"Add suffix to multiple configs in root property\", () => {\n\tconst composeData = parse(composeFileMultipleConfigs) as ComposeSpecification;\n\n\tconst suffix = generateRandomHash();\n\n\tif (!composeData?.configs) {\n\t\treturn;\n\t}\n\tconst configs = addSuffixToConfigsRoot(composeData.configs, suffix);\n\n\texpect(configs).toBeDefined();\n\tfor (const configKey of Object.keys(configs)) {\n\t\texpect(configKey).toContain(`-${suffix}`);\n\t\texpect(configs[configKey]).toBeDefined();\n\t}\n\texpect(configs).toHaveProperty(`web-config-${suffix}`);\n\texpect(configs).toHaveProperty(`another-config-${suffix}`);\n});\n\nconst composeFileDifferentProperties = `\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n\nconfigs:\n  web-config:\n    file: ./web-config.yml\n  special-config:\n    external: true\n`;\n\ntest(\"Add suffix to configs with different properties in root property\", () => {\n\tconst composeData = parse(\n\t\tcomposeFileDifferentProperties,\n\t) as ComposeSpecification;\n\n\tconst suffix = generateRandomHash();\n\n\tif (!composeData?.configs) {\n\t\treturn;\n\t}\n\tconst configs = addSuffixToConfigsRoot(composeData.configs, suffix);\n\n\texpect(configs).toBeDefined();\n\tfor (const configKey of Object.keys(configs)) {\n\t\texpect(configKey).toContain(`-${suffix}`);\n\t\texpect(configs[configKey]).toBeDefined();\n\t}\n\texpect(configs).toHaveProperty(`web-config-${suffix}`);\n\texpect(configs).toHaveProperty(`special-config-${suffix}`);\n});\n\nconst composeFileConfigRoot = `\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n\n  app:\n    image: node:latest\n\n  db:\n    image: postgres:latest\n\nconfigs:\n  web_config:\n    file: ./web-config.yml\n\n  app_config:\n    file: ./app-config.json\n\n  db_config:\n    file: ./db-config.yml\n`;\n\n// Expected compose file con el prefijo `testhash`\nconst expectedComposeFileConfigRoot = parse(`\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n\n  app:\n    image: node:latest\n\n  db:\n    image: postgres:latest\n\nconfigs:\n  web_config-testhash:\n    file: ./web-config.yml\n\n  app_config-testhash:\n    file: ./app-config.json\n\n  db_config-testhash:\n    file: ./db-config.yml\n`) as ComposeSpecification;\n\ntest(\"Add suffix to configs in root property\", () => {\n\tconst composeData = parse(composeFileConfigRoot) as ComposeSpecification;\n\n\tconst suffix = \"testhash\";\n\n\tif (!composeData?.configs) {\n\t\treturn;\n\t}\n\tconst configs = addSuffixToConfigsRoot(composeData.configs, suffix);\n\tconst updatedComposeData = { ...composeData, configs };\n\n\t// Verificar que el resultado coincide con el archivo esperado\n\texpect(updatedComposeData).toEqual(expectedComposeFileConfigRoot);\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/compose/config/config-service.test.ts",
    "content": "import type { ComposeSpecification } from \"@dokploy/server\";\nimport {\n\taddSuffixToConfigsInServices,\n\tgenerateRandomHash,\n} from \"@dokploy/server\";\nimport { expect, test } from \"vitest\";\nimport { parse } from \"yaml\";\n\nconst composeFile = `\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    configs:\n      - source: web-config\n        target: /etc/nginx/nginx.conf\n\nconfigs:\n  web-config:\n    file: ./web-config.yml\n`;\n\ntest(\"Add suffix to configs in services\", () => {\n\tconst composeData = parse(composeFile) as ComposeSpecification;\n\n\tconst suffix = generateRandomHash();\n\n\tif (!composeData?.services) {\n\t\treturn;\n\t}\n\tconst services = addSuffixToConfigsInServices(composeData.services, suffix);\n\tconst actualComposeData = { ...composeData, services };\n\n\texpect(actualComposeData.services?.web?.configs).toContainEqual({\n\t\tsource: `web-config-${suffix}`,\n\t\ttarget: \"/etc/nginx/nginx.conf\",\n\t});\n});\n\nconst composeFileSingleServiceConfig = `\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    configs:\n      - source: web-config\n        target: /etc/nginx/nginx.conf\n\nconfigs:\n  web-config:\n    file: ./web-config.yml\n`;\n\ntest(\"Add suffix to configs in services with single config\", () => {\n\tconst composeData = parse(\n\t\tcomposeFileSingleServiceConfig,\n\t) as ComposeSpecification;\n\n\tconst suffix = generateRandomHash();\n\n\tif (!composeData?.services) {\n\t\treturn;\n\t}\n\tconst services = addSuffixToConfigsInServices(composeData.services, suffix);\n\n\texpect(services).toBeDefined();\n\tfor (const serviceKey of Object.keys(services)) {\n\t\tconst serviceConfigs = services?.[serviceKey]?.configs;\n\t\tif (serviceConfigs) {\n\t\t\tfor (const config of serviceConfigs) {\n\t\t\t\tif (typeof config === \"object\") {\n\t\t\t\t\texpect(config.source).toContain(`-${suffix}`);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n});\n\nconst composeFileMultipleServicesConfigs = `\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    configs:\n      - source: web-config\n        target: /etc/nginx/nginx.conf\n      - source: common-config\n        target: /etc/nginx/common.conf\n\n  app:\n    image: node:14\n    configs:\n      - source: app-config\n        target: /usr/src/app/config.json\n      - source: common-config\n        target: /usr/src/app/common.json\n\nconfigs:\n  web-config:\n    file: ./web-config.yml\n  app-config:\n    file: ./app-config.json\n  common-config:\n    file: ./common-config.yml\n`;\n\ntest(\"Add suffix to configs in services with multiple configs\", () => {\n\tconst composeData = parse(\n\t\tcomposeFileMultipleServicesConfigs,\n\t) as ComposeSpecification;\n\n\tconst suffix = generateRandomHash();\n\n\tif (!composeData?.services) {\n\t\treturn;\n\t}\n\tconst services = addSuffixToConfigsInServices(composeData.services, suffix);\n\n\texpect(services).toBeDefined();\n\tfor (const serviceKey of Object.keys(services)) {\n\t\tconst serviceConfigs = services?.[serviceKey]?.configs;\n\t\tif (serviceConfigs) {\n\t\t\tfor (const config of serviceConfigs) {\n\t\t\t\tif (typeof config === \"object\") {\n\t\t\t\t\texpect(config.source).toContain(`-${suffix}`);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n});\n\nconst composeFileConfigServices = `\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    configs:\n      - source: web_config\n        target: /etc/nginx/nginx.conf\n\n  app:\n    image: node:latest\n    configs:\n      - source: app_config\n        target: /usr/src/app/config.json\n\n  db:\n    image: postgres:latest\n    configs:\n      - source: db_config\n        target: /etc/postgresql/postgresql.conf\n\n`;\n\n// Expected compose file con el prefijo `testhash`\nconst expectedComposeFileConfigServices = parse(`\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    configs:\n      - source: web_config-testhash\n        target: /etc/nginx/nginx.conf\n\n  app:\n    image: node:latest\n    configs:\n      - source: app_config-testhash\n        target: /usr/src/app/config.json\n\n  db:\n    image: postgres:latest\n    configs:\n      - source: db_config-testhash\n        target: /etc/postgresql/postgresql.conf\n\n`) as ComposeSpecification;\n\ntest(\"Add suffix to configs in services\", () => {\n\tconst composeData = parse(composeFileConfigServices) as ComposeSpecification;\n\n\tconst suffix = \"testhash\";\n\n\tif (!composeData?.services) {\n\t\treturn;\n\t}\n\tconst updatedComposeData = addSuffixToConfigsInServices(\n\t\tcomposeData.services,\n\t\tsuffix,\n\t);\n\tconst actualComposeData = { ...composeData, services: updatedComposeData };\n\n\texpect(actualComposeData).toEqual(expectedComposeFileConfigServices);\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/compose/config/config.test.ts",
    "content": "import type { ComposeSpecification } from \"@dokploy/server\";\nimport { addSuffixToAllConfigs, generateRandomHash } from \"@dokploy/server\";\nimport { expect, test } from \"vitest\";\nimport { parse } from \"yaml\";\n\ntest(\"Generate random hash with 8 characters\", () => {\n\tconst hash = generateRandomHash();\n\n\texpect(hash).toBeDefined();\n\texpect(hash.length).toBe(8);\n});\n\nconst composeFileCombinedConfigs = `\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    configs:\n      - source: web_config\n        target: /etc/nginx/nginx.conf\n\n  app:\n    image: node:14\n    configs:\n      - source: app_config\n        target: /usr/src/app/config.json\n\n  db:\n    image: postgres:13\n    configs:\n      - source: db_config\n        target: /etc/postgresql/postgresql.conf\n\nconfigs:\n  web_config:\n    file: ./web-config.yml\n\n  app_config:\n    file: ./app-config.json\n\n  db_config:\n    file: ./db-config.yml\n`;\n\nconst expectedComposeFileCombinedConfigs = parse(`\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    configs:\n      - source: web_config-testhash\n        target: /etc/nginx/nginx.conf\n\n  app:\n    image: node:14\n    configs:\n      - source: app_config-testhash\n        target: /usr/src/app/config.json\n\n  db:\n    image: postgres:13\n    configs:\n      - source: db_config-testhash\n        target: /etc/postgresql/postgresql.conf\n\nconfigs:\n  web_config-testhash:\n    file: ./web-config.yml\n\n  app_config-testhash:\n    file: ./app-config.json\n\n  db_config-testhash:\n    file: ./db-config.yml\n`) as ComposeSpecification;\n\ntest(\"Add suffix to all configs in root and services\", () => {\n\tconst composeData = parse(composeFileCombinedConfigs) as ComposeSpecification;\n\n\tconst suffix = \"testhash\";\n\n\tconst updatedComposeData = addSuffixToAllConfigs(composeData, suffix);\n\n\texpect(updatedComposeData).toEqual(expectedComposeFileCombinedConfigs);\n});\n\nconst composeFileWithEnvAndExternal = `\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    configs:\n      - source: web_config\n        target: /etc/nginx/nginx.conf\n    environment:\n      - NGINX_CONFIG=/etc/nginx/nginx.conf\n\n  app:\n    image: node:14\n    configs:\n      - source: app_config\n        target: /usr/src/app/config.json\n\n  db:\n    image: postgres:13\n    configs:\n      - source: db_config\n        target: /etc/postgresql/postgresql.conf\n\nconfigs:\n  web_config:\n    external: true\n\n  app_config:\n    file: ./app-config.json\n\n  db_config:\n    environment: dev\n    file: ./db-config.yml\n`;\n\nconst expectedComposeFileWithEnvAndExternal = parse(`\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    configs:\n      - source: web_config-testhash\n        target: /etc/nginx/nginx.conf\n    environment:\n      - NGINX_CONFIG=/etc/nginx/nginx.conf\n\n  app:\n    image: node:14\n    configs:\n      - source: app_config-testhash\n        target: /usr/src/app/config.json\n\n  db:\n    image: postgres:13\n    configs:\n      - source: db_config-testhash\n        target: /etc/postgresql/postgresql.conf\n\nconfigs:\n  web_config-testhash:\n    external: true\n\n  app_config-testhash:\n    file: ./app-config.json\n\n  db_config-testhash:\n    environment: dev\n    file: ./db-config.yml\n`) as ComposeSpecification;\n\ntest(\"Add suffix to configs with environment and external\", () => {\n\tconst composeData = parse(\n\t\tcomposeFileWithEnvAndExternal,\n\t) as ComposeSpecification;\n\n\tconst suffix = \"testhash\";\n\n\tconst updatedComposeData = addSuffixToAllConfigs(composeData, suffix);\n\n\texpect(updatedComposeData).toEqual(expectedComposeFileWithEnvAndExternal);\n});\n\nconst composeFileWithTemplateDriverAndLabels = `\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    configs:\n      - source: web_config\n        target: /etc/nginx/nginx.conf\n\n  app:\n    image: node:14\n    configs:\n      - source: app_config\n        target: /usr/src/app/config.json\n\nconfigs:\n  web_config:\n    file: ./web-config.yml\n    template_driver: golang\n\n  app_config:\n    file: ./app-config.json\n    labels:\n      - app=frontend\n\n  db_config:\n    file: ./db-config.yml\n`;\n\nconst expectedComposeFileWithTemplateDriverAndLabels = parse(`\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    configs:\n      - source: web_config-testhash\n        target: /etc/nginx/nginx.conf\n\n  app:\n    image: node:14\n    configs:\n      - source: app_config-testhash\n        target: /usr/src/app/config.json\n\nconfigs:\n  web_config-testhash:\n    file: ./web-config.yml\n    template_driver: golang\n\n  app_config-testhash:\n    file: ./app-config.json\n    labels:\n      - app=frontend\n\n  db_config-testhash:\n    file: ./db-config.yml\n`) as ComposeSpecification;\n\ntest(\"Add suffix to configs with template driver and labels\", () => {\n\tconst composeData = parse(\n\t\tcomposeFileWithTemplateDriverAndLabels,\n\t) as ComposeSpecification;\n\n\tconst suffix = \"testhash\";\n\n\tconst updatedComposeData = addSuffixToAllConfigs(composeData, suffix);\n\n\texpect(updatedComposeData).toEqual(\n\t\texpectedComposeFileWithTemplateDriverAndLabels,\n\t);\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/compose/domain/host-rule-format.test.ts",
    "content": "import type { Domain } from \"@dokploy/server\";\nimport { createDomainLabels } from \"@dokploy/server\";\nimport { describe, expect, it } from \"vitest\";\nimport { parse, stringify } from \"yaml\";\n\n/**\n * Regression tests for Traefik Host rule label format.\n *\n * These tests verify that the Host rule is generated with the correct format:\n * - Host(`domain.com`) - with opening and closing parentheses\n * - Host(`domain.com`) && PathPrefix(`/path`) - for path-based routing\n *\n * Issue: https://github.com/Dokploy/dokploy/issues/3161\n * The bug caused Host rules to be malformed as Host`domain.com`)\n * (missing opening parenthesis) which broke all domain routing.\n */\ndescribe(\"Host rule format regression tests\", () => {\n\tconst baseDomain: Domain = {\n\t\thost: \"example.com\",\n\t\tport: 8080,\n\t\thttps: false,\n\t\tuniqueConfigKey: 1,\n\t\tcustomCertResolver: null,\n\t\tcertificateType: \"none\",\n\t\tapplicationId: \"\",\n\t\tcomposeId: \"\",\n\t\tdomainType: \"compose\",\n\t\tserviceName: \"test-app\",\n\t\tdomainId: \"\",\n\t\tpath: \"/\",\n\t\tcreatedAt: \"\",\n\t\tpreviewDeploymentId: \"\",\n\t\tinternalPath: \"/\",\n\t\tstripPath: false,\n\t};\n\n\tdescribe(\"Host rule format validation\", () => {\n\t\tit(\"should generate Host rule with correct parentheses format\", async () => {\n\t\t\tconst labels = await createDomainLabels(\"test-app\", baseDomain, \"web\");\n\t\t\tconst ruleLabel = labels.find((l) => l.includes(\".rule=\"));\n\n\t\t\texpect(ruleLabel).toBeDefined();\n\t\t\t// Verify exact format: Host(`domain`)\n\t\t\texpect(ruleLabel).toMatch(/Host\\(`[^`]+`\\)/);\n\t\t\t// Ensure opening parenthesis is present after Host\n\t\t\texpect(ruleLabel).toContain(\"Host(`example.com`)\");\n\t\t\t// Ensure it does NOT have the malformed format\n\t\t\texpect(ruleLabel).not.toMatch(/Host`[^`]+`\\)/);\n\t\t});\n\n\t\tit(\"should generate PathPrefix with correct parentheses format\", async () => {\n\t\t\tconst labels = await createDomainLabels(\n\t\t\t\t\"test-app\",\n\t\t\t\t{ ...baseDomain, path: \"/api\" },\n\t\t\t\t\"web\",\n\t\t\t);\n\t\t\tconst ruleLabel = labels.find((l) => l.includes(\".rule=\"));\n\n\t\t\texpect(ruleLabel).toBeDefined();\n\t\t\t// Verify PathPrefix format\n\t\t\texpect(ruleLabel).toMatch(/PathPrefix\\(`[^`]+`\\)/);\n\t\t\texpect(ruleLabel).toContain(\"PathPrefix(`/api`)\");\n\t\t\t// Ensure opening parenthesis is present\n\t\t\texpect(ruleLabel).not.toMatch(/PathPrefix`[^`]+`\\)/);\n\t\t});\n\n\t\tit(\"should generate combined Host and PathPrefix with correct format\", async () => {\n\t\t\tconst labels = await createDomainLabels(\n\t\t\t\t\"test-app\",\n\t\t\t\t{ ...baseDomain, path: \"/api/v1\" },\n\t\t\t\t\"websecure\",\n\t\t\t);\n\t\t\tconst ruleLabel = labels.find((l) => l.includes(\".rule=\"));\n\n\t\t\texpect(ruleLabel).toBeDefined();\n\t\t\texpect(ruleLabel).toBe(\n\t\t\t\t\"traefik.http.routers.test-app-1-websecure.rule=Host(`example.com`) && PathPrefix(`/api/v1`)\",\n\t\t\t);\n\t\t});\n\t});\n\n\tdescribe(\"YAML serialization preserves Host rule format\", () => {\n\t\tit(\"should preserve Host rule format through YAML stringify/parse\", async () => {\n\t\t\tconst labels = await createDomainLabels(\"test-app\", baseDomain, \"web\");\n\t\t\tconst ruleLabel = labels.find((l) => l.includes(\".rule=\"));\n\n\t\t\t// Simulate compose file structure\n\t\t\tconst composeSpec = {\n\t\t\t\tservices: {\n\t\t\t\t\tmyapp: {\n\t\t\t\t\t\timage: \"nginx\",\n\t\t\t\t\t\tlabels: labels,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t};\n\n\t\t\t// Stringify to YAML\n\t\t\tconst yamlOutput = stringify(composeSpec, { lineWidth: 1000 });\n\n\t\t\t// Parse back\n\t\t\tconst parsed = parse(yamlOutput) as typeof composeSpec;\n\t\t\tconst parsedRuleLabel = parsed.services.myapp.labels.find((l: string) =>\n\t\t\t\tl.includes(\".rule=\"),\n\t\t\t);\n\n\t\t\t// Verify format is preserved\n\t\t\texpect(parsedRuleLabel).toBe(ruleLabel);\n\t\t\texpect(parsedRuleLabel).toContain(\"Host(`example.com`)\");\n\t\t\texpect(parsedRuleLabel).not.toMatch(/Host`[^`]+`\\)/);\n\t\t});\n\n\t\tit(\"should preserve complex rule format through YAML serialization\", async () => {\n\t\t\tconst labels = await createDomainLabels(\n\t\t\t\t\"test-app\",\n\t\t\t\t{ ...baseDomain, path: \"/api\", https: true },\n\t\t\t\t\"websecure\",\n\t\t\t);\n\n\t\t\tconst composeSpec = {\n\t\t\t\tservices: {\n\t\t\t\t\tmyapp: {\n\t\t\t\t\t\tlabels: labels,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t};\n\n\t\t\tconst yamlOutput = stringify(composeSpec, { lineWidth: 1000 });\n\t\t\tconst parsed = parse(yamlOutput) as typeof composeSpec;\n\t\t\tconst parsedRuleLabel = parsed.services.myapp.labels.find((l: string) =>\n\t\t\t\tl.includes(\".rule=\"),\n\t\t\t);\n\n\t\t\texpect(parsedRuleLabel).toContain(\n\t\t\t\t\"Host(`example.com`) && PathPrefix(`/api`)\",\n\t\t\t);\n\t\t});\n\t});\n\n\tdescribe(\"Edge cases for domain names\", () => {\n\t\tconst domainCases = [\n\t\t\t{ name: \"simple domain\", host: \"example.com\" },\n\t\t\t{ name: \"subdomain\", host: \"app.example.com\" },\n\t\t\t{ name: \"deep subdomain\", host: \"api.v1.app.example.com\" },\n\t\t\t{ name: \"numeric domain\", host: \"123.example.com\" },\n\t\t\t{ name: \"hyphenated domain\", host: \"my-app.example-host.com\" },\n\t\t\t{ name: \"localhost\", host: \"localhost\" },\n\t\t\t{ name: \"IP address style\", host: \"192.168.1.100\" },\n\t\t];\n\n\t\tfor (const { name, host } of domainCases) {\n\t\t\tit(`should generate correct Host rule for ${name}: ${host}`, async () => {\n\t\t\t\tconst labels = await createDomainLabels(\n\t\t\t\t\t\"test-app\",\n\t\t\t\t\t{ ...baseDomain, host },\n\t\t\t\t\t\"web\",\n\t\t\t\t);\n\t\t\t\tconst ruleLabel = labels.find((l) => l.includes(\".rule=\"));\n\n\t\t\t\texpect(ruleLabel).toBeDefined();\n\t\t\t\texpect(ruleLabel).toContain(`Host(\\`${host}\\`)`);\n\t\t\t\t// Verify parenthesis is present\n\t\t\t\texpect(ruleLabel).toMatch(\n\t\t\t\t\tnew RegExp(`Host\\\\(\\\\\\`${host.replace(/\\./g, \"\\\\.\")}\\\\\\`\\\\)`),\n\t\t\t\t);\n\t\t\t});\n\t\t}\n\t});\n\n\tdescribe(\"Multiple domains scenario\", () => {\n\t\tit(\"should generate correct format for both web and websecure entrypoints\", async () => {\n\t\t\tconst webLabels = await createDomainLabels(\"test-app\", baseDomain, \"web\");\n\t\t\tconst websecureLabels = await createDomainLabels(\n\t\t\t\t\"test-app\",\n\t\t\t\tbaseDomain,\n\t\t\t\t\"websecure\",\n\t\t\t);\n\n\t\t\tconst webRule = webLabels.find((l) => l.includes(\".rule=\"));\n\t\t\tconst websecureRule = websecureLabels.find((l) => l.includes(\".rule=\"));\n\n\t\t\t// Both should have correct format\n\t\t\texpect(webRule).toContain(\"Host(`example.com`)\");\n\t\t\texpect(websecureRule).toContain(\"Host(`example.com`)\");\n\n\t\t\t// Neither should have malformed format\n\t\t\texpect(webRule).not.toMatch(/Host`[^`]+`\\)/);\n\t\t\texpect(websecureRule).not.toMatch(/Host`[^`]+`\\)/);\n\t\t});\n\t});\n\n\tdescribe(\"Special characters in paths\", () => {\n\t\tconst pathCases = [\n\t\t\t{ name: \"simple path\", path: \"/api\" },\n\t\t\t{ name: \"nested path\", path: \"/api/v1/users\" },\n\t\t\t{ name: \"path with hyphen\", path: \"/api-v1\" },\n\t\t\t{ name: \"path with underscore\", path: \"/api_v1\" },\n\t\t];\n\n\t\tfor (const { name, path } of pathCases) {\n\t\t\tit(`should generate correct PathPrefix for ${name}: ${path}`, async () => {\n\t\t\t\tconst labels = await createDomainLabels(\n\t\t\t\t\t\"test-app\",\n\t\t\t\t\t{ ...baseDomain, path },\n\t\t\t\t\t\"web\",\n\t\t\t\t);\n\t\t\t\tconst ruleLabel = labels.find((l) => l.includes(\".rule=\"));\n\n\t\t\t\texpect(ruleLabel).toBeDefined();\n\t\t\t\texpect(ruleLabel).toContain(`PathPrefix(\\`${path}\\`)`);\n\t\t\t\t// Verify parenthesis is present\n\t\t\t\texpect(ruleLabel).not.toMatch(/PathPrefix`[^`]+`\\)/);\n\t\t\t});\n\t\t}\n\t});\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/compose/domain/labels.test.ts",
    "content": "import type { Domain } from \"@dokploy/server\";\nimport { createDomainLabels } from \"@dokploy/server\";\nimport { describe, expect, it } from \"vitest\";\n\ndescribe(\"createDomainLabels\", () => {\n\tconst appName = \"test-app\";\n\tconst baseDomain: Domain = {\n\t\thost: \"example.com\",\n\t\tport: 8080,\n\t\thttps: false,\n\t\tuniqueConfigKey: 1,\n\t\tcustomCertResolver: null,\n\t\tcertificateType: \"none\",\n\t\tapplicationId: \"\",\n\t\tcomposeId: \"\",\n\t\tdomainType: \"compose\",\n\t\tserviceName: \"test-app\",\n\t\tdomainId: \"\",\n\t\tpath: \"/\",\n\t\tcreatedAt: \"\",\n\t\tpreviewDeploymentId: \"\",\n\t\tinternalPath: \"/\",\n\t\tstripPath: false,\n\t};\n\n\tit(\"should create basic labels for web entrypoint\", async () => {\n\t\tconst labels = await createDomainLabels(appName, baseDomain, \"web\");\n\t\texpect(labels).toEqual([\n\t\t\t\"traefik.http.routers.test-app-1-web.rule=Host(`example.com`)\",\n\t\t\t\"traefik.http.routers.test-app-1-web.entrypoints=web\",\n\t\t\t\"traefik.http.services.test-app-1-web.loadbalancer.server.port=8080\",\n\t\t\t\"traefik.http.routers.test-app-1-web.service=test-app-1-web\",\n\t\t]);\n\t});\n\n\tit(\"should create labels for websecure entrypoint\", async () => {\n\t\tconst labels = await createDomainLabels(appName, baseDomain, \"websecure\");\n\t\texpect(labels).toEqual([\n\t\t\t\"traefik.http.routers.test-app-1-websecure.rule=Host(`example.com`)\",\n\t\t\t\"traefik.http.routers.test-app-1-websecure.entrypoints=websecure\",\n\t\t\t\"traefik.http.services.test-app-1-websecure.loadbalancer.server.port=8080\",\n\t\t\t\"traefik.http.routers.test-app-1-websecure.service=test-app-1-websecure\",\n\t\t]);\n\t});\n\n\tit(\"should add the path prefix if is different than / empty\", async () => {\n\t\tconst labels = await createDomainLabels(\n\t\t\tappName,\n\t\t\t{\n\t\t\t\t...baseDomain,\n\t\t\t\tpath: \"/hello\",\n\t\t\t},\n\t\t\t\"websecure\",\n\t\t);\n\n\t\texpect(labels).toEqual([\n\t\t\t\"traefik.http.routers.test-app-1-websecure.rule=Host(`example.com`) && PathPrefix(`/hello`)\",\n\t\t\t\"traefik.http.routers.test-app-1-websecure.entrypoints=websecure\",\n\t\t\t\"traefik.http.services.test-app-1-websecure.loadbalancer.server.port=8080\",\n\t\t\t\"traefik.http.routers.test-app-1-websecure.service=test-app-1-websecure\",\n\t\t]);\n\t});\n\n\tit(\"should add redirect middleware for https on web entrypoint\", async () => {\n\t\tconst httpsBaseDomain = { ...baseDomain, https: true };\n\t\tconst labels = await createDomainLabels(appName, httpsBaseDomain, \"web\");\n\t\texpect(labels).toContain(\n\t\t\t\"traefik.http.routers.test-app-1-web.middlewares=redirect-to-https@file\",\n\t\t);\n\t});\n\n\tit(\"should add Let's Encrypt configuration for websecure with letsencrypt certificate\", async () => {\n\t\tconst letsencryptDomain = {\n\t\t\t...baseDomain,\n\t\t\thttps: true,\n\t\t\tcertificateType: \"letsencrypt\" as const,\n\t\t};\n\t\tconst labels = await createDomainLabels(\n\t\t\tappName,\n\t\t\tletsencryptDomain,\n\t\t\t\"websecure\",\n\t\t);\n\t\texpect(labels).toContain(\n\t\t\t\"traefik.http.routers.test-app-1-websecure.tls.certresolver=letsencrypt\",\n\t\t);\n\t});\n\n\tit(\"should not add Let's Encrypt configuration for non-letsencrypt certificate\", async () => {\n\t\tconst nonLetsencryptDomain = {\n\t\t\t...baseDomain,\n\t\t\thttps: true,\n\t\t\tcertificateType: \"none\" as const,\n\t\t};\n\t\tconst labels = await createDomainLabels(\n\t\t\tappName,\n\t\t\tnonLetsencryptDomain,\n\t\t\t\"websecure\",\n\t\t);\n\t\texpect(labels).not.toContain(\n\t\t\t\"traefik.http.routers.test-app-1-websecure.tls.certresolver=letsencrypt\",\n\t\t);\n\t});\n\n\tit(\"should handle different ports correctly\", async () => {\n\t\tconst customPortDomain = { ...baseDomain, port: 3000 };\n\t\tconst labels = await createDomainLabels(appName, customPortDomain, \"web\");\n\t\texpect(labels).toContain(\n\t\t\t\"traefik.http.services.test-app-1-web.loadbalancer.server.port=3000\",\n\t\t);\n\t});\n\n\tit(\"should add stripPath middleware when stripPath is enabled\", async () => {\n\t\tconst stripPathDomain = {\n\t\t\t...baseDomain,\n\t\t\tpath: \"/api\",\n\t\t\tstripPath: true,\n\t\t};\n\t\tconst labels = await createDomainLabels(appName, stripPathDomain, \"web\");\n\n\t\texpect(labels).toContain(\n\t\t\t\"traefik.http.middlewares.stripprefix-test-app-1.stripprefix.prefixes=/api\",\n\t\t);\n\t\texpect(labels).toContain(\n\t\t\t\"traefik.http.routers.test-app-1-web.middlewares=stripprefix-test-app-1\",\n\t\t);\n\t});\n\n\tit(\"should add internalPath middleware when internalPath is set\", async () => {\n\t\tconst internalPathDomain = {\n\t\t\t...baseDomain,\n\t\t\tinternalPath: \"/hello\",\n\t\t};\n\t\tconst webLabels = await createDomainLabels(\n\t\t\tappName,\n\t\t\tinternalPathDomain,\n\t\t\t\"web\",\n\t\t);\n\t\tconst websecureLabels = await createDomainLabels(\n\t\t\tappName,\n\t\t\tinternalPathDomain,\n\t\t\t\"websecure\",\n\t\t);\n\n\t\t// Middleware definition should only appear in web entrypoint\n\t\texpect(webLabels).toContain(\n\t\t\t\"traefik.http.middlewares.addprefix-test-app-1.addprefix.prefix=/hello\",\n\t\t);\n\t\texpect(websecureLabels).not.toContain(\n\t\t\t\"traefik.http.middlewares.addprefix-test-app-1.addprefix.prefix=/hello\",\n\t\t);\n\n\t\t// Both routers should reference the middleware\n\t\texpect(webLabels).toContain(\n\t\t\t\"traefik.http.routers.test-app-1-web.middlewares=addprefix-test-app-1\",\n\t\t);\n\t\texpect(websecureLabels).toContain(\n\t\t\t\"traefik.http.routers.test-app-1-websecure.middlewares=addprefix-test-app-1\",\n\t\t);\n\t});\n\n\tit(\"should combine HTTPS redirect with internalPath middleware in correct order\", async () => {\n\t\tconst combinedDomain = {\n\t\t\t...baseDomain,\n\t\t\thttps: true,\n\t\t\tinternalPath: \"/hello\",\n\t\t};\n\t\tconst webLabels = await createDomainLabels(appName, combinedDomain, \"web\");\n\t\tconst websecureLabels = await createDomainLabels(\n\t\t\tappName,\n\t\t\tcombinedDomain,\n\t\t\t\"websecure\",\n\t\t);\n\n\t\t// Web entrypoint should have both middlewares with redirect first\n\t\texpect(webLabels).toContain(\n\t\t\t\"traefik.http.routers.test-app-1-web.middlewares=redirect-to-https@file,addprefix-test-app-1\",\n\t\t);\n\n\t\t// Websecure should only have the addprefix middleware\n\t\texpect(websecureLabels).toContain(\n\t\t\t\"traefik.http.routers.test-app-1-websecure.middlewares=addprefix-test-app-1\",\n\t\t);\n\n\t\t// Middleware definition should only appear once (in web)\n\t\texpect(webLabels).toContain(\n\t\t\t\"traefik.http.middlewares.addprefix-test-app-1.addprefix.prefix=/hello\",\n\t\t);\n\t\texpect(websecureLabels).not.toContain(\n\t\t\t\"traefik.http.middlewares.addprefix-test-app-1.addprefix.prefix=/hello\",\n\t\t);\n\t});\n\n\tit(\"should combine all middlewares in correct order\", async () => {\n\t\tconst fullDomain = {\n\t\t\t...baseDomain,\n\t\t\thttps: true,\n\t\t\tpath: \"/api\",\n\t\t\tstripPath: true,\n\t\t\tinternalPath: \"/hello\",\n\t\t};\n\t\tconst webLabels = await createDomainLabels(appName, fullDomain, \"web\");\n\n\t\t// Should have all middleware definitions (only in web)\n\t\texpect(webLabels).toContain(\n\t\t\t\"traefik.http.middlewares.stripprefix-test-app-1.stripprefix.prefixes=/api\",\n\t\t);\n\t\texpect(webLabels).toContain(\n\t\t\t\"traefik.http.middlewares.addprefix-test-app-1.addprefix.prefix=/hello\",\n\t\t);\n\n\t\t// Should have middlewares in correct order: redirect, stripprefix, addprefix\n\t\texpect(webLabels).toContain(\n\t\t\t\"traefik.http.routers.test-app-1-web.middlewares=redirect-to-https@file,stripprefix-test-app-1,addprefix-test-app-1\",\n\t\t);\n\t});\n\n\tit(\"should not add middleware definitions for websecure entrypoint\", async () => {\n\t\tconst internalPathDomain = {\n\t\t\t...baseDomain,\n\t\t\tpath: \"/api\",\n\t\t\tstripPath: true,\n\t\t\tinternalPath: \"/hello\",\n\t\t};\n\t\tconst websecureLabels = await createDomainLabels(\n\t\t\tappName,\n\t\t\tinternalPathDomain,\n\t\t\t\"websecure\",\n\t\t);\n\n\t\t// Should not contain any middleware definitions\n\t\texpect(websecureLabels).not.toContain(\n\t\t\t\"traefik.http.middlewares.stripprefix-test-app-1.stripprefix.prefixes=/api\",\n\t\t);\n\t\texpect(websecureLabels).not.toContain(\n\t\t\t\"traefik.http.middlewares.addprefix-test-app-1.addprefix.prefix=/hello\",\n\t\t);\n\n\t\t// But should reference the middlewares\n\t\texpect(websecureLabels).toContain(\n\t\t\t\"traefik.http.routers.test-app-1-websecure.middlewares=stripprefix-test-app-1,addprefix-test-app-1\",\n\t\t);\n\t});\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/compose/domain/network-root.test.ts",
    "content": "import { addDokployNetworkToRoot } from \"@dokploy/server\";\nimport { describe, expect, it } from \"vitest\";\n\ndescribe(\"addDokployNetworkToRoot\", () => {\n\tit(\"should create network object if networks is undefined\", () => {\n\t\tconst result = addDokployNetworkToRoot(undefined);\n\t\texpect(result).toEqual({ \"dokploy-network\": { external: true } });\n\t});\n\n\tit(\"should add network to an empty object\", () => {\n\t\tconst result = addDokployNetworkToRoot({});\n\t\texpect(result).toEqual({ \"dokploy-network\": { external: true } });\n\t});\n\n\tit(\"should not modify existing network configuration\", () => {\n\t\tconst existing = { \"dokploy-network\": { external: false } };\n\t\tconst result = addDokployNetworkToRoot(existing);\n\t\texpect(result).toEqual({ \"dokploy-network\": { external: true } });\n\t});\n\n\tit(\"should add network alongside existing networks\", () => {\n\t\tconst existing = { \"other-network\": { external: true } };\n\t\tconst result = addDokployNetworkToRoot(existing);\n\t\texpect(result).toEqual({\n\t\t\t\"other-network\": { external: true },\n\t\t\t\"dokploy-network\": { external: true },\n\t\t});\n\t});\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/compose/domain/network-service.test.ts",
    "content": "import { addDokployNetworkToService } from \"@dokploy/server\";\nimport { describe, expect, it } from \"vitest\";\n\ndescribe(\"addDokployNetworkToService\", () => {\n\tit(\"should add network to an empty array\", () => {\n\t\tconst result = addDokployNetworkToService([]);\n\t\texpect(result).toEqual([\"dokploy-network\", \"default\"]);\n\t});\n\n\tit(\"should not add duplicate network to an array\", () => {\n\t\tconst result = addDokployNetworkToService([\"dokploy-network\"]);\n\t\texpect(result).toEqual([\"dokploy-network\", \"default\"]);\n\t});\n\n\tit(\"should add network to an existing array with other networks\", () => {\n\t\tconst result = addDokployNetworkToService([\"other-network\"]);\n\t\texpect(result).toEqual([\"other-network\", \"dokploy-network\", \"default\"]);\n\t});\n\n\tit(\"should add network to an object if networks is an object\", () => {\n\t\tconst result = addDokployNetworkToService({ \"other-network\": {} });\n\t\texpect(result).toEqual({\n\t\t\t\"other-network\": {},\n\t\t\t\"dokploy-network\": {},\n\t\t\tdefault: {},\n\t\t});\n\t});\n\n\tit(\"should not duplicate default network when already present\", () => {\n\t\tconst result = addDokployNetworkToService([\"default\", \"dokploy-network\"]);\n\t\texpect(result).toEqual([\"default\", \"dokploy-network\"]);\n\t});\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/compose/network/network-root.test.ts",
    "content": "import type { ComposeSpecification } from \"@dokploy/server\";\nimport { addSuffixToNetworksRoot, generateRandomHash } from \"@dokploy/server\";\nimport { expect, test } from \"vitest\";\nimport { parse } from \"yaml\";\n\nconst composeFile = `\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    networks:\n      - frontend\n\nnetworks:\n  frontend:\n    driver: bridge\n    driver_opts:\n      com.docker.network.driver.mtu: 1200\n\n  backend:\n    driver: bridge\n    attachable: true\n\n  external_network:\n    external: true\n\n`;\n\ntest(\"Generate random hash with 8 characters\", () => {\n\tconst hash = generateRandomHash();\n\n\texpect(hash).toBeDefined();\n\texpect(hash.length).toBe(8);\n});\n\ntest(\"Add suffix to networks root property\", () => {\n\tconst composeData = parse(composeFile) as ComposeSpecification;\n\n\tconst suffix = generateRandomHash();\n\n\tif (!composeData?.networks) {\n\t\treturn;\n\t}\n\tconst networks = addSuffixToNetworksRoot(composeData.networks, suffix);\n\n\texpect(networks).toBeDefined();\n\tfor (const volumeKey of Object.keys(networks)) {\n\t\texpect(volumeKey).toContain(`-${suffix}`);\n\t}\n});\n\nconst composeFile2 = `\nversion: \"3.8\"\n\nservices:\n  app:\n    image: myapp:latest\n    networks:\n      - app_net\n\nnetworks:\n  app_net:\n    driver: bridge\n    driver_opts:\n      com.docker.network.driver.mtu: 1500\n    ipam:\n      driver: default\n      config:\n        - subnet: 172.20.0.0/16\n\n  database_net:\n    driver: overlay\n    attachable: true\n\n  monitoring_net:\n    driver: bridge\n    internal: true\n`;\n\ntest(\"Add suffix to advanced networks root property (2 TRY)\", () => {\n\tconst composeData = parse(composeFile2) as ComposeSpecification;\n\n\tconst suffix = generateRandomHash();\n\n\tif (!composeData?.networks) {\n\t\treturn;\n\t}\n\tconst networks = addSuffixToNetworksRoot(composeData.networks, suffix);\n\n\texpect(networks).toBeDefined();\n\tfor (const networkKey of Object.keys(networks)) {\n\t\texpect(networkKey).toContain(`-${suffix}`);\n\t}\n});\n\nconst composeFile3 = `\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    networks:\n      - frontend\n      - backend\n\nnetworks:\n  frontend:\n    external:\n      name: my_external_network\n\n  backend:\n    driver: bridge\n    labels:\n      - \"com.example.description=Backend network\"\n      - \"com.example.environment=production\"\n\n  external_network:\n    external: true\n`;\n\ntest(\"Add suffix to networks with external properties\", () => {\n\tconst composeData = parse(composeFile3) as ComposeSpecification;\n\n\tconst suffix = generateRandomHash();\n\n\tif (!composeData?.networks) {\n\t\treturn;\n\t}\n\tconst networks = addSuffixToNetworksRoot(composeData.networks, suffix);\n\n\texpect(networks).toBeDefined();\n\tfor (const networkKey of Object.keys(networks)) {\n\t\texpect(networkKey).toContain(`-${suffix}`);\n\t}\n});\n\nconst composeFile4 = `\nversion: \"3.8\"\n\nservices:\n  db:\n    image: postgres:13\n    networks:\n      - db_net\n\nnetworks:\n  db_net:\n    driver: bridge\n    ipam:\n      config:\n        - subnet: 192.168.1.0/24\n        - gateway: 192.168.1.1\n        - aux_addresses:\n            host1: 192.168.1.2\n            host2: 192.168.1.3\n\n  external_network:\n    external: true\n`;\n\ntest(\"Add suffix to networks with IPAM configurations\", () => {\n\tconst composeData = parse(composeFile4) as ComposeSpecification;\n\n\tconst suffix = generateRandomHash();\n\n\tif (!composeData?.networks) {\n\t\treturn;\n\t}\n\tconst networks = addSuffixToNetworksRoot(composeData.networks, suffix);\n\n\texpect(networks).toBeDefined();\n\tfor (const networkKey of Object.keys(networks)) {\n\t\texpect(networkKey).toContain(`-${suffix}`);\n\t}\n});\n\nconst composeFile5 = `\nversion: \"3.8\"\n\nservices:\n  api:\n    image: myapi:latest\n    networks:\n      - api_net\n\nnetworks:\n  api_net:\n    driver: bridge\n    options:\n      com.docker.network.bridge.name: br0\n    enable_ipv6: true\n    ipam:\n      driver: default\n      config:\n        - subnet: \"2001:db8:1::/64\"\n        - gateway: \"2001:db8:1::1\"\n\n  external_network:\n    external: true\n`;\n\ntest(\"Add suffix to networks with custom options\", () => {\n\tconst composeData = parse(composeFile5) as ComposeSpecification;\n\n\tconst suffix = generateRandomHash();\n\n\tif (!composeData?.networks) {\n\t\treturn;\n\t}\n\tconst networks = addSuffixToNetworksRoot(composeData.networks, suffix);\n\n\texpect(networks).toBeDefined();\n\tfor (const networkKey of Object.keys(networks)) {\n\t\texpect(networkKey).toContain(`-${suffix}`);\n\t}\n});\n\nconst composeFile6 = `\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    networks:\n      - frontend\n\nnetworks:\n  frontend:\n    driver: bridge\n    driver_opts:\n      com.docker.network.driver.mtu: 1200\n\n  backend:\n    driver: bridge\n    attachable: true\n\n  external_network:\n    external: true\n`;\n\n// Expected compose file with static suffix `testhash`\nconst expectedComposeFile6 = `\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    networks:\n      - frontend-testhash\n\nnetworks:\n  frontend-testhash:\n    driver: bridge\n    driver_opts:\n      com.docker.network.driver.mtu: 1200\n\n  backend-testhash:\n    driver: bridge\n    attachable: true\n\n  external_network-testhash:\n    external: true\n`;\n\ntest(\"Add suffix to networks with static suffix\", () => {\n\tconst composeData = parse(composeFile6) as ComposeSpecification;\n\n\tconst suffix = \"testhash\";\n\n\tif (!composeData?.networks) {\n\t\treturn;\n\t}\n\tconst networks = addSuffixToNetworksRoot(composeData.networks, suffix);\n\n\tconst expectedComposeData = parse(\n\t\texpectedComposeFile6,\n\t) as ComposeSpecification;\n\texpect(networks).toStrictEqual(expectedComposeData.networks);\n});\n\nconst composeFile7 = `\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    networks:\n      - dokploy-network\n\nnetworks:\n  dokploy-network:\n`;\n\ntest(\"It shoudn't add suffix to dokploy-network\", () => {\n\tconst composeData = parse(composeFile7) as ComposeSpecification;\n\n\tconst suffix = generateRandomHash();\n\n\tif (!composeData?.networks) {\n\t\treturn;\n\t}\n\tconst networks = addSuffixToNetworksRoot(composeData.networks, suffix);\n\n\texpect(networks).toBeDefined();\n\tfor (const networkKey of Object.keys(networks)) {\n\t\texpect(networkKey).toContain(\"dokploy-network\");\n\t}\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/compose/network/network-service.test.ts",
    "content": "import type { ComposeSpecification } from \"@dokploy/server\";\nimport {\n\taddSuffixToServiceNetworks,\n\tgenerateRandomHash,\n} from \"@dokploy/server\";\nimport { expect, test } from \"vitest\";\nimport { parse } from \"yaml\";\n\nconst composeFile = `\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    networks:\n      - frontend\n      - backend\n\n  api:\n    image: myapi:latest\n    networks:\n      - backend\n`;\n\ntest(\"Add suffix to networks in services\", () => {\n\tconst composeData = parse(composeFile) as ComposeSpecification;\n\n\tconst suffix = generateRandomHash();\n\n\tif (!composeData?.services) {\n\t\treturn;\n\t}\n\tconst services = addSuffixToServiceNetworks(composeData.services, suffix);\n\tconst actualComposeData = { ...composeData, services };\n\n\texpect(actualComposeData?.services?.web?.networks).toContain(\n\t\t`frontend-${suffix}`,\n\t);\n\n\texpect(actualComposeData?.services?.api?.networks).toContain(\n\t\t`backend-${suffix}`,\n\t);\n\n\tconst apiNetworks = actualComposeData?.services?.api?.networks;\n\n\texpect(apiNetworks).toBeDefined();\n\texpect(actualComposeData?.services?.api?.networks).toContain(\n\t\t`backend-${suffix}`,\n\t);\n});\n\n// Caso 2: Objeto con aliases\nconst composeFile2 = `\nversion: \"3.8\"\n\nservices:\n  api:\n    image: myapi:latest\n    networks:\n      frontend:\n        aliases:\n          - api\n\nnetworks:\n  frontend:\n    driver: bridge\n`;\n\ntest(\"Add suffix to networks in services with aliases\", () => {\n\tconst composeData = parse(composeFile2) as ComposeSpecification;\n\n\tconst suffix = generateRandomHash();\n\n\tif (!composeData?.services) {\n\t\treturn;\n\t}\n\tconst services = addSuffixToServiceNetworks(composeData.services, suffix);\n\tconst actualComposeData = { ...composeData, services };\n\n\texpect(actualComposeData.services?.api?.networks).toHaveProperty(\n\t\t`frontend-${suffix}`,\n\t);\n\n\tconst networkConfig = actualComposeData?.services?.api?.networks as {\n\t\t[key: string]: { aliases?: string[] };\n\t};\n\texpect(networkConfig[`frontend-${suffix}`]).toBeDefined();\n\texpect(networkConfig[`frontend-${suffix}`]?.aliases).toContain(\"api\");\n\n\texpect(actualComposeData.services?.api?.networks).not.toHaveProperty(\n\t\t\"frontend-ash\",\n\t);\n});\n\nconst composeFile3 = `\nversion: \"3.8\"\n\nservices:\n  redis:\n    image: redis:alpine\n    networks:\n      backend:\n\nnetworks:\n  backend:\n    driver: bridge\n`;\n\ntest(\"Add suffix to networks in services (Object with simple networks)\", () => {\n\tconst composeData = parse(composeFile3) as ComposeSpecification;\n\n\tconst suffix = generateRandomHash();\n\n\tif (!composeData?.services) {\n\t\treturn;\n\t}\n\tconst services = addSuffixToServiceNetworks(composeData.services, suffix);\n\tconst actualComposeData = { ...composeData, services };\n\n\texpect(actualComposeData.services?.redis?.networks).toHaveProperty(\n\t\t`backend-${suffix}`,\n\t);\n});\n\nconst composeFileCombined = `\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    networks:\n      - frontend\n      - backend\n\n  api:\n    image: myapi:latest\n    networks:\n      frontend:\n        aliases:\n          - api\n\n  redis:\n    image: redis:alpine\n    networks:\n      backend:\n\nnetworks:\n  frontend:\n    driver: bridge\n\n  backend:\n    driver: bridge\n`;\n\ntest(\"Add suffix to networks in services (combined case)\", () => {\n\tconst composeData = parse(composeFileCombined) as ComposeSpecification;\n\n\tconst suffix = generateRandomHash();\n\n\tif (!composeData?.services) {\n\t\treturn;\n\t}\n\tconst services = addSuffixToServiceNetworks(composeData.services, suffix);\n\tconst actualComposeData = { ...composeData, services };\n\n\t// Caso 1: ListOfStrings\n\texpect(actualComposeData.services?.web?.networks).toContain(\n\t\t`frontend-${suffix}`,\n\t);\n\texpect(actualComposeData.services?.web?.networks).toContain(\n\t\t`backend-${suffix}`,\n\t);\n\n\t// Caso 2: Objeto con aliases\n\tconst apiNetworks = actualComposeData.services?.api?.networks as {\n\t\t[key: string]: unknown;\n\t};\n\texpect(apiNetworks).toHaveProperty(`frontend-${suffix}`);\n\texpect(apiNetworks[`frontend-${suffix}`]).toBeDefined();\n\texpect(apiNetworks).not.toHaveProperty(\"frontend\");\n\n\t// Caso 3: Objeto con redes simples\n\tconst redisNetworks = actualComposeData.services?.redis?.networks;\n\texpect(redisNetworks).toHaveProperty(`backend-${suffix}`);\n\texpect(redisNetworks).not.toHaveProperty(\"backend\");\n});\n\nconst composeFile7 = `\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    networks:\n      - dokploy-network\n`;\n\ntest(\"It shoudn't add suffix to dokploy-network in services\", () => {\n\tconst composeData = parse(composeFile7) as ComposeSpecification;\n\n\tconst suffix = generateRandomHash();\n\n\tif (!composeData?.services) {\n\t\treturn;\n\t}\n\tconst networks = addSuffixToServiceNetworks(composeData.services, suffix);\n\tconst service = networks.web;\n\n\texpect(service).toBeDefined();\n\texpect(service?.networks).toContain(\"dokploy-network\");\n});\n\nconst composeFile8 = `\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    networks:\n      - frontend\n      - backend\n      - dokploy-network\n\n\n  api:\n    image: myapi:latest\n    networks:\n      frontend:\n        aliases:\n          - api\n      dokploy-network:\n        aliases:\n          - api\n  redis:\n    image: redis:alpine\n    networks:\n      dokploy-network:\n  db:\n    image: myapi:latest\n    networks:\n      dokploy-network:\n        aliases:\n          - apid\n\t\n`;\n\ntest(\"It shoudn't add suffix to dokploy-network in services multiples cases\", () => {\n\tconst composeData = parse(composeFile8) as ComposeSpecification;\n\n\tconst suffix = generateRandomHash();\n\n\tif (!composeData?.services) {\n\t\treturn;\n\t}\n\tconst networks = addSuffixToServiceNetworks(composeData.services, suffix);\n\tconst service = networks.web;\n\tconst api = networks.api;\n\tconst redis = networks.redis;\n\tconst db = networks.db;\n\n\tconst dbNetworks = db?.networks as {\n\t\t[key: string]: unknown;\n\t};\n\n\tconst apiNetworks = api?.networks as {\n\t\t[key: string]: unknown;\n\t};\n\n\texpect(service).toBeDefined();\n\texpect(service?.networks).toContain(\"dokploy-network\");\n\n\texpect(redis?.networks).toHaveProperty(\"dokploy-network\");\n\texpect(dbNetworks[\"dokploy-network\"]).toBeDefined();\n\texpect(apiNetworks[\"dokploy-network\"]).toBeDefined();\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/compose/network/network.test.ts",
    "content": "import type { ComposeSpecification } from \"@dokploy/server\";\nimport {\n\taddSuffixToAllNetworks,\n\taddSuffixToNetworksRoot,\n\taddSuffixToServiceNetworks,\n\tgenerateRandomHash,\n} from \"@dokploy/server\";\nimport { expect, test } from \"vitest\";\nimport { parse } from \"yaml\";\n\nconst composeFileCombined = `\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    networks:\n      - frontend\n      - backend\n\n  api:\n    image: myapi:latest\n    networks:\n      frontend:\n        aliases:\n          - api\n\n  redis:\n    image: redis:alpine\n    networks:\n      backend:\n\nnetworks:\n  frontend:\n    driver: bridge\n\n  backend:\n    driver: bridge\n`;\n\ntest(\"Add suffix to networks in services and root (combined case)\", () => {\n\tconst composeData = parse(composeFileCombined) as ComposeSpecification;\n\n\tconst suffix = generateRandomHash();\n\n\t// Prefijo para redes definidas en el root\n\tif (composeData.networks) {\n\t\tcomposeData.networks = addSuffixToNetworksRoot(\n\t\t\tcomposeData.networks,\n\t\t\tsuffix,\n\t\t);\n\t}\n\n\t// Prefijo para redes definidas en los servicios\n\tif (composeData.services) {\n\t\tcomposeData.services = addSuffixToServiceNetworks(\n\t\t\tcomposeData.services,\n\t\t\tsuffix,\n\t\t);\n\t}\n\n\tconst actualComposeData = { ...composeData };\n\n\t// Verificar redes en root\n\texpect(actualComposeData.networks).toHaveProperty(`frontend-${suffix}`);\n\texpect(actualComposeData.networks).toHaveProperty(`backend-${suffix}`);\n\texpect(actualComposeData.networks).not.toHaveProperty(\"frontend\");\n\texpect(actualComposeData.networks).not.toHaveProperty(\"backend\");\n\n\t// Caso 1: ListOfStrings\n\texpect(actualComposeData.services?.web?.networks).toContain(\n\t\t`frontend-${suffix}`,\n\t);\n\texpect(actualComposeData.services?.web?.networks).toContain(\n\t\t`backend-${suffix}`,\n\t);\n\n\t// Caso 2: Objeto con aliases\n\tconst apiNetworks = actualComposeData.services?.api?.networks as {\n\t\t[key: string]: { aliases?: string[] };\n\t};\n\texpect(apiNetworks).toHaveProperty(`frontend-${suffix}`);\n\texpect(apiNetworks?.[`frontend-${suffix}`]?.aliases).toContain(\"api\");\n\texpect(apiNetworks).not.toHaveProperty(\"frontend\");\n\n\t// Caso 3: Objeto con redes simples\n\tconst redisNetworks = actualComposeData.services?.redis?.networks;\n\texpect(redisNetworks).toHaveProperty(`backend-${suffix}`);\n\texpect(redisNetworks).not.toHaveProperty(\"backend\");\n});\n\nconst expectedComposeFile = parse(`\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    networks:\n      - frontend-testhash\n      - backend-testhash\n\n  api:\n    image: myapi:latest\n    networks:\n      frontend-testhash:\n        aliases:\n          - api\n\n  redis:\n    image: redis:alpine\n    networks:\n      backend-testhash:\n\nnetworks:\n  frontend-testhash:\n    driver: bridge\n\n  backend-testhash:\n    driver: bridge\n`);\n\ntest(\"Add suffix to networks in compose file\", () => {\n\tconst composeData = parse(composeFileCombined) as ComposeSpecification;\n\n\tconst suffix = \"testhash\";\n\tif (!composeData?.networks) {\n\t\treturn;\n\t}\n\tconst updatedComposeData = addSuffixToAllNetworks(composeData, suffix);\n\n\texpect(updatedComposeData).toEqual(expectedComposeFile);\n});\n\nconst composeFile2 = `\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    networks:\n      - frontend\n      - backend\n\n  db:\n    image: postgres:latest\n    networks:\n      backend:\n        aliases:\n          - db\n\nnetworks:\n  frontend:\n    external: true\n\n  backend:\n    driver: bridge\n`;\n\nconst expectedComposeFile2 = parse(`\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    networks:\n      - frontend-testhash\n      - backend-testhash\n\n  db:\n    image: postgres:latest\n    networks:\n      backend-testhash:\n        aliases:\n          - db\n\nnetworks:\n  frontend-testhash:\n    external: true\n\n  backend-testhash:\n    driver: bridge\n`);\n\ntest(\"Add suffix to networks in compose file with external and internal networks\", () => {\n\tconst composeData = parse(composeFile2) as ComposeSpecification;\n\n\tconst suffix = \"testhash\";\n\tconst updatedComposeData = addSuffixToAllNetworks(composeData, suffix);\n\n\texpect(updatedComposeData).toEqual(expectedComposeFile2);\n});\n\nconst composeFile3 = `\nversion: \"3.8\"\n\nservices:\n  app:\n    image: myapp:latest\n    networks:\n      frontend:\n        aliases:\n          - app\n      backend:\n\n  worker:\n    image: worker:latest\n    networks:\n      - backend\n\nnetworks:\n  frontend:\n    driver: bridge\n    attachable: true\n\n  backend:\n    driver: bridge\n    driver_opts:\n      com.docker.network.bridge.enable_icc: \"true\"\n`;\n\nconst expectedComposeFile3 = parse(`\nversion: \"3.8\"\n\nservices:\n  app:\n    image: myapp:latest\n    networks:\n      frontend-testhash:\n        aliases:\n          - app\n      backend-testhash:\n\n  worker:\n    image: worker:latest\n    networks:\n      - backend-testhash\n\nnetworks:\n  frontend-testhash:\n    driver: bridge\n    attachable: true\n\n  backend-testhash:\n    driver: bridge\n    driver_opts:\n      com.docker.network.bridge.enable_icc: \"true\"\n`);\n\ntest(\"Add suffix to networks in compose file with multiple services and complex network configurations\", () => {\n\tconst composeData = parse(composeFile3) as ComposeSpecification;\n\n\tconst suffix = \"testhash\";\n\tconst updatedComposeData = addSuffixToAllNetworks(composeData, suffix);\n\n\texpect(updatedComposeData).toEqual(expectedComposeFile3);\n});\n\nconst composeFile4 = `\nversion: \"3.8\"\n\nservices:\n  app:\n    image: myapp:latest\n    networks:\n      frontend:\n        aliases:\n          - app\n      backend:\n      dokploy-network:\n\n  worker:\n    image: worker:latest\n    networks:\n      - backend\n      - dokploy-network\n\nnetworks:\n  frontend:\n    driver: bridge\n    attachable: true\n\n  backend:\n    driver: bridge\n    driver_opts:\n      com.docker.network.bridge.enable_icc: \"true\"\n\n  dokploy-network:\n    driver: bridge\n\n`;\n\nconst expectedComposeFile4 = parse(`\nversion: \"3.8\"\n\nservices:\n  app:\n    image: myapp:latest\n    networks:\n      frontend-testhash:\n        aliases:\n          - app\n      backend-testhash:\n      dokploy-network:\n\n  worker:\n    image: worker:latest\n    networks:\n      - backend-testhash\n      - dokploy-network\n\nnetworks:\n  frontend-testhash:\n    driver: bridge\n    attachable: true\n\n  backend-testhash:\n    driver: bridge\n    driver_opts:\n      com.docker.network.bridge.enable_icc: \"true\"\n  \n  dokploy-network:\n    driver: bridge\n\n\n  \n`);\n\ntest(\"Expect don't add suffix to dokploy-network in compose file with multiple services and complex network configurations\", () => {\n\tconst composeData = parse(composeFile4) as ComposeSpecification;\n\n\tconst suffix = \"testhash\";\n\tconst updatedComposeData = addSuffixToAllNetworks(composeData, suffix);\n\texpect(updatedComposeData).toEqual(expectedComposeFile4);\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/compose/secrets/secret-root.test.ts",
    "content": "import type { ComposeSpecification } from \"@dokploy/server\";\nimport { addSuffixToSecretsRoot, generateRandomHash } from \"@dokploy/server\";\nimport { expect, test } from \"vitest\";\nimport { parse } from \"yaml\";\n\ntest(\"Generate random hash with 8 characters\", () => {\n\tconst hash = generateRandomHash();\n\n\texpect(hash).toBeDefined();\n\texpect(hash.length).toBe(8);\n});\n\nconst composeFileSecretsRoot = `\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n\nsecrets:\n  db_password:\n    file: ./db_password.txt\n`;\n\ntest(\"Add suffix to secrets in root property\", () => {\n\tconst composeData = parse(composeFileSecretsRoot) as ComposeSpecification;\n\tconst suffix = generateRandomHash();\n\n\tif (!composeData?.secrets) {\n\t\treturn;\n\t}\n\tconst secrets = addSuffixToSecretsRoot(composeData.secrets, suffix);\n\texpect(secrets).toBeDefined();\n\tif (secrets) {\n\t\tfor (const secretKey of Object.keys(secrets)) {\n\t\t\texpect(secretKey).toContain(`-${suffix}`);\n\t\t\texpect(secrets[secretKey]).toBeDefined();\n\t\t}\n\t}\n});\n\nconst composeFileSecretsRoot1 = `\nversion: \"3.8\"\n\nservices:\n  api:\n    image: myapi:latest\n\nsecrets:\n  api_key:\n    file: ./api_key.txt\n`;\n\ntest(\"Add suffix to secrets in root property (Test 1)\", () => {\n\tconst composeData = parse(composeFileSecretsRoot1) as ComposeSpecification;\n\tconst suffix = generateRandomHash();\n\n\tif (!composeData?.secrets) {\n\t\treturn;\n\t}\n\tconst secrets = addSuffixToSecretsRoot(composeData.secrets, suffix);\n\texpect(secrets).toBeDefined();\n\n\tif (secrets) {\n\t\tfor (const secretKey of Object.keys(secrets)) {\n\t\t\texpect(secretKey).toContain(`-${suffix}`);\n\t\t\texpect(secrets[secretKey]).toBeDefined();\n\t\t}\n\t}\n});\n\nconst composeFileSecretsRoot2 = `\nversion: \"3.8\"\n\nservices:\n  frontend:\n    image: nginx:latest\n\nsecrets:\n  frontend_secret:\n    file: ./frontend_secret.txt\n  db_password:\n    external: true\n`;\n\ntest(\"Add suffix to secrets in root property (Test 2)\", () => {\n\tconst composeData = parse(composeFileSecretsRoot2) as ComposeSpecification;\n\tconst suffix = generateRandomHash();\n\n\tif (!composeData?.secrets) {\n\t\treturn;\n\t}\n\tconst secrets = addSuffixToSecretsRoot(composeData.secrets, suffix);\n\texpect(secrets).toBeDefined();\n\n\tif (secrets) {\n\t\tfor (const secretKey of Object.keys(secrets)) {\n\t\t\texpect(secretKey).toContain(`-${suffix}`);\n\t\t\texpect(secrets[secretKey]).toBeDefined();\n\t\t}\n\t}\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/compose/secrets/secret-services.test.ts",
    "content": "import type { ComposeSpecification } from \"@dokploy/server\";\nimport {\n\taddSuffixToSecretsInServices,\n\tgenerateRandomHash,\n} from \"@dokploy/server\";\nimport { expect, test } from \"vitest\";\nimport { parse } from \"yaml\";\n\nconst composeFileSecretsServices = `\nversion: \"3.8\"\n\nservices:\n  db:\n    image: postgres:latest\n    secrets:\n      - db_password\n\nsecrets:\n  db_password:\n    file: ./db_password.txt\n`;\n\ntest(\"Add suffix to secrets in services\", () => {\n\tconst composeData = parse(composeFileSecretsServices) as ComposeSpecification;\n\tconst suffix = generateRandomHash();\n\n\tif (!composeData.services) {\n\t\treturn;\n\t}\n\n\tconst updatedComposeData = addSuffixToSecretsInServices(\n\t\tcomposeData.services,\n\t\tsuffix,\n\t);\n\tconst actualComposeData = { ...composeData, services: updatedComposeData };\n\n\texpect(actualComposeData.services?.db?.secrets).toContain(\n\t\t`db_password-${suffix}`,\n\t);\n});\n\nconst composeFileSecretsServices1 = `\nversion: \"3.8\"\n\nservices:\n  app:\n    image: node:14\n    secrets:\n      - app_secret\n\nsecrets:\n  app_secret:\n    file: ./app_secret.txt\n`;\n\ntest(\"Add suffix to secrets in services (Test 1)\", () => {\n\tconst composeData = parse(\n\t\tcomposeFileSecretsServices1,\n\t) as ComposeSpecification;\n\tconst suffix = generateRandomHash();\n\n\tif (!composeData.services) {\n\t\treturn;\n\t}\n\n\tconst updatedComposeData = addSuffixToSecretsInServices(\n\t\tcomposeData.services,\n\t\tsuffix,\n\t);\n\tconst actualComposeData = { ...composeData, services: updatedComposeData };\n\n\texpect(actualComposeData.services?.app?.secrets).toContain(\n\t\t`app_secret-${suffix}`,\n\t);\n});\n\nconst composeFileSecretsServices2 = `\nversion: \"3.8\"\n\nservices:\n  backend:\n    image: backend:latest\n    secrets:\n      - backend_secret\n  frontend:\n    image: frontend:latest\n    secrets:\n      - frontend_secret\n\nsecrets:\n  backend_secret:\n    file: ./backend_secret.txt\n  frontend_secret:\n    file: ./frontend_secret.txt\n`;\n\ntest(\"Add suffix to secrets in services (Test 2)\", () => {\n\tconst composeData = parse(\n\t\tcomposeFileSecretsServices2,\n\t) as ComposeSpecification;\n\tconst suffix = generateRandomHash();\n\n\tif (!composeData.services) {\n\t\treturn;\n\t}\n\n\tconst updatedComposeData = addSuffixToSecretsInServices(\n\t\tcomposeData.services,\n\t\tsuffix,\n\t);\n\tconst actualComposeData = { ...composeData, services: updatedComposeData };\n\n\texpect(actualComposeData.services?.backend?.secrets).toContain(\n\t\t`backend_secret-${suffix}`,\n\t);\n\texpect(actualComposeData.services?.frontend?.secrets).toContain(\n\t\t`frontend_secret-${suffix}`,\n\t);\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/compose/secrets/secret.test.ts",
    "content": "import type { ComposeSpecification } from \"@dokploy/server\";\nimport { addSuffixToAllSecrets } from \"@dokploy/server\";\nimport { expect, test } from \"vitest\";\nimport { parse } from \"yaml\";\n\nconst composeFileCombinedSecrets = `\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    secrets:\n      - web_secret\n\n  app:\n    image: node:14\n    secrets:\n      - app_secret\n\nsecrets:\n  web_secret:\n    file: ./web_secret.txt\n\n  app_secret:\n    file: ./app_secret.txt\n`;\n\nconst expectedComposeFileCombinedSecrets = parse(`\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    secrets:\n      - web_secret-testhash\n\n  app:\n    image: node:14\n    secrets:\n      - app_secret-testhash\n\nsecrets:\n  web_secret-testhash:\n    file: ./web_secret.txt\n\n  app_secret-testhash:\n    file: ./app_secret.txt\n`) as ComposeSpecification;\n\ntest(\"Add suffix to all secrets\", () => {\n\tconst composeData = parse(composeFileCombinedSecrets) as ComposeSpecification;\n\tconst suffix = \"testhash\";\n\n\tconst updatedComposeData = addSuffixToAllSecrets(composeData, suffix);\n\n\texpect(updatedComposeData).toEqual(expectedComposeFileCombinedSecrets);\n});\n\nconst composeFileCombinedSecrets3 = `\nversion: \"3.8\"\n\nservices:\n  api:\n    image: myapi:latest\n    secrets:\n      - api_key\n\n  cache:\n    image: redis:latest\n    secrets:\n      - cache_secret\n\nsecrets:\n  api_key:\n    file: ./api_key.txt\n  cache_secret:\n    file: ./cache_secret.txt\n`;\n\nconst expectedComposeFileCombinedSecrets3 = parse(`\nversion: \"3.8\"\n\nservices:\n  api:\n    image: myapi:latest\n    secrets:\n      - api_key-testhash\n\n  cache:\n    image: redis:latest\n    secrets:\n      - cache_secret-testhash\n\nsecrets:\n  api_key-testhash:\n    file: ./api_key.txt\n  cache_secret-testhash:\n    file: ./cache_secret.txt\n`) as ComposeSpecification;\n\ntest(\"Add suffix to all secrets (3rd Case)\", () => {\n\tconst composeData = parse(\n\t\tcomposeFileCombinedSecrets3,\n\t) as ComposeSpecification;\n\tconst suffix = \"testhash\";\n\n\tconst updatedComposeData = addSuffixToAllSecrets(composeData, suffix);\n\n\texpect(updatedComposeData).toEqual(expectedComposeFileCombinedSecrets3);\n});\n\nconst composeFileCombinedSecrets4 = `\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    secrets:\n      - web_secret\n\n  db:\n    image: postgres:latest\n    secrets:\n      - db_password\n\nsecrets:\n  web_secret:\n    file: ./web_secret.txt\n  db_password:\n    file: ./db_password.txt\n`;\n\nconst expectedComposeFileCombinedSecrets4 = parse(`\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    secrets:\n      - web_secret-testhash\n\n  db:\n    image: postgres:latest\n    secrets:\n      - db_password-testhash\n\nsecrets:\n  web_secret-testhash:\n    file: ./web_secret.txt\n  db_password-testhash:\n    file: ./db_password.txt\n`) as ComposeSpecification;\n\ntest(\"Add suffix to all secrets (4th Case)\", () => {\n\tconst composeData = parse(\n\t\tcomposeFileCombinedSecrets4,\n\t) as ComposeSpecification;\n\tconst suffix = \"testhash\";\n\n\tconst updatedComposeData = addSuffixToAllSecrets(composeData, suffix);\n\n\texpect(updatedComposeData).toEqual(expectedComposeFileCombinedSecrets4);\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/compose/service/service-container-name.test.ts",
    "content": "import type { ComposeSpecification } from \"@dokploy/server\";\nimport { addSuffixToServiceNames, generateRandomHash } from \"@dokploy/server\";\nimport { expect, test } from \"vitest\";\nimport { parse } from \"yaml\";\n\nconst composeFile = `\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    container_name: web_container\n\n  api:\n    image: myapi:latest\n\nnetworks:\n  default:\n    driver: bridge\n`;\n\ntest(\"Generate random hash with 8 characters\", () => {\n\tconst hash = generateRandomHash();\n\n\texpect(hash).toBeDefined();\n\texpect(hash.length).toBe(8);\n});\n\ntest(\"Add suffix to service names with container_name in compose file\", () => {\n\tconst composeData = parse(composeFile) as ComposeSpecification;\n\n\tconst suffix = generateRandomHash();\n\n\tif (!composeData.services) {\n\t\treturn;\n\t}\n\tconst updatedComposeData = addSuffixToServiceNames(\n\t\tcomposeData.services,\n\t\tsuffix,\n\t);\n\tconst actualComposeData = { ...composeData, services: updatedComposeData };\n\n\t// Verificar que el nombre del contenedor ha cambiado correctamente\n\texpect(actualComposeData.services?.[`web-${suffix}`]?.container_name).toBe(\n\t\t`web_container-${suffix}`,\n\t);\n\t// Verificar que la nueva clave del servicio tiene el prefijo y la vieja clave no existe\n\texpect(actualComposeData.services).toHaveProperty(`web-${suffix}`);\n\texpect(actualComposeData.services).not.toHaveProperty(\"web\");\n\n\t// Verificar que la configuración de la imagen sigue igual\n\texpect(actualComposeData.services?.[`web-${suffix}`]?.image).toBe(\n\t\t\"nginx:latest\",\n\t);\n\texpect(actualComposeData.services?.[`api-${suffix}`]?.image).toBe(\n\t\t\"myapi:latest\",\n\t);\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/compose/service/service-depends-on.test.ts",
    "content": "import type { ComposeSpecification } from \"@dokploy/server\";\nimport { addSuffixToServiceNames, generateRandomHash } from \"@dokploy/server\";\nimport { expect, test } from \"vitest\";\nimport { parse } from \"yaml\";\n\ntest(\"Generate random hash with 8 characters\", () => {\n\tconst hash = generateRandomHash();\n\n\texpect(hash).toBeDefined();\n\texpect(hash.length).toBe(8);\n});\n\nconst composeFile4 = `\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    depends_on:\n      - db\n      - api\n\n  api:\n    image: myapi:latest\n\n  db:\n    image: postgres:latest\n\nnetworks:\n  default:\n    driver: bridge\n`;\n\ntest(\"Add suffix to service names with depends_on (array) in compose file\", () => {\n\tconst composeData = parse(composeFile4) as ComposeSpecification;\n\n\tconst suffix = generateRandomHash();\n\n\tif (!composeData.services) {\n\t\treturn;\n\t}\n\tconst updatedComposeData = addSuffixToServiceNames(\n\t\tcomposeData.services,\n\t\tsuffix,\n\t);\n\tconst actualComposeData = { ...composeData, services: updatedComposeData };\n\n\t// Verificar que la nueva clave del servicio tiene el prefijo y la vieja clave no existe\n\texpect(actualComposeData.services).toHaveProperty(`web-${suffix}`);\n\texpect(actualComposeData.services).not.toHaveProperty(\"web\");\n\n\t// Verificar que la configuración de la imagen sigue igual\n\texpect(actualComposeData.services?.[`web-${suffix}`]?.image).toBe(\n\t\t\"nginx:latest\",\n\t);\n\texpect(actualComposeData.services?.[`api-${suffix}`]?.image).toBe(\n\t\t\"myapi:latest\",\n\t);\n\n\t// Verificar que los nombres en depends_on tienen el prefijo\n\texpect(actualComposeData.services?.[`web-${suffix}`]?.depends_on).toContain(\n\t\t`db-${suffix}`,\n\t);\n\texpect(actualComposeData.services?.[`web-${suffix}`]?.depends_on).toContain(\n\t\t`api-${suffix}`,\n\t);\n\n\t// Verificar que los servicios `db` y `api` también tienen el prefijo\n\texpect(actualComposeData.services).toHaveProperty(`db-${suffix}`);\n\texpect(actualComposeData.services).not.toHaveProperty(\"db\");\n\texpect(actualComposeData.services?.[`db-${suffix}`]?.image).toBe(\n\t\t\"postgres:latest\",\n\t);\n\texpect(actualComposeData.services).toHaveProperty(`api-${suffix}`);\n\texpect(actualComposeData.services).not.toHaveProperty(\"api\");\n\texpect(actualComposeData.services?.[`api-${suffix}`]?.image).toBe(\n\t\t\"myapi:latest\",\n\t);\n});\n\nconst composeFile5 = `\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    depends_on:\n      db:\n        condition: service_healthy\n      api:\n        condition: service_started\n\n  api:\n    image: myapi:latest\n\n  db:\n    image: postgres:latest\n\nnetworks:\n  default:\n    driver: bridge\n`;\n\ntest(\"Add suffix to service names with depends_on (object) in compose file\", () => {\n\tconst composeData = parse(composeFile5) as ComposeSpecification;\n\n\tconst suffix = generateRandomHash();\n\n\tif (!composeData.services) {\n\t\treturn;\n\t}\n\tconst updatedComposeData = addSuffixToServiceNames(\n\t\tcomposeData.services,\n\t\tsuffix,\n\t);\n\tconst actualComposeData = { ...composeData, services: updatedComposeData };\n\n\t// Verificar que la nueva clave del servicio tiene el prefijo y la vieja clave no existe\n\texpect(actualComposeData.services).toHaveProperty(`web-${suffix}`);\n\texpect(actualComposeData.services).not.toHaveProperty(\"web\");\n\n\t// Verificar que la configuración de la imagen sigue igual\n\texpect(actualComposeData.services?.[`web-${suffix}`]?.image).toBe(\n\t\t\"nginx:latest\",\n\t);\n\texpect(actualComposeData.services?.[`api-${suffix}`]?.image).toBe(\n\t\t\"myapi:latest\",\n\t);\n\n\t// Verificar que los nombres en depends_on tienen el prefijo\n\tconst webDependsOn = actualComposeData.services?.[`web-${suffix}`]\n\t\t?.depends_on as Record<string, any>;\n\texpect(webDependsOn).toHaveProperty(`db-${suffix}`);\n\texpect(webDependsOn).toHaveProperty(`api-${suffix}`);\n\texpect(webDependsOn[`db-${suffix}`].condition).toBe(\"service_healthy\");\n\texpect(webDependsOn[`api-${suffix}`].condition).toBe(\"service_started\");\n\n\t// Verificar que los servicios `db` y `api` también tienen el prefijo\n\texpect(actualComposeData.services).toHaveProperty(`db-${suffix}`);\n\texpect(actualComposeData.services).not.toHaveProperty(\"db\");\n\texpect(actualComposeData.services?.[`db-${suffix}`]?.image).toBe(\n\t\t\"postgres:latest\",\n\t);\n\texpect(actualComposeData.services).toHaveProperty(`api-${suffix}`);\n\texpect(actualComposeData.services).not.toHaveProperty(\"api\");\n\texpect(actualComposeData.services?.[`api-${suffix}`]?.image).toBe(\n\t\t\"myapi:latest\",\n\t);\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/compose/service/service-extends.test.ts",
    "content": "import type { ComposeSpecification } from \"@dokploy/server\";\nimport { addSuffixToServiceNames, generateRandomHash } from \"@dokploy/server\";\nimport { expect, test } from \"vitest\";\nimport { parse } from \"yaml\";\n\ntest(\"Generate random hash with 8 characters\", () => {\n\tconst hash = generateRandomHash();\n\n\texpect(hash).toBeDefined();\n\texpect(hash.length).toBe(8);\n});\n\nconst composeFile6 = `\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    extends: base_service\n\n  api:\n    image: myapi:latest\n\n  base_service:\n    image: base:latest\n\nnetworks:\n  default:\n    driver: bridge\n`;\n\ntest(\"Add suffix to service names with extends (string) in compose file\", () => {\n\tconst composeData = parse(composeFile6) as ComposeSpecification;\n\n\tconst suffix = generateRandomHash();\n\n\tif (!composeData.services) {\n\t\treturn;\n\t}\n\tconst updatedComposeData = addSuffixToServiceNames(\n\t\tcomposeData.services,\n\t\tsuffix,\n\t);\n\tconst actualComposeData = { ...composeData, services: updatedComposeData };\n\n\t// Verificar que la nueva clave del servicio tiene el prefijo y la vieja clave no existe\n\texpect(actualComposeData.services).toHaveProperty(`web-${suffix}`);\n\texpect(actualComposeData.services).not.toHaveProperty(\"web\");\n\n\t// Verificar que la configuración de la imagen sigue igual\n\texpect(actualComposeData.services?.[`web-${suffix}`]?.image).toBe(\n\t\t\"nginx:latest\",\n\t);\n\texpect(actualComposeData.services?.[`api-${suffix}`]?.image).toBe(\n\t\t\"myapi:latest\",\n\t);\n\n\t// Verificar que el nombre en extends tiene el prefijo\n\texpect(actualComposeData.services?.[`web-${suffix}`]?.extends).toBe(\n\t\t`base_service-${suffix}`,\n\t);\n\n\t// Verificar que el servicio `base_service` también tiene el prefijo\n\texpect(actualComposeData.services).toHaveProperty(`base_service-${suffix}`);\n\texpect(actualComposeData.services).not.toHaveProperty(\"base_service\");\n\texpect(actualComposeData.services?.[`base_service-${suffix}`]?.image).toBe(\n\t\t\"base:latest\",\n\t);\n});\n\nconst composeFile7 = `\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    extends:\n      service: base_service\n      file: docker-compose.base.yml\n\n  api:\n    image: myapi:latest\n\n  base_service:\n    image: base:latest\n\nnetworks:\n  default:\n    driver: bridge\n`;\n\ntest(\"Add suffix to service names with extends (object) in compose file\", () => {\n\tconst composeData = parse(composeFile7) as ComposeSpecification;\n\n\tconst suffix = generateRandomHash();\n\n\tif (!composeData.services) {\n\t\treturn;\n\t}\n\tconst updatedComposeData = addSuffixToServiceNames(\n\t\tcomposeData.services,\n\t\tsuffix,\n\t);\n\tconst actualComposeData = { ...composeData, services: updatedComposeData };\n\n\t// Verificar que la nueva clave del servicio tiene el prefijo y la vieja clave no existe\n\texpect(actualComposeData.services).toHaveProperty(`web-${suffix}`);\n\texpect(actualComposeData.services).not.toHaveProperty(\"web\");\n\n\t// Verificar que la configuración de la imagen sigue igual\n\texpect(actualComposeData.services?.[`web-${suffix}`]?.image).toBe(\n\t\t\"nginx:latest\",\n\t);\n\texpect(actualComposeData.services?.[`api-${suffix}`]?.image).toBe(\n\t\t\"myapi:latest\",\n\t);\n\n\t// Verificar que el nombre en extends.service tiene el prefijo\n\tconst webExtends = actualComposeData.services?.[`web-${suffix}`]?.extends;\n\tif (typeof webExtends !== \"string\") {\n\t\texpect(webExtends?.service).toBe(`base_service-${suffix}`);\n\t}\n\n\t// Verificar que el servicio `base_service` también tiene el prefijo\n\texpect(actualComposeData.services).toHaveProperty(`base_service-${suffix}`);\n\texpect(actualComposeData.services).not.toHaveProperty(\"base_service\");\n\texpect(actualComposeData.services?.[`base_service-${suffix}`]?.image).toBe(\n\t\t\"base:latest\",\n\t);\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/compose/service/service-links.test.ts",
    "content": "import type { ComposeSpecification } from \"@dokploy/server\";\nimport { addSuffixToServiceNames, generateRandomHash } from \"@dokploy/server\";\nimport { expect, test } from \"vitest\";\nimport { parse } from \"yaml\";\n\ntest(\"Generate random hash with 8 characters\", () => {\n\tconst hash = generateRandomHash();\n\n\texpect(hash).toBeDefined();\n\texpect(hash.length).toBe(8);\n});\n\nconst composeFile2 = `\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    links:\n      - db\n\n  api:\n    image: myapi:latest\n\n  db:\n    image: postgres:latest\n\nnetworks:\n  default:\n    driver: bridge\n`;\n\ntest(\"Add suffix to service names with links in compose file\", () => {\n\tconst composeData = parse(composeFile2) as ComposeSpecification;\n\n\tconst suffix = generateRandomHash();\n\n\tif (!composeData.services) {\n\t\treturn;\n\t}\n\tconst updatedComposeData = addSuffixToServiceNames(\n\t\tcomposeData.services,\n\t\tsuffix,\n\t);\n\tconst actualComposeData = { ...composeData, services: updatedComposeData };\n\n\t// Verificar que la nueva clave del servicio tiene el prefijo y la vieja clave no existe\n\texpect(actualComposeData.services).toHaveProperty(`web-${suffix}`);\n\texpect(actualComposeData.services).not.toHaveProperty(\"web\");\n\n\t// Verificar que la configuración de la imagen sigue igual\n\texpect(actualComposeData.services?.[`web-${suffix}`]?.image).toBe(\n\t\t\"nginx:latest\",\n\t);\n\texpect(actualComposeData.services?.[`api-${suffix}`]?.image).toBe(\n\t\t\"myapi:latest\",\n\t);\n\n\t// Verificar que los nombres en links tienen el prefijo\n\texpect(actualComposeData.services?.[`web-${suffix}`]?.links).toContain(\n\t\t`db-${suffix}`,\n\t);\n\n\t// Verificar que los servicios `db` y `api` también tienen el prefijo\n\texpect(actualComposeData.services).toHaveProperty(`db-${suffix}`);\n\texpect(actualComposeData.services).not.toHaveProperty(\"db\");\n\texpect(actualComposeData.services?.[`db-${suffix}`]?.image).toBe(\n\t\t\"postgres:latest\",\n\t);\n\texpect(actualComposeData.services).toHaveProperty(`api-${suffix}`);\n\texpect(actualComposeData.services).not.toHaveProperty(\"api\");\n\texpect(actualComposeData.services?.[`api-${suffix}`]?.image).toBe(\n\t\t\"myapi:latest\",\n\t);\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/compose/service/service-names.test.ts",
    "content": "import type { ComposeSpecification } from \"@dokploy/server\";\nimport { addSuffixToServiceNames, generateRandomHash } from \"@dokploy/server\";\nimport { expect, test } from \"vitest\";\nimport { parse } from \"yaml\";\n\ntest(\"Generate random hash with 8 characters\", () => {\n\tconst hash = generateRandomHash();\n\n\texpect(hash).toBeDefined();\n\texpect(hash.length).toBe(8);\n});\n\nconst composeFile = `\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n\n  api:\n    image: myapi:latest\n\nnetworks:\n  default:\n    driver: bridge\n`;\n\ntest(\"Add suffix to service names in compose file\", () => {\n\tconst composeData = parse(composeFile) as ComposeSpecification;\n\n\tconst suffix = generateRandomHash();\n\n\tif (!composeData.services) {\n\t\treturn;\n\t}\n\tconst updatedComposeData = addSuffixToServiceNames(\n\t\tcomposeData.services,\n\t\tsuffix,\n\t);\n\tconst actualComposeData = { ...composeData, services: updatedComposeData };\n\n\t// Verificar que los nombres de los servicios han cambiado correctamente\n\texpect(actualComposeData.services).toHaveProperty(`web-${suffix}`);\n\texpect(actualComposeData.services).toHaveProperty(`api-${suffix}`);\n\t// Verificar que las claves originales no existen\n\texpect(actualComposeData.services).not.toHaveProperty(\"web\");\n\texpect(actualComposeData.services).not.toHaveProperty(\"api\");\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/compose/service/service.test.ts",
    "content": "import type { ComposeSpecification } from \"@dokploy/server\";\nimport {\n\taddSuffixToAllServiceNames,\n\taddSuffixToServiceNames,\n} from \"@dokploy/server\";\nimport { expect, test } from \"vitest\";\nimport { parse } from \"yaml\";\n\nconst composeFileCombinedAllCases = `\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    container_name: web_container\n    links:\n      - api\n    depends_on:\n      - api\n    extends: base_service\n\n  api:\n    image: myapi:latest\n    depends_on:\n      db:\n        condition: service_healthy\n    volumes_from:\n      - db\n\n  db:\n    image: postgres:latest\n\n  base_service:\n    image: base:latest\n\nnetworks:\n  default:\n    driver: bridge\n`;\n\nconst expectedComposeFile = parse(`\nversion: \"3.8\"\n\nservices:\n  web-testhash:\n    image: nginx:latest\n    container_name: web_container-testhash\n    links:\n      - api-testhash\n    depends_on:\n      - api-testhash\n    extends: base_service-testhash\n\n  api-testhash:\n    image: myapi:latest\n    depends_on:\n      db-testhash:\n        condition: service_healthy\n    volumes_from:\n      - db-testhash\n\n  db-testhash:\n    image: postgres:latest\n\n  base_service-testhash:\n    image: base:latest\n\nnetworks:\n  default:\n    driver: bridge\n`);\n\ntest(\"Add suffix to all service names in compose file\", () => {\n\tconst composeData = parse(\n\t\tcomposeFileCombinedAllCases,\n\t) as ComposeSpecification;\n\n\tconst suffix = \"testhash\";\n\n\tif (!composeData.services) {\n\t\treturn;\n\t}\n\tconst updatedComposeData = addSuffixToServiceNames(\n\t\tcomposeData.services,\n\t\tsuffix,\n\t);\n\tconst actualComposeData = { ...composeData, services: updatedComposeData };\n\n\texpect(actualComposeData).toEqual(expectedComposeFile);\n});\n\nconst composeFile1 = `\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    container_name: web_container\n    depends_on:\n      - app\n    networks:\n      - frontend\n    volumes_from:\n      - data\n    links:\n      - db\n    extends:\n      service: base_service\n\n  app:\n    image: node:14\n    networks:\n      - backend\n      - frontend\n\n  db:\n    image: postgres:13\n    networks:\n      - backend\n\n  data:\n    image: busybox\n    volumes:\n      - /data\n\n  base_service:\n    image: base:latest\n\nnetworks:\n  frontend:\n    driver: bridge\n  backend:\n    driver: bridge\n`;\n\nconst expectedComposeFile1 = parse(`\nversion: \"3.8\"\n\nservices:\n  web-testhash:\n    image: nginx:latest\n    container_name: web_container-testhash\n    depends_on:\n      - app-testhash\n    networks:\n      - frontend\n    volumes_from:\n      - data-testhash\n    links:\n      - db-testhash\n    extends:\n      service: base_service-testhash\n\n  app-testhash:\n    image: node:14\n    networks:\n      - backend\n      - frontend\n\n  db-testhash:\n    image: postgres:13\n    networks:\n      - backend\n\n  data-testhash:\n    image: busybox\n    volumes:\n      - /data\n\n  base_service-testhash:\n    image: base:latest\n\nnetworks:\n  frontend:\n    driver: bridge\n  backend:\n    driver: bridge\n`) as ComposeSpecification;\n\ntest(\"Add suffix to all service names in compose file 1\", () => {\n\tconst composeData = parse(composeFile1) as ComposeSpecification;\n\tconst suffix = \"testhash\";\n\n\tconst updatedComposeData = addSuffixToAllServiceNames(composeData, suffix);\n\n\texpect(updatedComposeData).toEqual(expectedComposeFile1);\n});\n\nconst composeFile2 = `\nversion: \"3.8\"\n\nservices:\n  frontend:\n    image: nginx:latest\n    depends_on:\n      - backend\n    networks:\n      - public\n    volumes_from:\n      - logs\n    links:\n      - cache\n    extends:\n      service: shared_service\n\n  backend:\n    image: node:14\n    networks:\n      - private\n      - public\n\n  cache:\n    image: redis:latest\n    networks:\n      - private\n\n  logs:\n    image: busybox\n    volumes:\n      - /logs\n\n  shared_service:\n    image: shared:latest\n\nnetworks:\n  public:\n    driver: bridge\n  private:\n    driver: bridge\n`;\n\nconst expectedComposeFile2 = parse(`\nversion: \"3.8\"\n\nservices:\n  frontend-testhash:\n    image: nginx:latest\n    depends_on:\n      - backend-testhash\n    networks:\n      - public\n    volumes_from:\n      - logs-testhash\n    links:\n      - cache-testhash\n    extends:\n      service: shared_service-testhash\n\n  backend-testhash:\n    image: node:14\n    networks:\n      - private\n      - public\n\n  cache-testhash:\n    image: redis:latest\n    networks:\n      - private\n\n  logs-testhash:\n    image: busybox\n    volumes:\n      - /logs\n\n  shared_service-testhash:\n    image: shared:latest\n\nnetworks:\n  public:\n    driver: bridge\n  private:\n    driver: bridge\n`) as ComposeSpecification;\n\ntest(\"Add suffix to all service names in compose file 2\", () => {\n\tconst composeData = parse(composeFile2) as ComposeSpecification;\n\tconst suffix = \"testhash\";\n\n\tconst updatedComposeData = addSuffixToAllServiceNames(composeData, suffix);\n\n\texpect(updatedComposeData).toEqual(expectedComposeFile2);\n});\n\nconst composeFile3 = `\nversion: \"3.8\"\n\nservices:\n  service_a:\n    image: service_a:latest\n    depends_on:\n      - service_b\n    networks:\n      - net_a\n    volumes_from:\n      - data_volume\n    links:\n      - service_c\n    extends:\n      service: common_service\n\n  service_b:\n    image: service_b:latest\n    networks:\n      - net_b\n      - net_a\n\n  service_c:\n    image: service_c:latest\n    networks:\n      - net_b\n\n  data_volume:\n    image: busybox\n    volumes:\n      - /data\n\n  common_service:\n    image: common:latest\n\nnetworks:\n  net_a:\n    driver: bridge\n  net_b:\n    driver: bridge\n`;\n\nconst expectedComposeFile3 = parse(`\nversion: \"3.8\"\n\nservices:\n  service_a-testhash:\n    image: service_a:latest\n    depends_on:\n      - service_b-testhash\n    networks:\n      - net_a\n    volumes_from:\n      - data_volume-testhash\n    links:\n      - service_c-testhash\n    extends:\n      service: common_service-testhash\n\n  service_b-testhash:\n    image: service_b:latest\n    networks:\n      - net_b\n      - net_a\n\n  service_c-testhash:\n    image: service_c:latest\n    networks:\n      - net_b\n\n  data_volume-testhash:\n    image: busybox\n    volumes:\n      - /data\n\n  common_service-testhash:\n    image: common:latest\n\nnetworks:\n  net_a:\n    driver: bridge\n  net_b:\n    driver: bridge\n`) as ComposeSpecification;\n\ntest(\"Add suffix to all service names in compose file 3\", () => {\n\tconst composeData = parse(composeFile3) as ComposeSpecification;\n\tconst suffix = \"testhash\";\n\n\tconst updatedComposeData = addSuffixToAllServiceNames(composeData, suffix);\n\n\texpect(updatedComposeData).toEqual(expectedComposeFile3);\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/compose/service/sevice-volumes-from.test.ts",
    "content": "import type { ComposeSpecification } from \"@dokploy/server\";\nimport { addSuffixToServiceNames, generateRandomHash } from \"@dokploy/server\";\nimport { expect, test } from \"vitest\";\nimport { parse } from \"yaml\";\n\ntest(\"Generate random hash with 8 characters\", () => {\n\tconst hash = generateRandomHash();\n\n\texpect(hash).toBeDefined();\n\texpect(hash.length).toBe(8);\n});\n\nconst composeFile3 = `\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    volumes_from:\n      - shared\n\n  api:\n    image: myapi:latest\n    volumes_from:\n      - shared\n\n  shared:\n    image: busybox\n    volumes:\n      - /data\n\nnetworks:\n  default:\n    driver: bridge\n`;\n\ntest(\"Add suffix to service names with volumes_from in compose file\", () => {\n\tconst composeData = parse(composeFile3) as ComposeSpecification;\n\n\tconst suffix = generateRandomHash();\n\n\tif (!composeData.services) {\n\t\treturn;\n\t}\n\tconst updatedComposeData = addSuffixToServiceNames(\n\t\tcomposeData.services,\n\t\tsuffix,\n\t);\n\tconst actualComposeData = { ...composeData, services: updatedComposeData };\n\n\t// Verificar que la nueva clave del servicio tiene el prefijo y la vieja clave no existe\n\texpect(actualComposeData.services).toHaveProperty(`web-${suffix}`);\n\texpect(actualComposeData.services).not.toHaveProperty(\"web\");\n\n\t// Verificar que la configuración de la imagen sigue igual\n\texpect(actualComposeData.services?.[`web-${suffix}`]?.image).toBe(\n\t\t\"nginx:latest\",\n\t);\n\texpect(actualComposeData.services?.[`api-${suffix}`]?.image).toBe(\n\t\t\"myapi:latest\",\n\t);\n\n\t// Verificar que los nombres en volumes_from tienen el prefijo\n\texpect(actualComposeData.services?.[`web-${suffix}`]?.volumes_from).toContain(\n\t\t`shared-${suffix}`,\n\t);\n\texpect(actualComposeData.services?.[`api-${suffix}`]?.volumes_from).toContain(\n\t\t`shared-${suffix}`,\n\t);\n\n\t// Verificar que el servicio shared también tiene el prefijo\n\texpect(actualComposeData.services).toHaveProperty(`shared-${suffix}`);\n\texpect(actualComposeData.services).not.toHaveProperty(\"shared\");\n\texpect(actualComposeData.services?.[`shared-${suffix}`]?.image).toBe(\n\t\t\"busybox\",\n\t);\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/compose/volume/volume-2.test.ts",
    "content": "import type { ComposeSpecification } from \"@dokploy/server\";\nimport {\n\taddSuffixToAllVolumes,\n\taddSuffixToVolumesRoot,\n\tgenerateRandomHash,\n} from \"@dokploy/server\";\nimport { expect, test } from \"vitest\";\nimport { parse } from \"yaml\";\n\nconst composeFile = `\nservices:\n  mail:\n    image: bytemark/smtp\n    restart: always\n\n  plausible_db:\n    image: postgres:14-alpine\n    restart: always\n    volumes:\n      - db-data:/var/lib/postgresql/data\n    environment:\n      - POSTGRES_PASSWORD=postgres\n\n  plausible_events_db:\n    image: clickhouse/clickhouse-server:23.3.7.5-alpine\n    restart: always\n    volumes:\n      - event-data:/var/lib/clickhouse\n      - event-logs:/var/log/clickhouse-server\n      - ./clickhouse/clickhouse-config.xml:/etc/clickhouse-server/config.d/logging.xml:ro\n      - ./clickhouse/clickhouse-user-config.xml:/etc/clickhouse-server/users.d/logging.xml:ro\n    ulimits:\n      nofile:\n        soft: 262144\n        hard: 262144\n\n  plausible:\n    image: plausible/analytics:v2.0\n    restart: always\n    command: sh -c \"sleep 10 && /entrypoint.sh db createdb && /entrypoint.sh db migrate && /entrypoint.sh run\"\n    depends_on:\n      - plausible_db\n      - plausible_events_db\n      - mail\n    ports:\n      - 127.0.0.1:8000:8000\n    env_file:\n      - plausible-conf.env\n    volumes:\n      - type: volume\n        source: plausible-data\n        target: /data\n\n  mysql:\n    image: mysql:5.7\n    restart: always\n    environment:\n      MYSQL_ROOT_PASSWORD: example\n    volumes:\n      - type: volume\n        source: db-data\n        target: /var/lib/mysql/data\n\nvolumes:\n  db-data:\n    driver: local\n  event-data:\n    driver: local\n  event-logs:\n    driver: local\n`;\n\nconst expectedDockerCompose = parse(`\nservices:\n  mail:\n    image: bytemark/smtp\n    restart: always\n\n  plausible_db:\n    image: postgres:14-alpine\n    restart: always\n    volumes:\n      - db-data-testhash:/var/lib/postgresql/data\n    environment:\n      - POSTGRES_PASSWORD=postgres\n\n  plausible_events_db:\n    image: clickhouse/clickhouse-server:23.3.7.5-alpine\n    restart: always\n    volumes:\n      - event-data-testhash:/var/lib/clickhouse\n      - event-logs-testhash:/var/log/clickhouse-server\n      - ./clickhouse/clickhouse-config.xml:/etc/clickhouse-server/config.d/logging.xml:ro\n      - ./clickhouse/clickhouse-user-config.xml:/etc/clickhouse-server/users.d/logging.xml:ro\n    ulimits:\n      nofile:\n        soft: 262144\n        hard: 262144\n\n  plausible:\n    image: plausible/analytics:v2.0\n    restart: always\n    command: sh -c \"sleep 10 && /entrypoint.sh db createdb && /entrypoint.sh db migrate && /entrypoint.sh run\"\n    depends_on:\n      - plausible_db\n      - plausible_events_db\n      - mail\n    ports:\n      - 127.0.0.1:8000:8000\n    env_file:\n      - plausible-conf.env\n    volumes:\n      - type: volume\n        source: plausible-data-testhash\n        target: /data\n\n  mysql:\n    image: mysql:5.7\n    restart: always\n    environment:\n      MYSQL_ROOT_PASSWORD: example\n    volumes:\n      - type: volume\n        source: db-data-testhash\n        target: /var/lib/mysql/data\n\nvolumes:\n  db-data-testhash:\n    driver: local\n  event-data-testhash:\n    driver: local\n  event-logs-testhash:\n    driver: local\n`) as ComposeSpecification;\n\ntest(\"Generate random hash with 8 characters\", () => {\n\tconst hash = generateRandomHash();\n\n\texpect(hash).toBeDefined();\n\texpect(hash.length).toBe(8);\n});\n\n// Docker compose needs unique names for services, volumes, networks and containers\n// So base on a input which is a dockercompose file, it should replace the name with a hash and return a new dockercompose file\ntest(\"Add suffix to volumes root property\", () => {\n\tconst composeData = parse(composeFile) as ComposeSpecification;\n\n\tconst suffix = generateRandomHash();\n\n\tif (!composeData?.volumes) {\n\t\treturn;\n\t}\n\tconst volumes = addSuffixToVolumesRoot(composeData.volumes, suffix);\n\n\t// {\n\t// \t'db-data-af045046': { driver: 'local' },\n\t// \t'event-data-af045046': { driver: 'local' },\n\t// \t'event-logs-af045046': { driver: 'local' }\n\t//   }\n\n\texpect(volumes).toBeDefined();\n\tfor (const volumeKey of Object.keys(volumes)) {\n\t\texpect(volumeKey).toContain(`-${suffix}`);\n\t}\n});\n\ntest(\"Expect to change the suffix in all the possible places\", () => {\n\tconst composeData = parse(composeFile) as ComposeSpecification;\n\tconst suffix = \"testhash\";\n\n\tconst updatedComposeData = addSuffixToAllVolumes(composeData, suffix);\n\n\texpect(updatedComposeData).toEqual(expectedDockerCompose);\n});\n\nconst composeFile2 = `\nversion: '3.8'\nservices:\n  app:\n    image: myapp:latest\n    build:\n      context: .\n      dockerfile: Dockerfile\n    volumes:\n      - app-config:/usr/src/app/config\n      - ./config:/usr/src/app/config:ro\n    environment:\n      - NODE_ENV=production\n  mongo:\n    image: mongo:4.2\n    volumes:\n      - mongo-data:/data/db\nvolumes:\n  app-config:\n  mongo-data:\n`;\n\nconst expectedDockerCompose2 = parse(`\nversion: '3.8'\nservices:\n  app:\n    image: myapp:latest\n    build:\n      context: .\n      dockerfile: Dockerfile\n    volumes:\n      - app-config-testhash:/usr/src/app/config\n      - ./config:/usr/src/app/config:ro\n    environment:\n      - NODE_ENV=production\n  mongo:\n    image: mongo:4.2\n    volumes:\n      - mongo-data-testhash:/data/db\nvolumes:\n  app-config-testhash:\n  mongo-data-testhash:\n`) as ComposeSpecification;\n\ntest(\"Expect to change the suffix in all the possible places (2 Try)\", () => {\n\tconst composeData = parse(composeFile2) as ComposeSpecification;\n\tconst suffix = \"testhash\";\n\n\tconst updatedComposeData = addSuffixToAllVolumes(composeData, suffix);\n\n\texpect(updatedComposeData).toEqual(expectedDockerCompose2);\n});\n\nconst composeFile3 = `\nversion: '3.8'\nservices:\n  app:\n    image: myapp:latest\n    build:\n      context: .\n      dockerfile: Dockerfile\n    volumes:\n      - app-config:/usr/src/app/config\n      - ./config:/usr/src/app/config:ro\n    environment:\n      - NODE_ENV=production\n  mongo:\n    image: mongo:4.2\n    volumes:\n      - mongo-data:/data/db\nvolumes:\n  app-config:\n  mongo-data:\n`;\n\nconst expectedDockerCompose3 = parse(`\nversion: '3.8'\nservices:\n  app:\n    image: myapp:latest\n    build:\n      context: .\n      dockerfile: Dockerfile\n    volumes:\n      - app-config-testhash:/usr/src/app/config\n      - ./config:/usr/src/app/config:ro\n    environment:\n      - NODE_ENV=production\n  mongo:\n    image: mongo:4.2\n    volumes:\n      - mongo-data-testhash:/data/db\nvolumes:\n  app-config-testhash:\n  mongo-data-testhash:\n`) as ComposeSpecification;\n\ntest(\"Expect to change the suffix in all the possible places (3 Try)\", () => {\n\tconst composeData = parse(composeFile3) as ComposeSpecification;\n\tconst suffix = \"testhash\";\n\n\tconst updatedComposeData = addSuffixToAllVolumes(composeData, suffix);\n\n\texpect(updatedComposeData).toEqual(expectedDockerCompose3);\n});\n\nconst composeFileComplex = `\nversion: \"3.8\"\nservices:\n  studio:\n    container_name: supabase-studio\n    image: supabase/studio:20240422-5cf8f30\n    restart: unless-stopped\n    healthcheck:\n      test:\n        [\n          \"CMD\",\n          \"node\",\n          \"-e\",\n          \"require('http').get('http://localhost:3000/api/profile', (r) => {if (r.statusCode !== 200) throw new Error(r.statusCode)})\"\n        ]\n      timeout: 5s\n      interval: 5s\n      retries: 3\n    depends_on:\n      analytics:\n        condition: service_healthy\n    environment:\n      STUDIO_PG_META_URL: http://meta:8080\n      POSTGRES_PASSWORD: \\${POSTGRES_PASSWORD}\n      DEFAULT_ORGANIZATION_NAME: \\${STUDIO_DEFAULT_ORGANIZATION}\n      DEFAULT_PROJECT_NAME: \\${STUDIO_DEFAULT_PROJECT}\n      SUPABASE_URL: http://kong:8000\n      SUPABASE_PUBLIC_URL: \\${SUPABASE_PUBLIC_URL}\n      SUPABASE_ANON_KEY: \\${ANON_KEY}\n      SUPABASE_SERVICE_KEY: \\${SERVICE_ROLE_KEY}\n      LOGFLARE_API_KEY: \\${LOGFLARE_API_KEY}\n      LOGFLARE_URL: http://analytics:4000\n      NEXT_PUBLIC_ENABLE_LOGS: true\n      NEXT_ANALYTICS_BACKEND_PROVIDER: postgres\n\n  kong:\n    container_name: supabase-kong\n    image: kong:2.8.1\n    restart: unless-stopped\n    entrypoint: bash -c 'eval \"echo \\\"$$(cat ~/temp.yml)\\\"\" > ~/kong.yml && /docker-entrypoint.sh kong docker-start'\n    ports:\n      - \\${KONG_HTTP_PORT}:8000/tcp\n      - \\${KONG_HTTPS_PORT}:8443/tcp\n    depends_on:\n      analytics:\n        condition: service_healthy\n    environment:\n      KONG_DATABASE: \"off\"\n      KONG_DECLARATIVE_CONFIG: /home/kong/kong.yml\n      KONG_DNS_ORDER: LAST,A,CNAME\n      KONG_PLUGINS: request-transformer,cors,key-auth,acl,basic-auth\n      KONG_NGINX_PROXY_PROXY_BUFFER_SIZE: 160k\n      KONG_NGINX_PROXY_PROXY_BUFFERS: 64 160k\n      SUPABASE_ANON_KEY: \\${ANON_KEY}\n      SUPABASE_SERVICE_KEY: \\${SERVICE_ROLE_KEY}\n      DASHBOARD_USERNAME: \\${DASHBOARD_USERNAME}\n      DASHBOARD_PASSWORD: \\${DASHBOARD_PASSWORD}\n    volumes:\n      - ./volumes/api/kong.yml:/home/kong/temp.yml:ro\n\n  auth:\n    container_name: supabase-auth\n    image: supabase/gotrue:v2.151.0\n    depends_on:\n      db:\n        condition: service_healthy\n      analytics:\n        condition: service_healthy\n    healthcheck:\n      test:\n        [\n          \"CMD\",\n          \"wget\",\n          \"--no-verbose\",\n          \"--tries=1\",\n          \"--spider\",\n          \"http://localhost:9999/health\"\n        ]\n      timeout: 5s\n      interval: 5s\n      retries: 3\n    restart: unless-stopped\n    environment:\n      GOTRUE_API_HOST: 0.0.0.0\n      GOTRUE_API_PORT: 9999\n      API_EXTERNAL_URL: \\${API_EXTERNAL_URL}\n      GOTRUE_DB_DRIVER: postgres\n      GOTRUE_DB_DATABASE_URL: postgres://supabase_auth_admin:\\${POSTGRES_PASSWORD}@\\${POSTGRES_HOST}:\\${POSTGRES_PORT}/\\${POSTGRES_DB}\n      GOTRUE_SITE_URL: \\${SITE_URL}\n      GOTRUE_URI_ALLOW_LIST: \\${ADDITIONAL_REDIRECT_URLS}\n      GOTRUE_DISABLE_SIGNUP: \\${DISABLE_SIGNUP}\n      GOTRUE_JWT_ADMIN_ROLES: service_role\n      GOTRUE_JWT_AUD: authenticated\n      GOTRUE_JWT_DEFAULT_GROUP_NAME: authenticated\n      GOTRUE_JWT_EXP: \\${JWT_EXPIRY}\n      GOTRUE_JWT_SECRET: \\${JWT_SECRET}\n      GOTRUE_EXTERNAL_EMAIL_ENABLED: \\${ENABLE_EMAIL_SIGNUP}\n      GOTRUE_EXTERNAL_ANONYMOUS_USERS_ENABLED: \\${ENABLE_ANONYMOUS_USERS}\n      GOTRUE_MAILER_AUTOCONFIRM: \\${ENABLE_EMAIL_AUTOCONFIRM}\n      GOTRUE_SMTP_ADMIN_EMAIL: \\${SMTP_ADMIN_EMAIL}\n      GOTRUE_SMTP_HOST: \\${SMTP_HOST}\n      GOTRUE_SMTP_PORT: \\${SMTP_PORT}\n      GOTRUE_SMTP_USER: \\${SMTP_USER}\n      GOTRUE_SMTP_PASS: \\${SMTP_PASS}\n      GOTRUE_SMTP_SENDER_NAME: \\${SMTP_SENDER_NAME}\n      GOTRUE_MAILER_URLPATHS_INVITE: \\${MAILER_URLPATHS_INVITE}\n      GOTRUE_MAILER_URLPATHS_CONFIRMATION: \\${MAILER_URLPATHS_CONFIRMATION}\n      GOTRUE_MAILER_URLPATHS_RECOVERY: \\${MAILER_URLPATHS_RECOVERY}\n      GOTRUE_MAILER_URLPATHS_EMAIL_CHANGE: \\${MAILER_URLPATHS_EMAIL_CHANGE}\n      GOTRUE_EXTERNAL_PHONE_ENABLED: \\${ENABLE_PHONE_SIGNUP}\n      GOTRUE_SMS_AUTOCONFIRM: \\${ENABLE_PHONE_AUTOCONFIRM}\n\n  rest:\n    container_name: supabase-rest\n    image: postgrest/postgrest:v12.0.1\n    depends_on:\n      db:\n        condition: service_healthy\n      analytics:\n        condition: service_healthy\n    restart: unless-stopped\n    environment:\n      PGRST_DB_URI: postgres://authenticator:\\${POSTGRES_PASSWORD}@\\${POSTGRES_HOST}:\\${POSTGRES_PORT}/\\${POSTGRES_DB}\n      PGRST_DB_SCHEMAS: \\${PGRST_DB_SCHEMAS}\n      PGRST_DB_ANON_ROLE: anon\n      PGRST_JWT_SECRET: \\${JWT_SECRET}\n      PGRST_DB_USE_LEGACY_GUCS: \"false\"\n      PGRST_APP_SETTINGS_JWT_SECRET: \\${JWT_SECRET}\n      PGRST_APP_SETTINGS_JWT_EXP: \\${JWT_EXPIRY}\n    command: \"postgrest\"\n\n  realtime:\n    container_name: realtime-dev.supabase-realtime\n    image: supabase/realtime:v2.28.32\n    depends_on:\n      db:\n        condition: service_healthy\n      analytics:\n        condition: service_healthy\n    healthcheck:\n      test:\n        [\n          \"CMD\",\n          \"curl\",\n          \"-sSfL\",\n          \"--head\",\n          \"-o\",\n          \"/dev/null\",\n          \"-H\",\n          \"Authorization: Bearer \\${ANON_KEY}\",\n          \"http://localhost:4000/api/tenants/realtime-dev/health\"\n        ]\n      timeout: 5s\n      interval: 5s\n      retries: 3\n    restart: unless-stopped\n    environment:\n      PORT: 4000\n      DB_HOST: \\${POSTGRES_HOST}\n      DB_PORT: \\${POSTGRES_PORT}\n      DB_USER: supabase_admin\n      DB_PASSWORD: \\${POSTGRES_PASSWORD}\n      DB_NAME: \\${POSTGRES_DB}\n      DB_AFTER_CONNECT_QUERY: 'SET search_path TO _realtime'\n      DB_ENC_KEY: supabaserealtime\n      API_JWT_SECRET: \\${JWT_SECRET}\n      FLY_ALLOC_ID: fly123\n      FLY_APP_NAME: realtime\n      SECRET_KEY_BASE: UpNVntn3cDxHJpq99YMc1T1AQgQpc8kfYTuRgBiYa15BLrx8etQoXz3gZv1/u2oq\n      ERL_AFLAGS: -proto_dist inet_tcp\n      ENABLE_TAILSCALE: \"false\"\n      DNS_NODES: \"''\"\n    command: >\n      sh -c \"/app/bin/migrate && /app/bin/realtime eval 'Realtime.Release.seeds(Realtime.Repo)' && /app/bin/server\"\n\n  storage:\n    container_name: supabase-storage\n    image: supabase/storage-api:v1.0.6\n    depends_on:\n      db:\n        condition: service_healthy\n      rest:\n        condition: service_started\n      imgproxy:\n        condition: service_started\n    healthcheck:\n      test:\n        [\n          \"CMD\",\n          \"wget\",\n          \"--no-verbose\",\n          \"--tries=1\",\n          \"--spider\",\n          \"http://localhost:5000/status\"\n        ]\n      timeout: 5s\n      interval: 5s\n      retries: 3\n    restart: unless-stopped\n    environment:\n      ANON_KEY: \\${ANON_KEY}\n      SERVICE_KEY: \\${SERVICE_ROLE_KEY}\n      POSTGREST_URL: http://rest:3000\n      PGRST_JWT_SECRET: \\${JWT_SECRET}\n      DATABASE_URL: postgres://supabase_storage_admin:\\${POSTGRES_PASSWORD}@\\${POSTGRES_HOST}:\\${POSTGRES_PORT}/\\${POSTGRES_DB}\n      FILE_SIZE_LIMIT: 52428800\n      STORAGE_BACKEND: file\n      FILE_STORAGE_BACKEND_PATH: /var/lib/storage\n      TENANT_ID: stub\n      REGION: stub\n      GLOBAL_S3_BUCKET: stub\n      ENABLE_IMAGE_TRANSFORMATION: \"true\"\n      IMGPROXY_URL: http://imgproxy:5001\n    volumes:\n      - ./volumes/storage:/var/lib/storage:z\n\n  imgproxy:\n    container_name: supabase-imgproxy\n    image: darthsim/imgproxy:v3.8.0\n    healthcheck:\n      test: [ \"CMD\", \"imgproxy\", \"health\" ]\n      timeout: 5s\n      interval: 5s\n      retries: 3\n    environment:\n      IMGPROXY_BIND: \":5001\"\n      IMGPROXY_LOCAL_FILESYSTEM_ROOT: /\n      IMGPROXY_USE_ETAG: \"true\"\n      IMGPROXY_ENABLE_WEBP_DETECTION: \\${IMGPROXY_ENABLE_WEBP_DETECTION}\n    volumes:\n      - ./volumes/storage:/var/lib/storage:z\n\n  meta:\n    container_name: supabase-meta\n    image: supabase/postgres-meta:v0.80.0\n    depends_on:\n      db:\n        condition: service_healthy\n      analytics:\n        condition: service_healthy\n    restart: unless-stopped\n    environment:\n      PG_META_PORT: 8080\n      PG_META_DB_HOST: \\${POSTGRES_HOST}\n      PG_META_DB_PORT: \\${POSTGRES_PORT}\n      PG_META_DB_NAME: \\${POSTGRES_DB}\n      PG_META_DB_USER: supabase_admin\n      PG_META_DB_PASSWORD: \\${POSTGRES_PASSWORD}\n\n  functions:\n    container_name: supabase-edge-functions\n    image: supabase/edge-runtime:v1.45.2\n    restart: unless-stopped\n    depends_on:\n      analytics:\n        condition: service_healthy\n    environment:\n      JWT_SECRET: \\${JWT_SECRET}\n      SUPABASE_URL: http://kong:8000\n      SUPABASE_ANON_KEY: \\${ANON_KEY}\n      SUPABASE_SERVICE_ROLE_KEY: \\${SERVICE_ROLE_KEY}\n      SUPABASE_DB_URL: postgresql://postgres:\\${POSTGRES_PASSWORD}@\\${POSTGRES_HOST}:\\${POSTGRES_PORT}/\\${POSTGRES_DB}\n      VERIFY_JWT: \"\\${FUNCTIONS_VERIFY_JWT}\"\n    volumes:\n      - ./volumes/functions:/home/deno/functions:Z\n    command:\n      - start\n      - --main-service\n      - /home/deno/functions/main\n\n  analytics:\n    container_name: supabase-analytics\n    image: supabase/logflare:1.4.0\n    healthcheck:\n      test: [ \"CMD\", \"curl\", \"http://localhost:4000/health\" ]\n      timeout: 5s\n      interval: 5s\n      retries: 10\n    restart: unless-stopped\n    depends_on:\n      db:\n        condition: service_healthy\n    environment:\n      LOGFLARE_NODE_HOST: 127.0.0.1\n      DB_USERNAME: supabase_admin\n      DB_DATABASE: \\${POSTGRES_DB}\n      DB_HOSTNAME: \\${POSTGRES_HOST}\n      DB_PORT: \\${POSTGRES_PORT}\n      DB_PASSWORD: \\${POSTGRES_PASSWORD}\n      DB_SCHEMA: _analytics\n      LOGFLARE_API_KEY: \\${LOGFLARE_API_KEY}\n      LOGFLARE_SINGLE_TENANT: true\n      LOGFLARE_SUPABASE_MODE: true\n      LOGFLARE_MIN_CLUSTER_SIZE: 1\n      POSTGRES_BACKEND_URL: postgresql://supabase_admin:\\${POSTGRES_PASSWORD}@\\${POSTGRES_HOST}:\\${POSTGRES_PORT}/\\${POSTGRES_DB}\n      POSTGRES_BACKEND_SCHEMA: _analytics\n      LOGFLARE_FEATURE_FLAG_OVERRIDE: multibackend=true\n    ports:\n      - 4000:4000\n\n  db:\n    container_name: supabase-db\n    image: supabase/postgres:15.1.1.41\n    healthcheck:\n      test: pg_isready -U postgres -h localhost\n      interval: 5s\n      timeout: 5s\n      retries: 10\n    depends_on:\n      vector:\n        condition: service_healthy\n    command:\n      - postgres\n      - -c\n      - config_file=/etc/postgresql/postgresql.conf\n      - -c\n      - log_min_messages=fatal\n    restart: unless-stopped\n    ports:\n      - \\${POSTGRES_PORT}:\\${POSTGRES_PORT}\n    environment:\n      POSTGRES_HOST: /var/run/postgresql\n      PGPORT: \\${POSTGRES_PORT}\n      POSTGRES_PORT: \\${POSTGRES_PORT}\n      PGPASSWORD: \\${POSTGRES_PASSWORD}\n      POSTGRES_PASSWORD: \\${POSTGRES_PASSWORD}\n      PGDATABASE: \\${POSTGRES_DB}\n      POSTGRES_DB: \\${POSTGRES_DB}\n      JWT_SECRET: \\${JWT_SECRET}\n      JWT_EXP: \\${JWT_EXPIRY}\n    volumes:\n      - ./volumes/db/realtime.sql:/docker-entrypoint-initdb.d/migrations/99-realtime.sql:Z\n      - ./volumes/db/webhooks.sql:/docker-entrypoint-initdb.d/init-scripts/98-webhooks.sql:Z\n      - ./volumes/db/roles.sql:/docker-entrypoint-initdb.d/init-scripts/99-roles.sql:Z\n      - ./volumes/db/jwt.sql:/docker-entrypoint-initdb.d/init-scripts/99-jwt.sql:Z\n      - ./volumes/db/data:/var/lib/postgresql/data:Z\n      - ./volumes/db/logs.sql:/docker-entrypoint-initdb.d/migrations/99-logs.sql:Z\n      - db-config:/etc/postgresql-custom\n\n  vector:\n    container_name: supabase-vector\n    image: timberio/vector:0.28.1-alpine\n    healthcheck:\n      test:\n        [\n          \"CMD\",\n          \"wget\",\n          \"--no-verbose\",\n          \"--tries=1\",\n          \"--spider\",\n          \"http://vector:9001/health\"\n        ]\n      timeout: 5s\n      interval: 5s\n      retries: 3\n    volumes:\n      - ./volumes/logs/vector.yml:/etc/vector/vector.yml:ro\n      - \"\\${DOCKER_SOCKET_LOCATION}:/var/run/docker.sock:ro\"\n    environment:\n      LOGFLARE_API_KEY: \\${LOGFLARE_API_KEY}\n    command: [ \"--config\", \"etc/vector/vector.yml\" ]\n\nvolumes:\n  db-config:\n`;\n\nconst expectedDockerComposeComplex = parse(`\nversion: \"3.8\"\nservices:\n  studio:\n    container_name: supabase-studio\n    image: supabase/studio:20240422-5cf8f30\n    restart: unless-stopped\n    healthcheck:\n      test:\n        [\n          \"CMD\",\n          \"node\",\n          \"-e\",\n          \"require('http').get('http://localhost:3000/api/profile', (r) => {if (r.statusCode !== 200) throw new Error(r.statusCode)})\"\n        ]\n      timeout: 5s\n      interval: 5s\n      retries: 3\n    depends_on:\n      analytics:\n        condition: service_healthy\n    environment:\n      STUDIO_PG_META_URL: http://meta:8080\n      POSTGRES_PASSWORD: \\${POSTGRES_PASSWORD}\n      DEFAULT_ORGANIZATION_NAME: \\${STUDIO_DEFAULT_ORGANIZATION}\n      DEFAULT_PROJECT_NAME: \\${STUDIO_DEFAULT_PROJECT}\n      SUPABASE_URL: http://kong:8000\n      SUPABASE_PUBLIC_URL: \\${SUPABASE_PUBLIC_URL}\n      SUPABASE_ANON_KEY: \\${ANON_KEY}\n      SUPABASE_SERVICE_KEY: \\${SERVICE_ROLE_KEY}\n      LOGFLARE_API_KEY: \\${LOGFLARE_API_KEY}\n      LOGFLARE_URL: http://analytics:4000\n      NEXT_PUBLIC_ENABLE_LOGS: true\n      NEXT_ANALYTICS_BACKEND_PROVIDER: postgres\n\n  kong:\n    container_name: supabase-kong\n    image: kong:2.8.1\n    restart: unless-stopped\n    entrypoint: bash -c 'eval \"echo \\\"$$(cat ~/temp.yml)\\\"\" > ~/kong.yml && /docker-entrypoint.sh kong docker-start'\n    ports:\n      - \\${KONG_HTTP_PORT}:8000/tcp\n      - \\${KONG_HTTPS_PORT}:8443/tcp\n    depends_on:\n      analytics:\n        condition: service_healthy\n    environment:\n      KONG_DATABASE: \"off\"\n      KONG_DECLARATIVE_CONFIG: /home/kong/kong.yml\n      KONG_DNS_ORDER: LAST,A,CNAME\n      KONG_PLUGINS: request-transformer,cors,key-auth,acl,basic-auth\n      KONG_NGINX_PROXY_PROXY_BUFFER_SIZE: 160k\n      KONG_NGINX_PROXY_PROXY_BUFFERS: 64 160k\n      SUPABASE_ANON_KEY: \\${ANON_KEY}\n      SUPABASE_SERVICE_KEY: \\${SERVICE_ROLE_KEY}\n      DASHBOARD_USERNAME: \\${DASHBOARD_USERNAME}\n      DASHBOARD_PASSWORD: \\${DASHBOARD_PASSWORD}\n    volumes:\n      - ./volumes/api/kong.yml:/home/kong/temp.yml:ro\n\n  auth:\n    container_name: supabase-auth\n    image: supabase/gotrue:v2.151.0\n    depends_on:\n      db:\n        condition: service_healthy\n      analytics:\n        condition: service_healthy\n    healthcheck:\n      test:\n        [\n          \"CMD\",\n          \"wget\",\n          \"--no-verbose\",\n          \"--tries=1\",\n          \"--spider\",\n          \"http://localhost:9999/health\"\n        ]\n      timeout: 5s\n      interval: 5s\n      retries: 3\n    restart: unless-stopped\n    environment:\n      GOTRUE_API_HOST: 0.0.0.0\n      GOTRUE_API_PORT: 9999\n      API_EXTERNAL_URL: \\${API_EXTERNAL_URL}\n      GOTRUE_DB_DRIVER: postgres\n      GOTRUE_DB_DATABASE_URL: postgres://supabase_auth_admin:\\${POSTGRES_PASSWORD}@\\${POSTGRES_HOST}:\\${POSTGRES_PORT}/\\${POSTGRES_DB}\n      GOTRUE_SITE_URL: \\${SITE_URL}\n      GOTRUE_URI_ALLOW_LIST: \\${ADDITIONAL_REDIRECT_URLS}\n      GOTRUE_DISABLE_SIGNUP: \\${DISABLE_SIGNUP}\n      GOTRUE_JWT_ADMIN_ROLES: service_role\n      GOTRUE_JWT_AUD: authenticated\n      GOTRUE_JWT_DEFAULT_GROUP_NAME: authenticated\n      GOTRUE_JWT_EXP: \\${JWT_EXPIRY}\n      GOTRUE_JWT_SECRET: \\${JWT_SECRET}\n      GOTRUE_EXTERNAL_EMAIL_ENABLED: \\${ENABLE_EMAIL_SIGNUP}\n      GOTRUE_EXTERNAL_ANONYMOUS_USERS_ENABLED: \\${ENABLE_ANONYMOUS_USERS}\n      GOTRUE_MAILER_AUTOCONFIRM: \\${ENABLE_EMAIL_AUTOCONFIRM}\n      GOTRUE_SMTP_ADMIN_EMAIL: \\${SMTP_ADMIN_EMAIL}\n      GOTRUE_SMTP_HOST: \\${SMTP_HOST}\n      GOTRUE_SMTP_PORT: \\${SMTP_PORT}\n      GOTRUE_SMTP_USER: \\${SMTP_USER}\n      GOTRUE_SMTP_PASS: \\${SMTP_PASS}\n      GOTRUE_SMTP_SENDER_NAME: \\${SMTP_SENDER_NAME}\n      GOTRUE_MAILER_URLPATHS_INVITE: \\${MAILER_URLPATHS_INVITE}\n      GOTRUE_MAILER_URLPATHS_CONFIRMATION: \\${MAILER_URLPATHS_CONFIRMATION}\n      GOTRUE_MAILER_URLPATHS_RECOVERY: \\${MAILER_URLPATHS_RECOVERY}\n      GOTRUE_MAILER_URLPATHS_EMAIL_CHANGE: \\${MAILER_URLPATHS_EMAIL_CHANGE}\n      GOTRUE_EXTERNAL_PHONE_ENABLED: \\${ENABLE_PHONE_SIGNUP}\n      GOTRUE_SMS_AUTOCONFIRM: \\${ENABLE_PHONE_AUTOCONFIRM}\n\n  rest:\n    container_name: supabase-rest\n    image: postgrest/postgrest:v12.0.1\n    depends_on:\n      db:\n        condition: service_healthy\n      analytics:\n        condition: service_healthy\n    restart: unless-stopped\n    environment:\n      PGRST_DB_URI: postgres://authenticator:\\${POSTGRES_PASSWORD}@\\${POSTGRES_HOST}:\\${POSTGRES_PORT}/\\${POSTGRES_DB}\n      PGRST_DB_SCHEMAS: \\${PGRST_DB_SCHEMAS}\n      PGRST_DB_ANON_ROLE: anon\n      PGRST_JWT_SECRET: \\${JWT_SECRET}\n      PGRST_DB_USE_LEGACY_GUCS: \"false\"\n      PGRST_APP_SETTINGS_JWT_SECRET: \\${JWT_SECRET}\n      PGRST_APP_SETTINGS_JWT_EXP: \\${JWT_EXPIRY}\n    command: \"postgrest\"\n\n  realtime:\n    container_name: realtime-dev.supabase-realtime\n    image: supabase/realtime:v2.28.32\n    depends_on:\n      db:\n        condition: service_healthy\n      analytics:\n        condition: service_healthy\n    healthcheck:\n      test:\n        [\n          \"CMD\",\n          \"curl\",\n          \"-sSfL\",\n          \"--head\",\n          \"-o\",\n          \"/dev/null\",\n          \"-H\",\n          \"Authorization: Bearer \\${ANON_KEY}\",\n          \"http://localhost:4000/api/tenants/realtime-dev/health\"\n        ]\n      timeout: 5s\n      interval: 5s\n      retries: 3\n    restart: unless-stopped\n    environment:\n      PORT: 4000\n      DB_HOST: \\${POSTGRES_HOST}\n      DB_PORT: \\${POSTGRES_PORT}\n      DB_USER: supabase_admin\n      DB_PASSWORD: \\${POSTGRES_PASSWORD}\n      DB_NAME: \\${POSTGRES_DB}\n      DB_AFTER_CONNECT_QUERY: 'SET search_path TO _realtime'\n      DB_ENC_KEY: supabaserealtime\n      API_JWT_SECRET: \\${JWT_SECRET}\n      FLY_ALLOC_ID: fly123\n      FLY_APP_NAME: realtime\n      SECRET_KEY_BASE: UpNVntn3cDxHJpq99YMc1T1AQgQpc8kfYTuRgBiYa15BLrx8etQoXz3gZv1/u2oq\n      ERL_AFLAGS: -proto_dist inet_tcp\n      ENABLE_TAILSCALE: \"false\"\n      DNS_NODES: \"''\"\n    command: >\n      sh -c \"/app/bin/migrate && /app/bin/realtime eval 'Realtime.Release.seeds(Realtime.Repo)' && /app/bin/server\"\n\n  storage:\n    container_name: supabase-storage\n    image: supabase/storage-api:v1.0.6\n    depends_on:\n      db:\n        condition: service_healthy\n      rest:\n        condition: service_started\n      imgproxy:\n        condition: service_started\n    healthcheck:\n      test:\n        [\n          \"CMD\",\n          \"wget\",\n          \"--no-verbose\",\n          \"--tries=1\",\n          \"--spider\",\n          \"http://localhost:5000/status\"\n        ]\n      timeout: 5s\n      interval: 5s\n      retries: 3\n    restart: unless-stopped\n    environment:\n      ANON_KEY: \\${ANON_KEY}\n      SERVICE_KEY: \\${SERVICE_ROLE_KEY}\n      POSTGREST_URL: http://rest:3000\n      PGRST_JWT_SECRET: \\${JWT_SECRET}\n      DATABASE_URL: postgres://supabase_storage_admin:\\${POSTGRES_PASSWORD}@\\${POSTGRES_HOST}:\\${POSTGRES_PORT}/\\${POSTGRES_DB}\n      FILE_SIZE_LIMIT: 52428800\n      STORAGE_BACKEND: file\n      FILE_STORAGE_BACKEND_PATH: /var/lib/storage\n      TENANT_ID: stub\n      REGION: stub\n      GLOBAL_S3_BUCKET: stub\n      ENABLE_IMAGE_TRANSFORMATION: \"true\"\n      IMGPROXY_URL: http://imgproxy:5001\n    volumes:\n      - ./volumes/storage:/var/lib/storage:z\n\n  imgproxy:\n    container_name: supabase-imgproxy\n    image: darthsim/imgproxy:v3.8.0\n    healthcheck:\n      test: [ \"CMD\", \"imgproxy\", \"health\" ]\n      timeout: 5s\n      interval: 5s\n      retries: 3\n    environment:\n      IMGPROXY_BIND: \":5001\"\n      IMGPROXY_LOCAL_FILESYSTEM_ROOT: /\n      IMGPROXY_USE_ETAG: \"true\"\n      IMGPROXY_ENABLE_WEBP_DETECTION: \\${IMGPROXY_ENABLE_WEBP_DETECTION}\n    volumes:\n      - ./volumes/storage:/var/lib/storage:z\n\n  meta:\n    container_name: supabase-meta\n    image: supabase/postgres-meta:v0.80.0\n    depends_on:\n      db:\n        condition: service_healthy\n      analytics:\n        condition: service_healthy\n    restart: unless-stopped\n    environment:\n      PG_META_PORT: 8080\n      PG_META_DB_HOST: \\${POSTGRES_HOST}\n      PG_META_DB_PORT: \\${POSTGRES_PORT}\n      PG_META_DB_NAME: \\${POSTGRES_DB}\n      PG_META_DB_USER: supabase_admin\n      PG_META_DB_PASSWORD: \\${POSTGRES_PASSWORD}\n\n  functions:\n    container_name: supabase-edge-functions\n    image: supabase/edge-runtime:v1.45.2\n    restart: unless-stopped\n    depends_on:\n      analytics:\n        condition: service_healthy\n    environment:\n      JWT_SECRET: \\${JWT_SECRET}\n      SUPABASE_URL: http://kong:8000\n      SUPABASE_ANON_KEY: \\${ANON_KEY}\n      SUPABASE_SERVICE_ROLE_KEY: \\${SERVICE_ROLE_KEY}\n      SUPABASE_DB_URL: postgresql://postgres:\\${POSTGRES_PASSWORD}@\\${POSTGRES_HOST}:\\${POSTGRES_PORT}/\\${POSTGRES_DB}\n      VERIFY_JWT: \"\\${FUNCTIONS_VERIFY_JWT}\"\n    volumes:\n      - ./volumes/functions:/home/deno/functions:Z\n    command:\n      - start\n      - --main-service\n      - /home/deno/functions/main\n\n  analytics:\n    container_name: supabase-analytics\n    image: supabase/logflare:1.4.0\n    healthcheck:\n      test: [ \"CMD\", \"curl\", \"http://localhost:4000/health\" ]\n      timeout: 5s\n      interval: 5s\n      retries: 10\n    restart: unless-stopped\n    depends_on:\n      db:\n        condition: service_healthy\n    environment:\n      LOGFLARE_NODE_HOST: 127.0.0.1\n      DB_USERNAME: supabase_admin\n      DB_DATABASE: \\${POSTGRES_DB}\n      DB_HOSTNAME: \\${POSTGRES_HOST}\n      DB_PORT: \\${POSTGRES_PORT}\n      DB_PASSWORD: \\${POSTGRES_PASSWORD}\n      DB_SCHEMA: _analytics\n      LOGFLARE_API_KEY: \\${LOGFLARE_API_KEY}\n      LOGFLARE_SINGLE_TENANT: true\n      LOGFLARE_SUPABASE_MODE: true\n      LOGFLARE_MIN_CLUSTER_SIZE: 1\n      POSTGRES_BACKEND_URL: postgresql://supabase_admin:\\${POSTGRES_PASSWORD}@\\${POSTGRES_HOST}:\\${POSTGRES_PORT}/\\${POSTGRES_DB}\n      POSTGRES_BACKEND_SCHEMA: _analytics\n      LOGFLARE_FEATURE_FLAG_OVERRIDE: multibackend=true\n    ports:\n      - 4000:4000\n\n  db:\n    container_name: supabase-db\n    image: supabase/postgres:15.1.1.41\n    healthcheck:\n      test: pg_isready -U postgres -h localhost\n      interval: 5s\n      timeout: 5s\n      retries: 10\n    depends_on:\n      vector:\n        condition: service_healthy\n    command:\n      - postgres\n      - -c\n      - config_file=/etc/postgresql/postgresql.conf\n      - -c\n      - log_min_messages=fatal\n    restart: unless-stopped\n    ports:\n      - \\${POSTGRES_PORT}:\\${POSTGRES_PORT}\n    environment:\n      POSTGRES_HOST: /var/run/postgresql\n      PGPORT: \\${POSTGRES_PORT}\n      POSTGRES_PORT: \\${POSTGRES_PORT}\n      PGPASSWORD: \\${POSTGRES_PASSWORD}\n      POSTGRES_PASSWORD: \\${POSTGRES_PASSWORD}\n      PGDATABASE: \\${POSTGRES_DB}\n      POSTGRES_DB: \\${POSTGRES_DB}\n      JWT_SECRET: \\${JWT_SECRET}\n      JWT_EXP: \\${JWT_EXPIRY}\n    volumes:\n      - ./volumes/db/realtime.sql:/docker-entrypoint-initdb.d/migrations/99-realtime.sql:Z\n      - ./volumes/db/webhooks.sql:/docker-entrypoint-initdb.d/init-scripts/98-webhooks.sql:Z\n      - ./volumes/db/roles.sql:/docker-entrypoint-initdb.d/init-scripts/99-roles.sql:Z\n      - ./volumes/db/jwt.sql:/docker-entrypoint-initdb.d/init-scripts/99-jwt.sql:Z\n      - ./volumes/db/data:/var/lib/postgresql/data:Z\n      - ./volumes/db/logs.sql:/docker-entrypoint-initdb.d/migrations/99-logs.sql:Z\n      - db-config-testhash:/etc/postgresql-custom\n\n  vector:\n    container_name: supabase-vector\n    image: timberio/vector:0.28.1-alpine\n    healthcheck:\n      test:\n        [\n          \"CMD\",\n          \"wget\",\n          \"--no-verbose\",\n          \"--tries=1\",\n          \"--spider\",\n          \"http://vector:9001/health\"\n        ]\n      timeout: 5s\n      interval: 5s\n      retries: 3\n    volumes:\n      - ./volumes/logs/vector.yml:/etc/vector/vector.yml:ro\n      - \\${DOCKER_SOCKET_LOCATION}:/var/run/docker.sock:ro\n    environment:\n      LOGFLARE_API_KEY: \\${LOGFLARE_API_KEY}\n    command: [ \"--config\", \"etc/vector/vector.yml\" ]\n\nvolumes:\n  db-config-testhash:\n`);\n\ntest(\"Expect to change the suffix in all the possible places (4 Try)\", () => {\n\tconst composeData = parse(composeFileComplex) as ComposeSpecification;\n\tconst suffix = \"testhash\";\n\n\tconst updatedComposeData = addSuffixToAllVolumes(composeData, suffix);\n\n\texpect(updatedComposeData).toEqual(expectedDockerComposeComplex);\n});\n\nconst composeFileExample1 = `\nversion: \"3.8\"\nservices:\n  web:\n    image: nginx:latest\n    ports:\n      - \"80:80\"\n    networks:\n      - frontend\n    volumes:\n      - web-data:/var/www/html\n      - ./nginx.conf:/etc/nginx/nginx.conf:ro\n\n  app:\n    image: node:14\n    depends_on:\n      - db\n    networks:\n      - backend\n      - frontend\n    volumes:\n      - app-data:/usr/src/app\n      - ./src:/usr/src/app/src\n\n  db:\n    image: postgres:13\n    environment:\n      POSTGRES_PASSWORD: example\n    networks:\n      - backend\n    volumes:\n      - db-data:/var/lib/postgresql/data\n\nnetworks:\n  frontend:\n    driver: bridge\n  backend:\n    driver: bridge\n\nvolumes:\n  web-data:\n  app-data:\n  db-data:\n`;\n\nconst expectedDockerComposeExample1 = parse(`\nversion: \"3.8\"\nservices:\n  web:\n    image: nginx:latest\n    ports:\n      - \"80:80\"\n    networks:\n      - frontend\n    volumes:\n      - web-data-testhash:/var/www/html\n      - ./nginx.conf:/etc/nginx/nginx.conf:ro\n\n  app:\n    image: node:14\n    depends_on:\n      - db\n    networks:\n      - backend\n      - frontend\n    volumes:\n      - app-data-testhash:/usr/src/app\n      - ./src:/usr/src/app/src\n\n  db:\n    image: postgres:13\n    environment:\n      POSTGRES_PASSWORD: example\n    networks:\n      - backend\n    volumes:\n      - db-data-testhash:/var/lib/postgresql/data\n\nnetworks:\n  frontend:\n    driver: bridge\n  backend:\n    driver: bridge\n\nvolumes:\n  web-data-testhash:\n  app-data-testhash:\n  db-data-testhash:\n`) as ComposeSpecification;\n\ntest(\"Expect to change the suffix in all the possible places (5 Try)\", () => {\n\tconst composeData = parse(composeFileExample1) as ComposeSpecification;\n\tconst suffix = \"testhash\";\n\n\tconst updatedComposeData = addSuffixToAllVolumes(composeData, suffix);\n\n\texpect(updatedComposeData).toEqual(expectedDockerComposeExample1);\n});\n\nconst composeFileBackrest = `\nservices:\n  backrest:\n    image: garethgeorge/backrest:v1.7.3\n    restart: unless-stopped\n    ports:\n      - 9898\n    environment:\n      - BACKREST_PORT=9898\n      - BACKREST_DATA=/data\n      - BACKREST_CONFIG=/config/config.json\n      - XDG_CACHE_HOME=/cache\n      - TZ=\\${TZ}\n    volumes:\n      - backrest/data:/data\n      - backrest/config:/config\n      - backrest/cache:/cache\n      - /:/userdata:ro\n\nvolumes:\n  backrest:\n  backrest-cache:\n`;\n\nconst expectedDockerComposeBackrest = parse(`\nservices:\n  backrest:\n    image: garethgeorge/backrest:v1.7.3\n    restart: unless-stopped\n    ports:\n      - 9898\n    environment:\n      - BACKREST_PORT=9898\n      - BACKREST_DATA=/data\n      - BACKREST_CONFIG=/config/config.json\n      - XDG_CACHE_HOME=/cache\n      - TZ=\\${TZ}\n    volumes:\n      - backrest-testhash/data:/data\n      - backrest-testhash/config:/config\n      - backrest-testhash/cache:/cache\n      - /:/userdata:ro\n\nvolumes:\n  backrest-testhash:\n  backrest-cache-testhash:\n`) as ComposeSpecification;\n\ntest(\"Should handle volume paths with subdirectories correctly\", () => {\n\tconst composeData = parse(composeFileBackrest) as ComposeSpecification;\n\tconst suffix = \"testhash\";\n\n\tconst updatedComposeData = addSuffixToAllVolumes(composeData, suffix);\n\n\texpect(updatedComposeData).toEqual(expectedDockerComposeBackrest);\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/compose/volume/volume-root.test.ts",
    "content": "import type { ComposeSpecification } from \"@dokploy/server\";\nimport { addSuffixToVolumesRoot, generateRandomHash } from \"@dokploy/server\";\nimport { expect, test } from \"vitest\";\nimport { parse } from \"yaml\";\n\nconst composeFile = `\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    volumes:\n      - web_data:/var/lib/nginx/data\n\nvolumes:\n  web_data:\n    driver: local\n\nnetworks:\n  default:\n    driver: bridge\n`;\n\ntest(\"Generate random hash with 8 characters\", () => {\n\tconst hash = generateRandomHash();\n\n\texpect(hash).toBeDefined();\n\texpect(hash.length).toBe(8);\n});\n\ntest(\"Add suffix to volumes in root property\", () => {\n\tconst composeData = parse(composeFile) as ComposeSpecification;\n\n\tconst suffix = generateRandomHash();\n\n\tif (!composeData?.volumes) {\n\t\treturn;\n\t}\n\tconst volumes = addSuffixToVolumesRoot(composeData.volumes, suffix);\n\texpect(volumes).toBeDefined();\n\tfor (const volumeKey of Object.keys(volumes)) {\n\t\texpect(volumeKey).toContain(`-${suffix}`);\n\t\texpect(volumes[volumeKey]).toBeDefined();\n\t}\n});\n\nconst composeFile2 = `\nversion: \"3.8\"\n\nservices:\n  app:\n    image: node:latest\n    volumes:\n      - app_data:/var/lib/app/data\n\nvolumes:\n  app_data:\n    driver: local\n    driver_opts:\n      type: nfs\n      o: addr=10.0.0.1,rw\n      device: \":/exported/path\"\n\nnetworks:\n  default:\n    driver: bridge\n`;\n\ntest(\"Add suffix to volumes in root property (Case 2)\", () => {\n\tconst composeData = parse(composeFile2) as ComposeSpecification;\n\n\tconst suffix = generateRandomHash();\n\n\tif (!composeData?.volumes) {\n\t\treturn;\n\t}\n\tconst volumes = addSuffixToVolumesRoot(composeData.volumes, suffix);\n\texpect(volumes).toBeDefined();\n\tfor (const volumeKey of Object.keys(volumes)) {\n\t\texpect(volumeKey).toContain(`-${suffix}`);\n\t\texpect(volumes[volumeKey]).toBeDefined();\n\t}\n});\n\nconst composeFile3 = `\nversion: \"3.8\"\n\nservices:\n  db:\n    image: postgres:latest\n    volumes:\n      - db_data:/var/lib/postgresql/data\n\nvolumes:\n  db_data:\n    external: true\n\nnetworks:\n  default:\n    driver: bridge\n`;\n\ntest(\"Add suffix to volumes in root property (Case 3)\", () => {\n\tconst composeData = parse(composeFile3) as ComposeSpecification;\n\n\tconst suffix = generateRandomHash();\n\n\tif (!composeData?.volumes) {\n\t\treturn;\n\t}\n\tconst volumes = addSuffixToVolumesRoot(composeData.volumes, suffix);\n\n\texpect(volumes).toBeDefined();\n\tfor (const volumeKey of Object.keys(volumes)) {\n\t\texpect(volumeKey).toContain(`-${suffix}`);\n\t\texpect(volumes[volumeKey]).toBeDefined();\n\t}\n});\n\nconst composeFile4 = `\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n\n  app:\n    image: node:latest\n\n  db:\n    image: postgres:latest\n\nvolumes:\n  web_data:\n    driver: local\n\n  app_data:\n    driver: local\n    driver_opts:\n      type: nfs\n      o: addr=10.0.0.1,rw\n      device: \":/exported/path\"\n\n  db_data:\n    external: true\n\n\n`;\n\n// Expected compose file con el prefijo `testhash`\nconst expectedComposeFile4 = parse(`\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n\n  app:\n    image: node:latest\n\n  db:\n    image: postgres:latest\n\nvolumes:\n  web_data-testhash:\n    driver: local\n\n  app_data-testhash:\n    driver: local\n    driver_opts:\n      type: nfs\n      o: addr=10.0.0.1,rw\n      device: \":/exported/path\"\n\n  db_data-testhash:\n    external: true\n\n\n`) as ComposeSpecification;\n\ntest(\"Add suffix to volumes in root property\", () => {\n\tconst composeData = parse(composeFile4) as ComposeSpecification;\n\n\tconst suffix = \"testhash\";\n\n\tif (!composeData?.volumes) {\n\t\treturn;\n\t}\n\tconst volumes = addSuffixToVolumesRoot(composeData.volumes, suffix);\n\tconst updatedComposeData = { ...composeData, volumes };\n\n\t// Verificar que el resultado coincide con el archivo esperado\n\texpect(updatedComposeData).toEqual(expectedComposeFile4);\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/compose/volume/volume-services.test.ts",
    "content": "import type { ComposeSpecification } from \"@dokploy/server\";\nimport {\n\taddSuffixToVolumesInServices,\n\tgenerateRandomHash,\n} from \"@dokploy/server\";\nimport { expect, test } from \"vitest\";\nimport { parse } from \"yaml\";\n\ntest(\"Generate random hash with 8 characters\", () => {\n\tconst hash = generateRandomHash();\n\n\texpect(hash).toBeDefined();\n\texpect(hash.length).toBe(8);\n});\n\nconst composeFile1 = `\nversion: \"3.8\"\n\nservices:\n  db:\n    image: postgres:latest\n    volumes:\n      - db_data:/var/lib/postgresql/data\n`;\n\ntest(\"Add suffix to volumes declared directly in services\", () => {\n\tconst composeData = parse(composeFile1) as ComposeSpecification;\n\n\tconst suffix = generateRandomHash();\n\n\tif (!composeData.services) {\n\t\treturn;\n\t}\n\n\tconst updatedComposeData = addSuffixToVolumesInServices(\n\t\tcomposeData.services,\n\t\tsuffix,\n\t);\n\tconst actualComposeData = { ...composeData, services: updatedComposeData };\n\texpect(actualComposeData.services?.db?.volumes).toContain(\n\t\t`db_data-${suffix}:/var/lib/postgresql/data`,\n\t);\n});\n\nconst composeFileTypeVolume = `\nversion: \"3.8\"\n\nservices:\n  db:\n    image: postgres:latest\n    volumes:\n      - type: volume\n        source: db-test\n        target: /var/lib/postgresql/data\n\nvolumes:\n  db-test:\n    driver: local\n`;\n\ntest(\"Add suffix to volumes declared directly in services (Case 2)\", () => {\n\tconst composeData = parse(composeFileTypeVolume) as ComposeSpecification;\n\n\tconst suffix = generateRandomHash();\n\n\tif (!composeData.services) {\n\t\treturn;\n\t}\n\n\tconst updatedComposeData = addSuffixToVolumesInServices(\n\t\tcomposeData.services,\n\t\tsuffix,\n\t);\n\tconst actualComposeData = { ...composeData, services: updatedComposeData };\n\n\texpect(actualComposeData.services?.db?.volumes).toEqual([\n\t\t{\n\t\t\ttype: \"volume\",\n\t\t\tsource: `db-test-${suffix}`,\n\t\t\ttarget: \"/var/lib/postgresql/data\",\n\t\t},\n\t]);\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/compose/volume/volume.test.ts",
    "content": "import type { ComposeSpecification } from \"@dokploy/server\";\nimport { addSuffixToAllVolumes } from \"@dokploy/server\";\nimport { expect, test } from \"vitest\";\nimport { parse } from \"yaml\";\n\nconst composeFileTypeVolume = `\nversion: \"3.8\"\n\nservices:\n  db1:\n    image: postgres:latest\n    volumes:\n      - \"db-test:/var/lib/postgresql/data\"\n  db2:\n    image: postgres:latest\n    volumes:\n      - type: volume\n        source: db-test\n        target: /var/lib/postgresql/data\n\nvolumes:\n  db-test:\n    driver: local\n`;\n\nconst expectedComposeFileTypeVolume = parse(`\nversion: \"3.8\"\n\nservices:\n  db1:\n    image: postgres:latest\n    volumes:\n      - \"db-test-testhash:/var/lib/postgresql/data\"\n  db2:\n    image: postgres:latest\n    volumes:\n      - type: volume\n        source: db-test-testhash\n        target: /var/lib/postgresql/data\n\nvolumes:\n  db-test-testhash:\n    driver: local\n`) as ComposeSpecification;\n\ntest(\"Add suffix to volumes with type: volume in services\", () => {\n\tconst composeData = parse(composeFileTypeVolume) as ComposeSpecification;\n\n\tconst suffix = \"testhash\";\n\n\tconst updatedComposeData = addSuffixToAllVolumes(composeData, suffix);\n\tconst actualComposeData = { ...composeData, ...updatedComposeData };\n\n\texpect(actualComposeData).toEqual(expectedComposeFileTypeVolume);\n});\n\nconst composeFileTypeVolume1 = `\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    volumes:\n      - \"web-data:/var/www/html\"\n      - type: volume\n        source: web-logs\n        target: /var/log/nginx\n\nvolumes:\n  web-data:\n    driver: local\n  web-logs:\n    driver: local\n`;\n\nconst expectedComposeFileTypeVolume1 = parse(`\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    volumes:\n      - \"web-data-testhash:/var/www/html\"\n      - type: volume\n        source: web-logs-testhash\n        target: /var/log/nginx\n\nvolumes:\n  web-data-testhash:\n    driver: local\n  web-logs-testhash:\n    driver: local\n`) as ComposeSpecification;\n\ntest(\"Add suffix to mixed volumes in services\", () => {\n\tconst composeData = parse(composeFileTypeVolume1) as ComposeSpecification;\n\n\tconst suffix = \"testhash\";\n\n\tconst updatedComposeData = addSuffixToAllVolumes(composeData, suffix);\n\tconst actualComposeData = { ...composeData, ...updatedComposeData };\n\n\texpect(actualComposeData).toEqual(expectedComposeFileTypeVolume1);\n});\n\nconst composeFileTypeVolume2 = `\nversion: \"3.8\"\n\nservices:\n  app:\n    image: node:latest\n    volumes:\n      - \"app-data:/usr/src/app\"\n      - type: volume\n        source: app-logs\n        target: /var/log/app\n        volume:\n          nocopy: true\n\nvolumes:\n  app-data:\n    driver: local\n  app-logs:\n    driver: local\n    driver_opts:\n      o: bind\n      type: none\n      device: /path/to/app/logs\n`;\n\nconst expectedComposeFileTypeVolume2 = parse(`\nversion: \"3.8\"\n\nservices:\n  app:\n    image: node:latest\n    volumes:\n      - \"app-data-testhash:/usr/src/app\"\n      - type: volume\n        source: app-logs-testhash\n        target: /var/log/app\n        volume:\n          nocopy: true\n\nvolumes:\n  app-data-testhash:\n    driver: local\n  app-logs-testhash:\n    driver: local\n    driver_opts:\n      o: bind\n      type: none\n      device: /path/to/app/logs\n`) as ComposeSpecification;\n\ntest(\"Add suffix to complex volume configurations in services\", () => {\n\tconst composeData = parse(composeFileTypeVolume2) as ComposeSpecification;\n\n\tconst suffix = \"testhash\";\n\n\tconst updatedComposeData = addSuffixToAllVolumes(composeData, suffix);\n\tconst actualComposeData = { ...composeData, ...updatedComposeData };\n\n\texpect(actualComposeData).toEqual(expectedComposeFileTypeVolume2);\n});\n\nconst composeFileTypeVolume3 = `\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    volumes:\n      - \"web-data:/usr/share/nginx/html\"\n      - type: volume\n        source: web-logs\n        target: /var/log/nginx\n        volume:\n          nocopy: true\n\n  api:\n    image: node:latest\n    volumes:\n      - \"api-data:/usr/src/app\"\n      - type: volume\n        source: api-logs\n        target: /var/log/app\n        volume:\n          nocopy: true\n      - type: volume\n        source: shared-logs\n        target: /shared/logs\n\nvolumes:\n  web-data:\n    driver: local\n  web-logs:\n    driver: local\n    driver_opts:\n      o: bind\n      type: none\n      device: /path/to/web/logs\n\n  api-data:\n    driver: local\n  api-logs:\n    driver: local\n    driver_opts:\n      o: bind\n      type: none\n      device: /path/to/api/logs\n\n  shared-logs:\n    driver: local\n    driver_opts:\n      o: bind\n      type: none\n      device: /path/to/shared/logs\n`;\n\nconst expectedComposeFileTypeVolume3 = parse(`\nversion: \"3.8\"\n\nservices:\n  web:\n    image: nginx:latest\n    volumes:\n      - \"web-data-testhash:/usr/share/nginx/html\"\n      - type: volume\n        source: web-logs-testhash\n        target: /var/log/nginx\n        volume:\n          nocopy: true\n\n  api:\n    image: node:latest\n    volumes:\n      - \"api-data-testhash:/usr/src/app\"\n      - type: volume\n        source: api-logs-testhash\n        target: /var/log/app\n        volume:\n          nocopy: true\n      - type: volume\n        source: shared-logs-testhash\n        target: /shared/logs\n\nvolumes:\n  web-data-testhash:\n    driver: local\n  web-logs-testhash:\n    driver: local\n    driver_opts:\n      o: bind\n      type: none\n      device: /path/to/web/logs\n\n  api-data-testhash:\n    driver: local\n  api-logs-testhash:\n    driver: local\n    driver_opts:\n      o: bind\n      type: none\n      device: /path/to/api/logs\n\n  shared-logs-testhash:\n    driver: local\n    driver_opts:\n      o: bind\n      type: none\n      device: /path/to/shared/logs\n`) as ComposeSpecification;\n\ntest(\"Add suffix to complex nested volumes configuration in services\", () => {\n\tconst composeData = parse(composeFileTypeVolume3) as ComposeSpecification;\n\n\tconst suffix = \"testhash\";\n\n\tconst updatedComposeData = addSuffixToAllVolumes(composeData, suffix);\n\tconst actualComposeData = { ...composeData, ...updatedComposeData };\n\n\texpect(actualComposeData).toEqual(expectedComposeFileTypeVolume3);\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/deploy/application.command.test.ts",
    "content": "import * as adminService from \"@dokploy/server/services/admin\";\nimport * as applicationService from \"@dokploy/server/services/application\";\nimport { deployApplication } from \"@dokploy/server/services/application\";\nimport * as deploymentService from \"@dokploy/server/services/deployment\";\nimport * as builders from \"@dokploy/server/utils/builders\";\nimport * as notifications from \"@dokploy/server/utils/notifications/build-success\";\nimport * as execProcess from \"@dokploy/server/utils/process/execAsync\";\nimport * as gitProvider from \"@dokploy/server/utils/providers/git\";\nimport { beforeEach, describe, expect, it, vi } from \"vitest\";\n\nvi.mock(\"@dokploy/server/db\", () => {\n\tconst createChainableMock = (): any => {\n\t\tconst chain = {\n\t\t\tset: vi.fn(() => chain),\n\t\t\twhere: vi.fn(() => chain),\n\t\t\treturning: vi.fn().mockResolvedValue([{}] as any),\n\t\t\tfrom: vi.fn(() => chain),\n\t\t\tinnerJoin: vi.fn(() => chain),\n\t\t\tthen: (resolve: (v: any) => void) => {\n\t\t\t\tresolve([]);\n\t\t\t},\n\t\t} as any;\n\t\treturn chain;\n\t};\n\n\treturn {\n\t\tdb: {\n\t\t\tselect: vi.fn(() => createChainableMock()),\n\t\t\tinsert: vi.fn(),\n\t\t\tupdate: vi.fn(() => createChainableMock()),\n\t\t\tdelete: vi.fn(),\n\t\t\tquery: {\n\t\t\t\tapplications: {\n\t\t\t\t\tfindFirst: vi.fn(),\n\t\t\t\t},\n\t\t\t\tpatch: {\n\t\t\t\t\tfindMany: vi.fn().mockResolvedValue([]),\n\t\t\t\t},\n\t\t\t\tmember: {\n\t\t\t\t\tfindMany: vi.fn().mockResolvedValue([]),\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t};\n});\n\nvi.mock(\"@dokploy/server/services/application\", async () => {\n\tconst actual = await vi.importActual<\n\t\ttypeof import(\"@dokploy/server/services/application\")\n\t>(\"@dokploy/server/services/application\");\n\treturn {\n\t\t...actual,\n\t\tfindApplicationById: vi.fn(),\n\t\tupdateApplicationStatus: vi.fn(),\n\t};\n});\n\nvi.mock(\"@dokploy/server/services/admin\", () => ({\n\tgetDokployUrl: vi.fn(),\n}));\n\nvi.mock(\"@dokploy/server/services/deployment\", () => ({\n\tcreateDeployment: vi.fn(),\n\tupdateDeploymentStatus: vi.fn(),\n\tupdateDeployment: vi.fn(),\n}));\n\nvi.mock(\"@dokploy/server/utils/providers/git\", async () => {\n\tconst actual = await vi.importActual<\n\t\ttypeof import(\"@dokploy/server/utils/providers/git\")\n\t>(\"@dokploy/server/utils/providers/git\");\n\treturn {\n\t\t...actual,\n\t\tgetGitCommitInfo: vi.fn(),\n\t};\n});\n\nvi.mock(\"@dokploy/server/utils/process/execAsync\", () => ({\n\texecAsync: vi.fn(),\n\tExecError: class ExecError extends Error {},\n}));\n\nvi.mock(\"@dokploy/server/utils/builders\", async () => {\n\tconst actual = await vi.importActual<\n\t\ttypeof import(\"@dokploy/server/utils/builders\")\n\t>(\"@dokploy/server/utils/builders\");\n\treturn {\n\t\t...actual,\n\t\tmechanizeDockerContainer: vi.fn(),\n\t\tgetBuildCommand: vi.fn(),\n\t};\n});\n\nvi.mock(\"@dokploy/server/utils/notifications/build-success\", () => ({\n\tsendBuildSuccessNotifications: vi.fn(),\n}));\n\nvi.mock(\"@dokploy/server/utils/notifications/build-error\", () => ({\n\tsendBuildErrorNotifications: vi.fn(),\n}));\n\nvi.mock(\"@dokploy/server/services/rollbacks\", () => ({\n\tcreateRollback: vi.fn(),\n}));\n\nimport { db } from \"@dokploy/server/db\";\nimport { cloneGitRepository } from \"@dokploy/server/utils/providers/git\";\n\nconst createMockApplication = (overrides = {}) => ({\n\tapplicationId: \"test-app-id\",\n\tname: \"Test App\",\n\tappName: \"test-app\",\n\tsourceType: \"git\" as const,\n\tcustomGitUrl: \"https://github.com/Dokploy/examples.git\",\n\tcustomGitBranch: \"main\",\n\tcustomGitSSHKeyId: null,\n\tbuildType: \"nixpacks\" as const,\n\tbuildPath: \"/astro\",\n\tenv: \"NODE_ENV=production\",\n\tserverId: null,\n\trollbackActive: false,\n\tenableSubmodules: false,\n\tenvironmentId: \"env-id\",\n\tenvironment: {\n\t\tprojectId: \"project-id\",\n\t\tenv: \"\",\n\t\tname: \"production\",\n\t\tproject: {\n\t\t\tname: \"Test Project\",\n\t\t\torganizationId: \"org-id\",\n\t\t\tenv: \"\",\n\t\t},\n\t},\n\tdomains: [],\n\t...overrides,\n});\n\nconst createMockDeployment = () => ({\n\tdeploymentId: \"deployment-id\",\n\tlogPath: \"/tmp/test-deployment.log\",\n});\n\ndescribe(\"deployApplication - Command Generation Tests\", () => {\n\tbeforeEach(() => {\n\t\tvi.clearAllMocks();\n\t\tvi.mocked(db.query.applications.findFirst).mockResolvedValue(\n\t\t\tcreateMockApplication() as any,\n\t\t);\n\t\tvi.mocked(applicationService.findApplicationById).mockResolvedValue(\n\t\t\tcreateMockApplication() as any,\n\t\t);\n\t\tvi.mocked(adminService.getDokployUrl).mockResolvedValue(\n\t\t\t\"http://localhost:3000\",\n\t\t);\n\t\tvi.mocked(deploymentService.createDeployment).mockResolvedValue(\n\t\t\tcreateMockDeployment() as any,\n\t\t);\n\t\tvi.mocked(execProcess.execAsync).mockResolvedValue({\n\t\t\tstdout: \"\",\n\t\t\tstderr: \"\",\n\t\t} as any);\n\t\tvi.mocked(builders.mechanizeDockerContainer).mockResolvedValue(\n\t\t\tundefined as any,\n\t\t);\n\t\tvi.mocked(deploymentService.updateDeploymentStatus).mockResolvedValue(\n\t\t\tundefined as any,\n\t\t);\n\t\tvi.mocked(applicationService.updateApplicationStatus).mockResolvedValue(\n\t\t\t{} as any,\n\t\t);\n\t\tvi.mocked(notifications.sendBuildSuccessNotifications).mockResolvedValue(\n\t\t\tundefined as any,\n\t\t);\n\t\tvi.mocked(gitProvider.getGitCommitInfo).mockResolvedValue({\n\t\t\tmessage: \"test commit\",\n\t\t\thash: \"abc123\",\n\t\t});\n\t\tvi.mocked(deploymentService.updateDeployment).mockResolvedValue({} as any);\n\t});\n\n\tit(\"should generate correct git clone command for astro example\", async () => {\n\t\tconst app = createMockApplication();\n\t\tconst command = await cloneGitRepository(app);\n\t\tconsole.log(command);\n\n\t\texpect(command).toContain(\"https://github.com/Dokploy/examples.git\");\n\t\texpect(command).not.toContain(\"--recurse-submodules\");\n\t\texpect(command).toContain(\"--branch main\");\n\t\texpect(command).toContain(\"--depth 1\");\n\t\texpect(command).toContain(\"git clone\");\n\t});\n\n\tit(\"should generate git clone with submodules when enabled\", async () => {\n\t\tconst app = createMockApplication({ enableSubmodules: true });\n\t\tconst command = await cloneGitRepository(app);\n\n\t\texpect(command).toContain(\"--recurse-submodules\");\n\t\texpect(command).toContain(\"https://github.com/Dokploy/examples.git\");\n\t});\n\n\tit(\"should verify nixpacks command is called with correct app\", async () => {\n\t\tconst mockNixpacksCommand = \"nixpacks build /path/to/app --name test-app\";\n\t\tvi.mocked(builders.getBuildCommand).mockResolvedValue(mockNixpacksCommand);\n\n\t\tawait deployApplication({\n\t\t\tapplicationId: \"test-app-id\",\n\t\t\ttitleLog: \"Test deployment\",\n\t\t\tdescriptionLog: \"\",\n\t\t});\n\n\t\texpect(builders.getBuildCommand).toHaveBeenCalledWith(\n\t\t\texpect.objectContaining({\n\t\t\t\tbuildType: \"nixpacks\",\n\t\t\t\tcustomGitUrl: \"https://github.com/Dokploy/examples.git\",\n\t\t\t\tbuildPath: \"/astro\",\n\t\t\t}),\n\t\t);\n\n\t\texpect(execProcess.execAsync).toHaveBeenCalledWith(\n\t\t\texpect.stringContaining(\"nixpacks build\"),\n\t\t);\n\t});\n\n\tit(\"should verify railpack command includes correct parameters\", async () => {\n\t\tconst mockApp = createMockApplication({ buildType: \"railpack\" });\n\t\tvi.mocked(db.query.applications.findFirst).mockResolvedValue(\n\t\t\tmockApp as any,\n\t\t);\n\t\tvi.mocked(applicationService.findApplicationById).mockResolvedValue(\n\t\t\tmockApp as any,\n\t\t);\n\n\t\tconst mockRailpackCommand = \"railpack prepare /path/to/app\";\n\t\tvi.mocked(builders.getBuildCommand).mockResolvedValue(mockRailpackCommand);\n\n\t\tawait deployApplication({\n\t\t\tapplicationId: \"test-app-id\",\n\t\t\ttitleLog: \"Railpack test\",\n\t\t\tdescriptionLog: \"\",\n\t\t});\n\n\t\texpect(builders.getBuildCommand).toHaveBeenCalledWith(\n\t\t\texpect.objectContaining({\n\t\t\t\tbuildType: \"railpack\",\n\t\t\t}),\n\t\t);\n\n\t\texpect(execProcess.execAsync).toHaveBeenCalledWith(\n\t\t\texpect.stringContaining(\"railpack prepare\"),\n\t\t);\n\t});\n\n\tit(\"should execute commands in correct order\", async () => {\n\t\tconst mockNixpacksCommand = \"nixpacks build\";\n\t\tvi.mocked(builders.getBuildCommand).mockResolvedValue(mockNixpacksCommand);\n\n\t\tawait deployApplication({\n\t\t\tapplicationId: \"test-app-id\",\n\t\t\ttitleLog: \"Test\",\n\t\t\tdescriptionLog: \"\",\n\t\t});\n\n\t\tconst execCalls = vi.mocked(execProcess.execAsync).mock.calls;\n\t\texpect(execCalls.length).toBeGreaterThan(0);\n\n\t\tconst fullCommand = execCalls[0]?.[0];\n\t\texpect(fullCommand).toContain(\"set -e\");\n\t\texpect(fullCommand).toContain(\"git clone\");\n\t\texpect(fullCommand).toContain(\"nixpacks build\");\n\t});\n\n\tit(\"should include log redirection in command\", async () => {\n\t\tconst mockCommand = \"nixpacks build\";\n\t\tvi.mocked(builders.getBuildCommand).mockResolvedValue(mockCommand);\n\n\t\tawait deployApplication({\n\t\t\tapplicationId: \"test-app-id\",\n\t\t\ttitleLog: \"Test\",\n\t\t\tdescriptionLog: \"\",\n\t\t});\n\n\t\tconst execCalls = vi.mocked(execProcess.execAsync).mock.calls;\n\t\tconst fullCommand = execCalls[0]?.[0];\n\n\t\texpect(fullCommand).toContain(\">> /tmp/test-deployment.log 2>&1\");\n\t});\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/deploy/application.real.test.ts",
    "content": "import { existsSync } from \"node:fs\";\nimport path from \"node:path\";\nimport type { ApplicationNested } from \"@dokploy/server\";\nimport { paths } from \"@dokploy/server/constants\";\nimport { execAsync } from \"@dokploy/server/utils/process/execAsync\";\nimport { format } from \"date-fns\";\nimport { afterEach, beforeEach, describe, expect, it, vi } from \"vitest\";\n\nconst REAL_TEST_TIMEOUT = 180000; // 3 minutes\n\n// Mock ONLY database and notifications\nvi.mock(\"@dokploy/server/db\", () => {\n\tconst createChainableMock = (): any => {\n\t\tconst chain: any = {\n\t\t\tset: vi.fn(() => chain),\n\t\t\twhere: vi.fn(() => chain),\n\t\t\treturning: vi.fn().mockResolvedValue([{}]),\n\t\t\tfrom: vi.fn(() => chain),\n\t\t\tinnerJoin: vi.fn(() => chain),\n\t\t\tthen: (resolve: (v: any) => void) => {\n\t\t\t\tresolve([]);\n\t\t\t},\n\t\t};\n\t\treturn chain;\n\t};\n\n\treturn {\n\t\tdb: {\n\t\t\tselect: vi.fn(() => createChainableMock()),\n\t\t\tinsert: vi.fn(),\n\t\t\tupdate: vi.fn(() => createChainableMock()),\n\t\t\tdelete: vi.fn(),\n\t\t\tquery: {\n\t\t\t\tapplications: {\n\t\t\t\t\tfindFirst: vi.fn(),\n\t\t\t\t},\n\t\t\t\tpatch: {\n\t\t\t\t\tfindMany: vi.fn().mockResolvedValue([]),\n\t\t\t\t},\n\t\t\t\tmember: {\n\t\t\t\t\tfindMany: vi.fn().mockResolvedValue([]),\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t};\n});\n\nvi.mock(\"@dokploy/server/services/application\", async () => {\n\tconst actual = await vi.importActual<\n\t\ttypeof import(\"@dokploy/server/services/application\")\n\t>(\"@dokploy/server/services/application\");\n\treturn {\n\t\t...actual,\n\t\tfindApplicationById: vi.fn(),\n\t\tupdateApplicationStatus: vi.fn(),\n\t};\n});\n\nvi.mock(\"@dokploy/server/services/admin\", () => ({\n\tgetDokployUrl: vi.fn().mockResolvedValue(\"http://localhost:3000\"),\n}));\n\nvi.mock(\"@dokploy/server/services/deployment\", () => ({\n\tcreateDeployment: vi.fn(),\n\tupdateDeploymentStatus: vi.fn(),\n\tupdateDeployment: vi.fn(),\n}));\n\nvi.mock(\"@dokploy/server/utils/notifications/build-success\", () => ({\n\tsendBuildSuccessNotifications: vi.fn(),\n}));\n\nvi.mock(\"@dokploy/server/utils/notifications/build-error\", () => ({\n\tsendBuildErrorNotifications: vi.fn(),\n}));\n\nvi.mock(\"@dokploy/server/services/rollbacks\", () => ({\n\tcreateRollback: vi.fn(),\n}));\n\n// NOT mocked (executed for real):\n// - execAsync\n// - cloneGitRepository\n// - getBuildCommand\n// - mechanizeDockerContainer (requires Docker Swarm)\n\nimport { db } from \"@dokploy/server/db\";\nimport * as adminService from \"@dokploy/server/services/admin\";\nimport * as applicationService from \"@dokploy/server/services/application\";\nimport { deployApplication } from \"@dokploy/server/services/application\";\nimport * as deploymentService from \"@dokploy/server/services/deployment\";\n\nconst createMockApplication = (\n\toverrides: Partial<ApplicationNested> = {},\n): ApplicationNested =>\n\t({\n\t\tapplicationId: \"test-app-id\",\n\t\tname: \"Real Test App\",\n\t\tappName: `real-test-${Date.now()}`,\n\t\tsourceType: \"git\" as const,\n\t\tcustomGitUrl: \"https://github.com/Dokploy/examples.git\",\n\t\tcustomGitBranch: \"main\",\n\t\tcustomGitSSHKeyId: null,\n\t\tcustomGitBuildPath: \"/astro\",\n\t\tbuildType: \"nixpacks\" as const,\n\t\tenv: \"NODE_ENV=production\",\n\t\tserverId: null,\n\t\trollbackActive: false,\n\t\tenableSubmodules: false,\n\t\tenvironmentId: \"env-id\",\n\t\tenvironment: {\n\t\t\tprojectId: \"project-id\",\n\t\t\tenv: \"\",\n\t\t\tname: \"production\",\n\t\t\tproject: {\n\t\t\t\tname: \"Test Project\",\n\t\t\t\torganizationId: \"org-id\",\n\t\t\t\tenv: \"\",\n\t\t\t},\n\t\t},\n\t\tdomains: [],\n\t\tmounts: [],\n\t\tsecurity: [],\n\t\tredirects: [],\n\t\tports: [],\n\t\tregistry: null,\n\t\t...overrides,\n\t}) as ApplicationNested;\n\nconst createMockDeployment = async (appName: string) => {\n\tconst { LOGS_PATH } = paths(false); // false = local, no remote server\n\tconst formattedDateTime = format(new Date(), \"yyyy-MM-dd:HH:mm:ss\");\n\tconst fileName = `${appName}-${formattedDateTime}.log`;\n\tconst logFilePath = path.join(LOGS_PATH, appName, fileName);\n\n\t// Actually create the log directory\n\tawait execAsync(`mkdir -p ${path.dirname(logFilePath)}`);\n\tawait execAsync(`echo \"Initializing deployment\" > ${logFilePath}`);\n\n\treturn {\n\t\tdeploymentId: \"deployment-id\",\n\t\tlogPath: logFilePath,\n\t};\n};\n\nasync function cleanupDocker(appName: string) {\n\ttry {\n\t\tawait execAsync(`docker stop ${appName} 2>/dev/null || true`);\n\t\tawait execAsync(`docker rm ${appName} 2>/dev/null || true`);\n\t\tawait execAsync(`docker rmi ${appName} 2>/dev/null || true`);\n\t} catch (error) {\n\t\tconsole.log(\"Docker cleanup completed\");\n\t}\n}\n\nasync function cleanupFiles(appName: string) {\n\ttry {\n\t\tconst { LOGS_PATH, APPLICATIONS_PATH } = paths(false);\n\n\t\t// Clean cloned code directories\n\t\tconst appPath = path.join(APPLICATIONS_PATH, appName);\n\t\tawait execAsync(`rm -rf ${appPath} 2>/dev/null || true`);\n\n\t\t// Clean logs for appName - removes entire folder\n\t\tconst logPath = path.join(LOGS_PATH, appName);\n\t\tawait execAsync(`rm -rf ${logPath} 2>/dev/null || true`);\n\n\t\tconsole.log(`✅ Cleaned up files and logs for ${appName}`);\n\t} catch (error) {\n\t\tconsole.error(`⚠️ Error during cleanup for ${appName}:`, error);\n\t}\n}\n\ndescribe(\n\t\"deployApplication - REAL Execution Tests\",\n\t() => {\n\t\tlet currentAppName: string;\n\t\tlet currentDeployment: any;\n\t\tconst allTestAppNames: string[] = [];\n\n\t\tbeforeEach(async () => {\n\t\t\tvi.clearAllMocks();\n\t\t\tcurrentAppName = `real-test-${Date.now()}`;\n\t\t\tcurrentDeployment = await createMockDeployment(currentAppName);\n\t\t\tallTestAppNames.push(currentAppName);\n\n\t\t\tconst mockApp = createMockApplication({ appName: currentAppName });\n\n\t\t\tvi.mocked(db.query.applications.findFirst).mockResolvedValue(\n\t\t\t\tmockApp as any,\n\t\t\t);\n\t\t\tvi.mocked(applicationService.findApplicationById).mockResolvedValue(\n\t\t\t\tmockApp as any,\n\t\t\t);\n\t\t\tvi.mocked(adminService.getDokployUrl).mockResolvedValue(\n\t\t\t\t\"http://localhost:3000\",\n\t\t\t);\n\t\t\tvi.mocked(deploymentService.createDeployment).mockResolvedValue(\n\t\t\t\tcurrentDeployment as any,\n\t\t\t);\n\t\t\tvi.mocked(deploymentService.updateDeploymentStatus).mockResolvedValue(\n\t\t\t\tundefined as any,\n\t\t\t);\n\t\t\tvi.mocked(applicationService.updateApplicationStatus).mockResolvedValue(\n\t\t\t\t{} as any,\n\t\t\t);\n\t\t\tvi.mocked(deploymentService.updateDeployment).mockResolvedValue(\n\t\t\t\t{} as any,\n\t\t\t);\n\t\t});\n\n\t\tafterEach(async () => {\n\t\t\t// ALWAYS cleanup, even if test failed or passed\n\t\t\tconsole.log(`\\n🧹 Cleaning up test: ${currentAppName}`);\n\n\t\t\t// Clean current appName\n\t\t\ttry {\n\t\t\t\tawait cleanupDocker(currentAppName);\n\t\t\t\tawait cleanupFiles(currentAppName);\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(\"⚠️ Error cleaning current app:\", error);\n\t\t\t}\n\n\t\t\t// Clean ALL test folders just in case\n\t\t\ttry {\n\t\t\t\tconst { LOGS_PATH, APPLICATIONS_PATH } = paths(false);\n\t\t\t\tawait execAsync(`rm -rf ${LOGS_PATH}/real-* 2>/dev/null || true`);\n\t\t\t\tawait execAsync(\n\t\t\t\t\t`rm -rf ${APPLICATIONS_PATH}/real-* 2>/dev/null || true`,\n\t\t\t\t);\n\t\t\t\tconsole.log(\"✅ Cleaned up all test artifacts\");\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(\"⚠️ Error cleaning all artifacts:\", error);\n\t\t\t}\n\n\t\t\tconsole.log(\"✅ Cleanup completed\\n\");\n\t\t});\n\n\t\tit(\n\t\t\t\"should REALLY clone git repo and build with nixpacks\",\n\t\t\tasync () => {\n\t\t\t\tconsole.log(`\\n🚀 Testing real deployment with app: ${currentAppName}`);\n\n\t\t\t\tconst result = await deployApplication({\n\t\t\t\t\tapplicationId: \"test-app-id\",\n\t\t\t\t\ttitleLog: \"Real Nixpacks Test\",\n\t\t\t\t\tdescriptionLog: \"Testing real execution\",\n\t\t\t\t});\n\n\t\t\t\texpect(result).toBe(true);\n\n\t\t\t\t// Verify that Docker image was actually created\n\t\t\t\tconst { stdout: dockerImages } = await execAsync(\n\t\t\t\t\t`docker images ${currentAppName} --format \"{{.Repository}}\"`,\n\t\t\t\t);\n\t\t\t\tconsole.log(\"dockerImages\", dockerImages);\n\t\t\t\texpect(dockerImages.trim()).toBe(currentAppName);\n\t\t\t\tconsole.log(`✅ Docker image created: ${currentAppName}`);\n\n\t\t\t\t// Verify log exists and has content\n\t\t\t\texpect(existsSync(currentDeployment.logPath)).toBe(true);\n\t\t\t\tconst { stdout: logContent } = await execAsync(\n\t\t\t\t\t`cat ${currentDeployment.logPath}`,\n\t\t\t\t);\n\t\t\t\texpect(logContent).toContain(\"Cloning\");\n\t\t\t\texpect(logContent).toContain(\"nixpacks\");\n\t\t\t\tconsole.log(`✅ Build log created with ${logContent.length} chars`);\n\n\t\t\t\t// Verify update functions were called\n\t\t\t\texpect(deploymentService.updateDeploymentStatus).toHaveBeenCalledWith(\n\t\t\t\t\t\"deployment-id\",\n\t\t\t\t\t\"done\",\n\t\t\t\t);\n\t\t\t},\n\t\t\tREAL_TEST_TIMEOUT,\n\t\t);\n\n\t\tit.skip(\n\t\t\t\"should REALLY build with railpack (SKIPPED: requires special permissions)\",\n\t\t\tasync () => {\n\t\t\t\tconst railpackAppName = `real-railpack-${Date.now()}`;\n\t\t\t\tconst railpackApp = createMockApplication({\n\t\t\t\t\tappName: railpackAppName,\n\t\t\t\t\tbuildType: \"railpack\",\n\t\t\t\t\trailpackVersion: \"3\",\n\t\t\t\t});\n\t\t\t\tcurrentAppName = railpackAppName;\n\t\t\t\tallTestAppNames.push(railpackAppName);\n\n\t\t\t\tvi.mocked(db.query.applications.findFirst).mockResolvedValue(\n\t\t\t\t\trailpackApp as any,\n\t\t\t\t);\n\t\t\t\tvi.mocked(applicationService.findApplicationById).mockResolvedValue(\n\t\t\t\t\trailpackApp as any,\n\t\t\t\t);\n\n\t\t\t\tconsole.log(`\\n🚀 Testing real railpack deployment: ${currentAppName}`);\n\n\t\t\t\tconst result = await deployApplication({\n\t\t\t\t\tapplicationId: \"test-app-id\",\n\t\t\t\t\ttitleLog: \"Real Railpack Test\",\n\t\t\t\t\tdescriptionLog: \"\",\n\t\t\t\t});\n\n\t\t\t\texpect(result).toBe(true);\n\n\t\t\t\tconst { stdout: dockerImages } = await execAsync(\n\t\t\t\t\t`docker images ${currentAppName} --format \"{{.Repository}}\"`,\n\t\t\t\t);\n\t\t\t\texpect(dockerImages.trim()).toBe(currentAppName);\n\t\t\t\tconsole.log(`✅ Railpack image created: ${currentAppName}`);\n\n\t\t\t\tconst { stdout: logContent } = await execAsync(\n\t\t\t\t\t`cat ${currentDeployment.logPath}`,\n\t\t\t\t);\n\t\t\t\texpect(logContent).toContain(\"railpack\");\n\t\t\t\tconsole.log(\"✅ Railpack build completed\");\n\t\t\t},\n\t\t\tREAL_TEST_TIMEOUT,\n\t\t);\n\n\t\tit(\n\t\t\t\"should handle REAL git clone errors\",\n\t\t\tasync () => {\n\t\t\t\tconst errorAppName = `real-error-${Date.now()}`;\n\t\t\t\tconst errorApp = createMockApplication({\n\t\t\t\t\tappName: errorAppName,\n\t\t\t\t\tcustomGitUrl:\n\t\t\t\t\t\t\"https://github.com/invalid/nonexistent-repo-123456.git\",\n\t\t\t\t});\n\t\t\t\tcurrentAppName = errorAppName;\n\t\t\t\tallTestAppNames.push(errorAppName);\n\n\t\t\t\tvi.mocked(db.query.applications.findFirst).mockResolvedValue(\n\t\t\t\t\terrorApp as any,\n\t\t\t\t);\n\t\t\t\tvi.mocked(applicationService.findApplicationById).mockResolvedValue(\n\t\t\t\t\terrorApp as any,\n\t\t\t\t);\n\n\t\t\t\tconsole.log(`\\n🚀 Testing real error handling: ${currentAppName}`);\n\n\t\t\t\tawait expect(\n\t\t\t\t\tdeployApplication({\n\t\t\t\t\t\tapplicationId: \"test-app-id\",\n\t\t\t\t\t\ttitleLog: \"Real Error Test\",\n\t\t\t\t\t\tdescriptionLog: \"\",\n\t\t\t\t\t}),\n\t\t\t\t).rejects.toThrow();\n\n\t\t\t\t// Verify error status was called\n\t\t\t\texpect(deploymentService.updateDeploymentStatus).toHaveBeenCalledWith(\n\t\t\t\t\t\"deployment-id\",\n\t\t\t\t\t\"error\",\n\t\t\t\t);\n\n\t\t\t\t// Verify log contains error\n\t\t\t\tconst { stdout: logContent } = await execAsync(\n\t\t\t\t\t`cat ${currentDeployment.logPath}`,\n\t\t\t\t);\n\t\t\t\texpect(logContent.toLowerCase()).toContain(\"error\");\n\t\t\t\tconsole.log(\"✅ Error handling verified\");\n\t\t\t},\n\t\t\tREAL_TEST_TIMEOUT,\n\t\t);\n\n\t\tit(\n\t\t\t\"should REALLY clone with submodules when enabled\",\n\t\t\tasync () => {\n\t\t\t\tconst submodulesAppName = `real-submodules-${Date.now()}`;\n\t\t\t\tconst submodulesApp = createMockApplication({\n\t\t\t\t\tappName: submodulesAppName,\n\t\t\t\t\tenableSubmodules: true,\n\t\t\t\t});\n\t\t\t\tcurrentAppName = submodulesAppName;\n\t\t\t\tallTestAppNames.push(submodulesAppName);\n\n\t\t\t\tvi.mocked(db.query.applications.findFirst).mockResolvedValue(\n\t\t\t\t\tsubmodulesApp as any,\n\t\t\t\t);\n\t\t\t\tvi.mocked(applicationService.findApplicationById).mockResolvedValue(\n\t\t\t\t\tsubmodulesApp as any,\n\t\t\t\t);\n\n\t\t\t\tconsole.log(`\\n🚀 Testing real submodules support: ${currentAppName}`);\n\n\t\t\t\tconst result = await deployApplication({\n\t\t\t\t\tapplicationId: \"test-app-id\",\n\t\t\t\t\ttitleLog: \"Real Submodules Test\",\n\t\t\t\t\tdescriptionLog: \"\",\n\t\t\t\t});\n\n\t\t\t\texpect(result).toBe(true);\n\n\t\t\t\t// Verify deployment completed successfully\n\t\t\t\tconst { stdout: logContent } = await execAsync(\n\t\t\t\t\t`cat ${currentDeployment.logPath}`,\n\t\t\t\t);\n\t\t\t\texpect(logContent).toContain(\"Cloning\");\n\t\t\t\texpect(logContent.length).toBeGreaterThan(100);\n\t\t\t\tconsole.log(\"✅ Submodules deployment completed\");\n\n\t\t\t\t// Verify image\n\t\t\t\tconst { stdout: dockerImages } = await execAsync(\n\t\t\t\t\t`docker images ${currentAppName} --format \"{{.Repository}}\"`,\n\t\t\t\t);\n\t\t\t\texpect(dockerImages.trim()).toBe(currentAppName);\n\t\t\t},\n\t\t\tREAL_TEST_TIMEOUT,\n\t\t);\n\n\t\tit(\n\t\t\t\"should verify REAL commit info extraction\",\n\t\t\tasync () => {\n\t\t\t\tconsole.log(`\\n🚀 Testing real commit info: ${currentAppName}`);\n\n\t\t\t\tawait deployApplication({\n\t\t\t\t\tapplicationId: \"test-app-id\",\n\t\t\t\t\ttitleLog: \"Real Commit Test\",\n\t\t\t\t\tdescriptionLog: \"\",\n\t\t\t\t});\n\n\t\t\t\t// Verify updateDeployment was called with commit info\n\t\t\t\texpect(deploymentService.updateDeployment).toHaveBeenCalled();\n\t\t\t\tconst updateCall = vi.mocked(deploymentService.updateDeployment).mock\n\t\t\t\t\t.calls[0];\n\n\t\t\t\t// Real commit info should have title and hash\n\t\t\t\texpect(updateCall?.[1]).toHaveProperty(\"title\");\n\t\t\t\texpect(updateCall?.[1]).toHaveProperty(\"description\");\n\t\t\t\texpect(updateCall?.[1]?.description).toContain(\"Commit:\");\n\n\t\t\t\tconsole.log(\n\t\t\t\t\t`✅ Real commit extracted: ${updateCall?.[1]?.title?.substring(0, 50)}...`,\n\t\t\t\t);\n\t\t\t},\n\t\t\tREAL_TEST_TIMEOUT,\n\t\t);\n\n\t\tit(\n\t\t\t\"should REALLY build with Dockerfile\",\n\t\t\tasync () => {\n\t\t\t\tconst dockerfileAppName = `real-dockerfile-${Date.now()}`;\n\t\t\t\tconst dockerfileApp = createMockApplication({\n\t\t\t\t\tappName: dockerfileAppName,\n\t\t\t\t\tbuildType: \"dockerfile\",\n\t\t\t\t\tcustomGitBuildPath: \"/deno\",\n\t\t\t\t\tdockerfile: \"Dockerfile\",\n\t\t\t\t});\n\t\t\t\tcurrentAppName = dockerfileAppName;\n\t\t\t\tallTestAppNames.push(dockerfileAppName);\n\n\t\t\t\tvi.mocked(db.query.applications.findFirst).mockResolvedValue(\n\t\t\t\t\tdockerfileApp as any,\n\t\t\t\t);\n\t\t\t\tvi.mocked(applicationService.findApplicationById).mockResolvedValue(\n\t\t\t\t\tdockerfileApp as any,\n\t\t\t\t);\n\n\t\t\t\tconsole.log(`\\n🚀 Testing real Dockerfile build: ${currentAppName}`);\n\n\t\t\t\tconst result = await deployApplication({\n\t\t\t\t\tapplicationId: \"test-app-id\",\n\t\t\t\t\ttitleLog: \"Real Dockerfile Test\",\n\t\t\t\t\tdescriptionLog: \"\",\n\t\t\t\t});\n\n\t\t\t\texpect(result).toBe(true);\n\n\t\t\t\t// Verify log\n\t\t\t\tconst { stdout: logContent } = await execAsync(\n\t\t\t\t\t`cat ${currentDeployment.logPath}`,\n\t\t\t\t);\n\t\t\t\texpect(logContent).toContain(\"Building\");\n\t\t\t\texpect(logContent).toContain(dockerfileAppName);\n\t\t\t\tconsole.log(\"✅ Dockerfile build log verified\");\n\n\t\t\t\t// Verify image\n\t\t\t\tconst { stdout: dockerImages } = await execAsync(\n\t\t\t\t\t`docker images ${currentAppName} --format \"{{.Repository}}\"`,\n\t\t\t\t);\n\t\t\t\tconsole.log(\"dockerImages\", dockerImages);\n\t\t\t\texpect(dockerImages.trim()).toBe(currentAppName);\n\t\t\t\tconsole.log(`✅ Docker image created: ${currentAppName}`);\n\t\t\t},\n\t\t\tREAL_TEST_TIMEOUT,\n\t\t);\n\t},\n\tREAL_TEST_TIMEOUT,\n);\n"
  },
  {
    "path": "apps/dokploy/__test__/deploy/github.test.ts",
    "content": "import { describe, expect, it } from \"vitest\";\nimport {\n\textractCommitMessage,\n\textractImageName,\n\textractImageTag,\n\textractImageTagFromRequest,\n} from \"@/pages/api/deploy/[refreshToken]\";\n\ndescribe(\"GitHub Webhook Skip CI\", () => {\n\tconst mockGithubHeaders = {\n\t\t\"x-github-event\": \"push\",\n\t};\n\n\tconst createMockBody = (message: string) => ({\n\t\thead_commit: {\n\t\t\tmessage,\n\t\t},\n\t});\n\n\tconst skipKeywords = [\n\t\t\"[skip ci]\",\n\t\t\"[ci skip]\",\n\t\t\"[no ci]\",\n\t\t\"[skip actions]\",\n\t\t\"[actions skip]\",\n\t];\n\n\tit(\"should detect skip keywords in commit message\", () => {\n\t\tfor (const keyword of skipKeywords) {\n\t\t\tconst message = `feat: add new feature ${keyword}`;\n\t\t\tconst commitMessage = extractCommitMessage(\n\t\t\t\tmockGithubHeaders,\n\t\t\t\tcreateMockBody(message),\n\t\t\t);\n\t\t\texpect(commitMessage.includes(keyword)).toBe(true);\n\t\t}\n\t});\n\n\tit(\"should not detect skip keywords in normal commit message\", () => {\n\t\tconst message = \"feat: add new feature\";\n\t\tconst commitMessage = extractCommitMessage(\n\t\t\tmockGithubHeaders,\n\t\t\tcreateMockBody(message),\n\t\t);\n\t\tfor (const keyword of skipKeywords) {\n\t\t\texpect(commitMessage.includes(keyword)).toBe(false);\n\t\t}\n\t});\n\n\tit(\"should handle different webhook sources\", () => {\n\t\t// GitHub\n\t\texpect(\n\t\t\textractCommitMessage(\n\t\t\t\t{ \"x-github-event\": \"push\" },\n\t\t\t\t{ head_commit: { message: \"[skip ci] test\" } },\n\t\t\t),\n\t\t).toBe(\"[skip ci] test\");\n\n\t\t// GitLab\n\t\texpect(\n\t\t\textractCommitMessage(\n\t\t\t\t{ \"x-gitlab-event\": \"push\" },\n\t\t\t\t{ commits: [{ message: \"[skip ci] test\" }] },\n\t\t\t),\n\t\t).toBe(\"[skip ci] test\");\n\n\t\t// Bitbucket\n\t\texpect(\n\t\t\textractCommitMessage(\n\t\t\t\t{ \"x-event-key\": \"repo:push\" },\n\t\t\t\t{\n\t\t\t\t\tpush: {\n\t\t\t\t\t\tchanges: [{ new: { target: { message: \"[skip ci] test\" } } }],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t),\n\t\t).toBe(\"[skip ci] test\");\n\n\t\t// Gitea\n\t\texpect(\n\t\t\textractCommitMessage(\n\t\t\t\t{ \"x-gitea-event\": \"push\" },\n\t\t\t\t{ commits: [{ message: \"[skip ci] test\" }] },\n\t\t\t),\n\t\t).toBe(\"[skip ci] test\");\n\n\t\t// Soft Serve\n\t\texpect(\n\t\t\textractCommitMessage(\n\t\t\t\t{ \"x-softserve-event\": \"push\" },\n\t\t\t\t{ commits: [{ message: \"[skip ci] test\" }] },\n\t\t\t),\n\t\t).toBe(\"[skip ci] test\");\n\t});\n\n\tit(\"should handle missing commit message\", () => {\n\t\texpect(extractCommitMessage(mockGithubHeaders, {})).toBe(\"NEW COMMIT\");\n\t\texpect(extractCommitMessage({ \"x-gitlab-event\": \"push\" }, {})).toBe(\n\t\t\t\"NEW COMMIT\",\n\t\t);\n\t\texpect(\n\t\t\textractCommitMessage(\n\t\t\t\t{ \"x-event-key\": \"repo:push\" },\n\t\t\t\t{ push: { changes: [] } },\n\t\t\t),\n\t\t).toBe(\"NEW COMMIT\");\n\t\texpect(extractCommitMessage({ \"x-gitea-event\": \"push\" }, {})).toBe(\n\t\t\t\"NEW COMMIT\",\n\t\t);\n\t\texpect(extractCommitMessage({ \"x-softserve-event\": \"push\" }, {})).toBe(\n\t\t\t\"NEW COMMIT\",\n\t\t);\n\t});\n});\n\ndescribe(\"GitHub Packages Docker Image Tag Extraction\", () => {\n\tit(\"should extract tag from container_metadata\", () => {\n\t\tconst headers = { \"x-github-event\": \"registry_package\" };\n\t\tconst body = {\n\t\t\tregistry_package: {\n\t\t\t\tpackage_version: {\n\t\t\t\t\tversion: \"sha256:abc123...\",\n\t\t\t\t\tcontainer_metadata: {\n\t\t\t\t\t\ttag: {\n\t\t\t\t\t\t\tname: \"v1.0.0\",\n\t\t\t\t\t\t\tdigest: \"sha256:abc123...\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tpackage_url: \"ghcr.io/owner/repo:v1.0.0\",\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\n\t\tconst tag = extractImageTagFromRequest(headers, body);\n\t\texpect(tag).toBe(\"v1.0.0\");\n\t});\n\n\tit(\"should extract tag from package_url when container_metadata tag matches version\", () => {\n\t\tconst headers = { \"x-github-event\": \"registry_package\" };\n\t\tconst body = {\n\t\t\tregistry_package: {\n\t\t\t\tpackage_version: {\n\t\t\t\t\tversion: \"sha256:abc123...\",\n\t\t\t\t\tcontainer_metadata: {\n\t\t\t\t\t\ttag: {\n\t\t\t\t\t\t\tname: \"sha256:abc123...\",\n\t\t\t\t\t\t\tdigest: \"sha256:abc123...\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tpackage_url: \"ghcr.io/owner/repo:latest\",\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\n\t\tconst tag = extractImageTagFromRequest(headers, body);\n\t\texpect(tag).toBe(\"latest\");\n\t});\n\n\tit(\"should extract tag from package_url when container_metadata is missing\", () => {\n\t\tconst headers = { \"x-github-event\": \"registry_package\" };\n\t\tconst body = {\n\t\t\tregistry_package: {\n\t\t\t\tpackage_version: {\n\t\t\t\t\tversion: \"sha256:abc123...\",\n\t\t\t\t\tpackage_url: \"ghcr.io/owner/repo:1.2.3\",\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\n\t\tconst tag = extractImageTagFromRequest(headers, body);\n\t\texpect(tag).toBe(\"1.2.3\");\n\t});\n\n\tit(\"should handle different tag formats in package_url\", () => {\n\t\tconst headers = { \"x-github-event\": \"registry_package\" };\n\t\tconst testCases = [\n\t\t\t{ url: \"ghcr.io/owner/repo:latest\", expected: \"latest\" },\n\t\t\t{ url: \"ghcr.io/owner/repo:v1.0.0\", expected: \"v1.0.0\" },\n\t\t\t{ url: \"ghcr.io/owner/repo:1.2.3\", expected: \"1.2.3\" },\n\t\t\t{ url: \"ghcr.io/owner/repo:dev\", expected: \"dev\" },\n\t\t];\n\n\t\tfor (const testCase of testCases) {\n\t\t\tconst body = {\n\t\t\t\tregistry_package: {\n\t\t\t\t\tpackage_version: {\n\t\t\t\t\t\tversion: \"sha256:abc123...\",\n\t\t\t\t\t\tpackage_url: testCase.url,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t};\n\n\t\t\tconst tag = extractImageTagFromRequest(headers, body);\n\t\t\texpect(tag).toBe(testCase.expected);\n\t\t}\n\t});\n\n\tit(\"should return null for non-registry_package events\", () => {\n\t\tconst headers = { \"x-github-event\": \"push\" };\n\t\tconst body = {\n\t\t\tregistry_package: {\n\t\t\t\tpackage_version: {\n\t\t\t\t\tpackage_url: \"ghcr.io/owner/repo:latest\",\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\n\t\tconst tag = extractImageTagFromRequest(headers, body);\n\t\texpect(tag).toBeNull();\n\t});\n\n\tit(\"should return null when package_version is missing\", () => {\n\t\tconst headers = { \"x-github-event\": \"registry_package\" };\n\t\tconst body = {\n\t\t\tregistry_package: {},\n\t\t};\n\n\t\tconst tag = extractImageTagFromRequest(headers, body);\n\t\texpect(tag).toBeNull();\n\t});\n\n\tit(\"should return null when package_url has no tag\", () => {\n\t\tconst headers = { \"x-github-event\": \"registry_package\" };\n\t\tconst body = {\n\t\t\tregistry_package: {\n\t\t\t\tpackage_version: {\n\t\t\t\t\tversion: \"sha256:abc123...\",\n\t\t\t\t\tpackage_url: \"ghcr.io/owner/repo\",\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\n\t\tconst tag = extractImageTagFromRequest(headers, body);\n\t\texpect(tag).toBeNull();\n\t});\n\n\tit(\"should return null when package_url ends with colon (no tag)\", () => {\n\t\tconst headers = { \"x-github-event\": \"registry_package\" };\n\t\tconst body = {\n\t\t\tregistry_package: {\n\t\t\t\tpackage_version: {\n\t\t\t\t\tversion: \"sha256:abc123...\",\n\t\t\t\t\tpackage_url: \"ghcr.io/owner/repo:\",\n\t\t\t\t\tcontainer_metadata: {\n\t\t\t\t\t\ttag: {\n\t\t\t\t\t\t\tname: \"\",\n\t\t\t\t\t\t\tdigest: \"sha256:abc123...\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\n\t\tconst tag = extractImageTagFromRequest(headers, body);\n\t\texpect(tag).toBeNull();\n\t});\n\n\tit(\"should return null when tag name is empty string\", () => {\n\t\tconst headers = { \"x-github-event\": \"registry_package\" };\n\t\tconst body = {\n\t\t\tregistry_package: {\n\t\t\t\tpackage_version: {\n\t\t\t\t\tversion: \"sha256:abc123...\",\n\t\t\t\t\tcontainer_metadata: {\n\t\t\t\t\t\ttag: {\n\t\t\t\t\t\t\tname: \"\",\n\t\t\t\t\t\t\tdigest: \"sha256:abc123...\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tpackage_url: \"ghcr.io/owner/repo:\",\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\n\t\tconst tag = extractImageTagFromRequest(headers, body);\n\t\texpect(tag).toBeNull();\n\t});\n\n\tit(\"should ignore tag if it matches the version (digest)\", () => {\n\t\tconst headers = { \"x-github-event\": \"registry_package\" };\n\t\tconst body = {\n\t\t\tregistry_package: {\n\t\t\t\tpackage_version: {\n\t\t\t\t\tversion: \"sha256:abc123...\",\n\t\t\t\t\tcontainer_metadata: {\n\t\t\t\t\t\ttag: {\n\t\t\t\t\t\t\tname: \"sha256:abc123...\",\n\t\t\t\t\t\t\tdigest: \"sha256:abc123...\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tpackage_url: \"ghcr.io/owner/repo:latest\",\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\n\t\tconst tag = extractImageTagFromRequest(headers, body);\n\t\texpect(tag).toBe(\"latest\");\n\t});\n\n\tit(\"should handle registry_package commit message with package_url\", () => {\n\t\tconst headers = { \"x-github-event\": \"registry_package\" };\n\t\tconst body = {\n\t\t\tregistry_package: {\n\t\t\t\tpackage_version: {\n\t\t\t\t\tpackage_url: \"ghcr.io/owner/repo:latest\",\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\n\t\tconst message = extractCommitMessage(headers, body);\n\t\texpect(message).toBe(\"Docker GHCR image pushed: ghcr.io/owner/repo:latest\");\n\t});\n\n\tit(\"should handle registry_package commit message when package_url is missing\", () => {\n\t\tconst headers = { \"x-github-event\": \"registry_package\" };\n\t\tconst body = {\n\t\t\tregistry_package: {\n\t\t\t\tpackage_version: {\n\t\t\t\t\tversion: \"sha256:abc123...\",\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\n\t\tconst message = extractCommitMessage(headers, body);\n\t\texpect(message).toBe(\"Docker GHCR image pushed\");\n\t});\n\n\tit(\"should handle registry_package commit message when package_version is missing\", () => {\n\t\tconst headers = { \"x-github-event\": \"registry_package\" };\n\t\tconst body = {\n\t\t\tregistry_package: {},\n\t\t};\n\n\t\tconst message = extractCommitMessage(headers, body);\n\t\texpect(message).toBe(\"NEW COMMIT\");\n\t});\n});\n\ndescribe(\"Docker Image Name and Tag Extraction\", () => {\n\tdescribe(\"extractImageName\", () => {\n\t\tit(\"should return image name without tag\", () => {\n\t\t\texpect(extractImageName(\"my-image:latest\")).toBe(\"my-image\");\n\t\t\texpect(extractImageName(\"my-image:1.0.0\")).toBe(\"my-image\");\n\t\t\texpect(extractImageName(\"ghcr.io/owner/repo:latest\")).toBe(\n\t\t\t\t\"ghcr.io/owner/repo\",\n\t\t\t);\n\t\t});\n\n\t\tit(\"should return full image name when no tag is present\", () => {\n\t\t\texpect(extractImageName(\"my-image\")).toBe(\"my-image\");\n\t\t\texpect(extractImageName(\"ghcr.io/owner/repo\")).toBe(\"ghcr.io/owner/repo\");\n\t\t});\n\n\t\tit(\"should handle images with port numbers correctly\", () => {\n\t\t\texpect(extractImageName(\"registry:5000/image:tag\")).toBe(\n\t\t\t\t\"registry:5000/image\",\n\t\t\t);\n\t\t\texpect(extractImageName(\"localhost:5000/my-app:latest\")).toBe(\n\t\t\t\t\"localhost:5000/my-app\",\n\t\t\t);\n\t\t});\n\n\t\tit(\"should handle complex image paths\", () => {\n\t\t\texpect(\n\t\t\t\textractImageName(\"myregistryhost:5000/fedora/httpd:version1.0\"),\n\t\t\t).toBe(\"myregistryhost:5000/fedora/httpd\");\n\t\t\texpect(extractImageName(\"registry.example.com:8080/ns/app:v1.2.3\")).toBe(\n\t\t\t\t\"registry.example.com:8080/ns/app\",\n\t\t\t);\n\t\t});\n\n\t\tit(\"should return null for invalid inputs\", () => {\n\t\t\texpect(extractImageName(null)).toBeNull();\n\t\t\texpect(extractImageName(\"\")).toBeNull();\n\t\t});\n\n\t\tit(\"should handle edge cases with multiple colons\", () => {\n\t\t\texpect(extractImageName(\"image:tag:extra\")).toBe(\"image:tag\");\n\t\t\texpect(extractImageName(\"registry:5000:invalid\")).toBe(\"registry:5000\");\n\t\t});\n\t});\n\n\tdescribe(\"extractImageTag\", () => {\n\t\tit(\"should extract tag from image with tag\", () => {\n\t\t\texpect(extractImageTag(\"my-image:latest\")).toBe(\"latest\");\n\t\t\texpect(extractImageTag(\"my-image:1.0.0\")).toBe(\"1.0.0\");\n\t\t\texpect(extractImageTag(\"ghcr.io/owner/repo:v1.2.3\")).toBe(\"v1.2.3\");\n\t\t});\n\n\t\tit(\"should return 'latest' when no tag is present\", () => {\n\t\t\texpect(extractImageTag(\"my-image\")).toBe(\"latest\");\n\t\t\texpect(extractImageTag(\"ghcr.io/owner/repo\")).toBe(\"latest\");\n\t\t});\n\n\t\tit(\"should handle complex image paths with tags\", () => {\n\t\t\texpect(\n\t\t\t\textractImageTag(\"myregistryhost:5000/fedora/httpd:version1.0\"),\n\t\t\t).toBe(\"version1.0\");\n\t\t\texpect(extractImageTag(\"registry.example.com:8080/ns/app:v1.2.3\")).toBe(\n\t\t\t\t\"v1.2.3\",\n\t\t\t);\n\t\t});\n\n\t\tit(\"should return null for invalid inputs\", () => {\n\t\t\texpect(extractImageTag(null)).toBeNull();\n\t\t\texpect(extractImageTag(\"\")).toBeNull();\n\t\t});\n\n\t\tit(\"should handle edge cases with multiple colons\", () => {\n\t\t\texpect(extractImageTag(\"image:tag:extra\")).toBe(\"extra\");\n\t\t\texpect(extractImageTag(\"registry:5000/image:tag\")).toBe(\"tag\");\n\t\t});\n\n\t\tit(\"should handle numeric tags\", () => {\n\t\t\texpect(extractImageTag(\"my-image:123\")).toBe(\"123\");\n\t\t\texpect(extractImageTag(\"my-image:1\")).toBe(\"1\");\n\t\t});\n\t});\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/deploy/soft-serve.test.ts",
    "content": "import { describe, expect, it } from \"vitest\";\nimport {\n\textractBranchName,\n\textractCommitMessage,\n\textractHash,\n\tgetProviderByHeader,\n} from \"@/pages/api/deploy/[refreshToken]\";\n\ndescribe(\"Soft Serve Webhook\", () => {\n\tconst mockSoftServeHeaders = {\n\t\t\"x-softserve-event\": \"push\",\n\t};\n\n\tconst createMockBody = (message: string, hash: string, branch: string) => ({\n\t\tevent: \"push\",\n\t\tref: `refs/heads/${branch}`,\n\t\tafter: hash,\n\t\tcommits: [{ message: message }],\n\t});\n\tconst message: string = \"feat: add new feature\";\n\tconst hash: string = \"3c91c24ef9560bddc695bce138bf8a7094ec3df5\";\n\tconst branch: string = \"feat/add-new\";\n\tconst goodWebhook = createMockBody(message, hash, branch);\n\n\tit(\"should properly extract the provider name\", () => {\n\t\texpect(getProviderByHeader(mockSoftServeHeaders)).toBe(\"soft-serve\");\n\t});\n\n\tit(\"should properly extract the commit message\", () => {\n\t\texpect(extractCommitMessage(mockSoftServeHeaders, goodWebhook)).toBe(\n\t\t\tmessage,\n\t\t);\n\t});\n\n\tit(\"should properly extract hash\", () => {\n\t\texpect(extractHash(mockSoftServeHeaders, goodWebhook)).toBe(hash);\n\t});\n\n\tit(\"should properly extract branch name\", () => {\n\t\texpect(extractBranchName(mockSoftServeHeaders, goodWebhook)).toBe(branch);\n\t});\n\n\tit(\"should gracefully handle invalid webhook\", () => {\n\t\texpect(getProviderByHeader({})).toBeNull();\n\t\texpect(extractCommitMessage(mockSoftServeHeaders, {})).toBe(\"NEW COMMIT\");\n\t\texpect(extractHash(mockSoftServeHeaders, {})).toBe(\"NEW COMMIT\");\n\t\texpect(extractBranchName(mockSoftServeHeaders, {})).toBeNull();\n\t});\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/drop/drop.test.ts",
    "content": "import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport type { ApplicationNested } from \"@dokploy/server\";\nimport { unzipDrop } from \"@dokploy/server\";\nimport { paths } from \"@dokploy/server/constants\";\nimport AdmZip from \"adm-zip\";\nimport { afterAll, beforeAll, describe, expect, it, vi } from \"vitest\";\n\nconst OUTPUT_BASE = \"./__test__/drop/zips/output\";\nconst { APPLICATIONS_PATH } = paths();\nvi.mock(\"@dokploy/server/constants\", async (importOriginal) => {\n\tconst actual = await importOriginal();\n\treturn {\n\t\t// @ts-ignore\n\t\t...actual,\n\t\tpaths: () => ({\n\t\t\t// @ts-ignore\n\t\t\t...actual.paths(),\n\t\t\tBASE_PATH: OUTPUT_BASE,\n\t\t\tAPPLICATIONS_PATH: OUTPUT_BASE,\n\t\t}),\n\t};\n});\n\nif (typeof window === \"undefined\") {\n\tconst undici = require(\"undici\");\n\tglobalThis.File = undici.File as any;\n\tglobalThis.FileList = undici.FileList as any;\n}\n\nconst baseApp: ApplicationNested = {\n\trailpackVersion: \"0.15.4\",\n\tapplicationId: \"\",\n\tpreviewLabels: [],\n\tcreateEnvFile: true,\n\tbitbucketRepositorySlug: \"\",\n\therokuVersion: \"\",\n\tgiteaBranch: \"\",\n\tbuildServerId: \"\",\n\tbuildRegistryId: \"\",\n\tbuildRegistry: null,\n\targs: [],\n\tgiteaBuildPath: \"\",\n\tpreviewRequireCollaboratorPermissions: false,\n\tgiteaId: \"\",\n\tgiteaOwner: \"\",\n\tgiteaRepository: \"\",\n\tcleanCache: false,\n\twatchPaths: [],\n\trollbackRegistryId: \"\",\n\trollbackRegistry: null,\n\tdeployments: [],\n\tenableSubmodules: false,\n\tapplicationStatus: \"done\",\n\ttriggerType: \"push\",\n\tappName: \"\",\n\tautoDeploy: true,\n\tendpointSpecSwarm: null,\n\tserverId: \"\",\n\tregistryUrl: \"\",\n\tbranch: null,\n\tdockerBuildStage: \"\",\n\tisPreviewDeploymentsActive: false,\n\tpreviewBuildArgs: null,\n\tpreviewBuildSecrets: null,\n\tpreviewCertificateType: \"none\",\n\tpreviewCustomCertResolver: null,\n\tpreviewEnv: null,\n\tpreviewHttps: false,\n\tpreviewPath: \"/\",\n\tpreviewPort: 3000,\n\tpreviewLimit: 0,\n\tpreviewWildcard: \"\",\n\tenvironment: {\n\t\tenv: \"\",\n\t\tisDefault: false,\n\t\tenvironmentId: \"\",\n\t\tname: \"\",\n\t\tcreatedAt: \"\",\n\t\tdescription: \"\",\n\t\tprojectId: \"\",\n\t\tproject: {\n\t\t\tenv: \"\",\n\t\t\torganizationId: \"\",\n\t\t\tname: \"\",\n\t\t\tdescription: \"\",\n\t\t\tcreatedAt: \"\",\n\t\t\tprojectId: \"\",\n\t\t},\n\t},\n\tbuildArgs: null,\n\tbuildSecrets: null,\n\tbuildPath: \"/\",\n\tgitlabPathNamespace: \"\",\n\tbuildType: \"nixpacks\",\n\tbitbucketBranch: \"\",\n\tbitbucketBuildPath: \"\",\n\tbitbucketId: \"\",\n\tbitbucketRepository: \"\",\n\tbitbucketOwner: \"\",\n\tgithubId: \"\",\n\tgitlabProjectId: 0,\n\tgitlabBranch: \"\",\n\tgitlabBuildPath: \"\",\n\tgitlabId: \"\",\n\tgitlabRepository: \"\",\n\tgitlabOwner: \"\",\n\tcommand: null,\n\tcpuLimit: null,\n\tcpuReservation: null,\n\tcreatedAt: \"\",\n\tcustomGitBranch: \"\",\n\tcustomGitBuildPath: \"\",\n\tcustomGitSSHKeyId: null,\n\tcustomGitUrl: \"\",\n\tdescription: \"\",\n\tdockerfile: null,\n\tdockerImage: null,\n\tdropBuildPath: null,\n\tenvironmentId: \"\",\n\tenabled: null,\n\tenv: null,\n\thealthCheckSwarm: null,\n\tlabelsSwarm: null,\n\tmemoryLimit: null,\n\tmemoryReservation: null,\n\tmodeSwarm: null,\n\tmounts: [],\n\tname: \"\",\n\tnetworkSwarm: null,\n\towner: null,\n\tpassword: null,\n\tplacementSwarm: null,\n\tports: [],\n\tpublishDirectory: null,\n\tisStaticSpa: null,\n\tredirects: [],\n\trefreshToken: \"\",\n\tregistry: null,\n\tregistryId: null,\n\treplicas: 1,\n\trepository: null,\n\trestartPolicySwarm: null,\n\trollbackConfigSwarm: null,\n\tsecurity: [],\n\tsourceType: \"git\",\n\tsubtitle: null,\n\ttitle: null,\n\tupdateConfigSwarm: null,\n\tusername: null,\n\tdockerContextPath: null,\n\trollbackActive: false,\n\tstopGracePeriodSwarm: null,\n\tulimitsSwarm: null,\n};\n\n/**\n * GHSA-66v7-g3fh-47h3: Remote Code Execution through Path Traversal.\n * Validates the exact PoC: ZIP with path traversal entry ../../../../../etc/cron.d/malicious-cron\n * plus cover files (package.json, index.js). unzipDrop must reject and never write outside output.\n */\ndescribe(\"GHSA-66v7-g3fh-47h3 path traversal RCE\", () => {\n\tbeforeAll(async () => {\n\t\tawait fs.rm(APPLICATIONS_PATH, { recursive: true, force: true });\n\t});\n\tafterAll(async () => {\n\t\tawait fs.rm(APPLICATIONS_PATH, { recursive: true, force: true });\n\t});\n\n\tit(\"rejects PoC ZIP: traversal ../../../../../etc/cron.d/malicious-cron + package.json + index.js\", async () => {\n\t\tbaseApp.appName = \"ghsa-rce\";\n\t\t// PoC payload: same entry name as advisory (Python zipfile keeps it; AdmZip normalizes on add → use placeholder + replace)\n\t\tconst traversalEntry = \"../../../../../etc/cron.d/malicious-cron\";\n\t\tconst cronPayload = \"* * * * * root id\\n\";\n\t\tconst placeholder = \"x\".repeat(traversalEntry.length);\n\t\tconst zip = new AdmZip();\n\t\tzip.addFile(\n\t\t\t\"package.json\",\n\t\t\tBuffer.from('{\"name\": \"app\", \"version\": \"1.0.0\"}'),\n\t\t);\n\t\tzip.addFile(\"index.js\", Buffer.from('console.log(\"Application\");'));\n\t\tzip.addFile(placeholder, Buffer.from(cronPayload));\n\t\tlet buf = Buffer.from(zip.toBuffer());\n\t\tbuf = Buffer.from(\n\t\t\tbuf.toString(\"binary\").split(placeholder).join(traversalEntry),\n\t\t\t\"binary\",\n\t\t);\n\t\tconst file = new File([buf as unknown as ArrayBuffer], \"exploit.zip\");\n\t\tawait expect(unzipDrop(file, baseApp)).rejects.toThrow(\n\t\t\t/Path traversal detected.*resolved path escapes output directory/,\n\t\t);\n\t});\n});\n\ndescribe(\"security: existing symlink escape\", () => {\n\tbeforeAll(async () => {\n\t\tawait fs.rm(APPLICATIONS_PATH, { recursive: true, force: true });\n\t});\n\n\tafterAll(async () => {\n\t\tawait fs.rm(APPLICATIONS_PATH, { recursive: true, force: true });\n\t});\n\n\tit(\"should NOT write outside base when directory is a symlink\", async () => {\n\t\tconst appName = \"symlink-existing\";\n\t\tconst output = path.join(APPLICATIONS_PATH, appName, \"code\");\n\t\tawait fs.mkdir(output, { recursive: true });\n\n\t\t// outside target (attacker wants to write here)\n\t\tconst outside = path.join(APPLICATIONS_PATH, \"..\", \"outside\");\n\t\tawait fs.mkdir(outside, { recursive: true });\n\n\t\t// attacker-controlled symlink inside project\n\t\tawait fs.symlink(outside, path.join(output, \"logs\"));\n\n\t\t// zip looks totally harmless\n\t\tconst zip = new AdmZip();\n\t\tzip.addFile(\"logs/pwned.txt\", Buffer.from(\"owned\"));\n\n\t\tconst file = new File([zip.toBuffer() as any], \"exploit.zip\");\n\n\t\tawait unzipDrop(file, { ...baseApp, appName });\n\n\t\t// if vulnerable -> file exists outside sandbox\n\t\tconst escaped = await fs\n\t\t\t.readFile(path.join(outside, \"pwned.txt\"), \"utf8\")\n\t\t\t.then(() => true)\n\t\t\t.catch(() => false);\n\n\t\texpect(escaped).toBe(false);\n\t});\n});\n\ndescribe(\"security: zip symlink entry blocked\", () => {\n\tbeforeAll(async () => {\n\t\tawait fs.rm(APPLICATIONS_PATH, { recursive: true, force: true });\n\t});\n\n\tafterAll(async () => {\n\t\tawait fs.rm(APPLICATIONS_PATH, { recursive: true, force: true });\n\t});\n\n\tit(\"rejects zip containing real symlink entry\", async () => {\n\t\tconst appName = \"zip-symlink\";\n\n\t\tconst zipBuffer = await fs.readFile(\n\t\t\tpath.join(__dirname, \"./zips/payload/symlink-entry.zip\"),\n\t\t);\n\n\t\tconst file = new File([zipBuffer as any], \"exploit.zip\");\n\n\t\tawait expect(unzipDrop(file, { ...baseApp, appName })).rejects.toThrow(\n\t\t\t/Dangerous node entries are not allowed/,\n\t\t);\n\t});\n});\n\ndescribe(\"unzipDrop path under output (no traversal)\", () => {\n\tbeforeAll(async () => {\n\t\tawait fs.rm(APPLICATIONS_PATH, { recursive: true, force: true });\n\t});\n\tafterAll(async () => {\n\t\tawait fs.rm(APPLICATIONS_PATH, { recursive: true, force: true });\n\t});\n\n\tit(\"allows entry etc/cron.d/malicious-cron when under output (no path traversal)\", async () => {\n\t\tbaseApp.appName = \"cron-under-output\";\n\t\tconst zip = new AdmZip();\n\t\tzip.addFile(\n\t\t\t\"etc/cron.d/malicious-cron\",\n\t\t\tBuffer.from(\"* * * * * root id\\n\"),\n\t\t);\n\t\tzip.addFile(\"package.json\", Buffer.from('{\"name\":\"app\"}'));\n\t\tconst file = new File(\n\t\t\t[zip.toBuffer() as unknown as ArrayBuffer],\n\t\t\t\"app.zip\",\n\t\t);\n\t\tconst outputPath = path.join(APPLICATIONS_PATH, baseApp.appName, \"code\");\n\t\tawait unzipDrop(file, baseApp);\n\t\tconst content = await fs.readFile(\n\t\t\tpath.join(outputPath, \"etc/cron.d/malicious-cron\"),\n\t\t\t\"utf8\",\n\t\t);\n\t\texpect(content).toBe(\"* * * * * root id\\n\");\n\t});\n});\n\ndescribe(\"security: traversal inside BASE_PATH (sandbox escape)\", () => {\n\tbeforeAll(async () => {\n\t\tawait fs.rm(APPLICATIONS_PATH, { recursive: true, force: true });\n\t});\n\n\tafterAll(async () => {\n\t\tawait fs.rm(APPLICATIONS_PATH, { recursive: true, force: true });\n\t});\n\n\tit(\"should NOT allow writing outside application directory but inside BASE_PATH\", async () => {\n\t\tconst appName = \"sandbox-escape\";\n\n\t\tconst base = APPLICATIONS_PATH.replace(\"/applications\", \"\");\n\t\tconst output = path.join(APPLICATIONS_PATH, appName, \"code\");\n\n\t\tawait fs.mkdir(output, { recursive: true });\n\n\t\t// attacker writes into traefik config inside base\n\t\tconst zip = new AdmZip();\n\t\tzip.addFile(\n\t\t\t\"../../../traefik/dynamic/evil.yml\",\n\t\t\tBuffer.from(\"pwned: true\"),\n\t\t);\n\n\t\tconst file = new File([zip.toBuffer() as any], \"exploit.zip\");\n\n\t\tawait unzipDrop(file, { ...baseApp, appName });\n\n\t\tconst escapedPath = path.join(base, \"traefik/dynamic/evil.yml\");\n\n\t\tconst exists = await fs\n\t\t\t.readFile(escapedPath)\n\t\t\t.then(() => true)\n\t\t\t.catch(() => false);\n\n\t\texpect(exists).toBe(false);\n\t});\n});\n\ndescribe(\"unzipDrop using real zip files\", () => {\n\t// const { APPLICATIONS_PATH } = paths();\n\tbeforeAll(async () => {\n\t\tawait fs.rm(APPLICATIONS_PATH, { recursive: true, force: true });\n\t});\n\n\tafterAll(async () => {\n\t\tawait fs.rm(APPLICATIONS_PATH, { recursive: true, force: true });\n\t});\n\n\tit(\"should correctly extract a zip with a single root folder\", async () => {\n\t\tbaseApp.appName = \"single-file\";\n\t\t// const appName = \"single-file\";\n\t\ttry {\n\t\t\tconst outputPath = path.join(APPLICATIONS_PATH, baseApp.appName, \"code\");\n\t\t\tconst zip = new AdmZip(\"./__test__/drop/zips/single-file.zip\");\n\t\t\tconst zipBuffer = zip.toBuffer() as Buffer<ArrayBuffer>;\n\t\t\tconst file = new File([zipBuffer], \"single.zip\");\n\t\t\tawait unzipDrop(file, baseApp);\n\t\t\tconst files = await fs.readdir(outputPath, { withFileTypes: true });\n\t\t\texpect(files.some((f) => f.name === \"test.txt\")).toBe(true);\n\t\t} catch (err) {\n\t\t} finally {\n\t\t}\n\t});\n});\n\n// \tit(\"should correctly extract a zip with a single root folder and a subfolder\", async () => {\n// \t\tbaseApp.appName = \"folderwithfile\";\n// \t\t// const appName = \"folderwithfile\";\n// \t\tconst outputPath = path.join(APPLICATIONS_PATH, baseApp.appName, \"code\");\n// \t\tconst zip = new AdmZip(\"./__test__/drop/zips/folder-with-file.zip\");\n\n// \t\tconst zipBuffer = zip.toBuffer();\n// \t\tconst file = new File([zipBuffer], \"single.zip\");\n// \t\tawait unzipDrop(file, baseApp);\n\n// \t\tconst files = await fs.readdir(outputPath, { withFileTypes: true });\n// \t\texpect(files.some((f) => f.name === \"folder1.txt\")).toBe(true);\n// \t});\n\n// \tit(\"should correctly extract a zip with multiple root folders\", async () => {\n// \t\tbaseApp.appName = \"two-folders\";\n// \t\t// const appName = \"two-folders\";\n// \t\tconst outputPath = path.join(APPLICATIONS_PATH, baseApp.appName, \"code\");\n// \t\tconst zip = new AdmZip(\"./__test__/drop/zips/two-folders.zip\");\n\n// \t\tconst zipBuffer = zip.toBuffer();\n// \t\tconst file = new File([zipBuffer], \"single.zip\");\n// \t\tawait unzipDrop(file, baseApp);\n\n// \t\tconst files = await fs.readdir(outputPath, { withFileTypes: true });\n\n// \t\texpect(files.some((f) => f.name === \"folder1\")).toBe(true);\n// \t\texpect(files.some((f) => f.name === \"folder2\")).toBe(true);\n// \t});\n\n// \tit(\"should correctly extract a zip with a single root with a file\", async () => {\n// \t\tbaseApp.appName = \"nested\";\n// \t\t// const appName = \"nested\";\n// \t\tconst outputPath = path.join(APPLICATIONS_PATH, baseApp.appName, \"code\");\n// \t\tconst zip = new AdmZip(\"./__test__/drop/zips/nested.zip\");\n\n// \t\tconst zipBuffer = zip.toBuffer();\n// \t\tconst file = new File([zipBuffer], \"single.zip\");\n// \t\tawait unzipDrop(file, baseApp);\n\n// \t\tconst files = await fs.readdir(outputPath, { withFileTypes: true });\n\n// \t\texpect(files.some((f) => f.name === \"folder1\")).toBe(true);\n// \t\texpect(files.some((f) => f.name === \"folder2\")).toBe(true);\n// \t\texpect(files.some((f) => f.name === \"folder3\")).toBe(true);\n// \t});\n\n// \tit(\"should correctly extract a zip with a single root with a folder\", async () => {\n// \t\tbaseApp.appName = \"folder-with-sibling-file\";\n// \t\t// const appName = \"folder-with-sibling-file\";\n// \t\tconst outputPath = path.join(APPLICATIONS_PATH, baseApp.appName, \"code\");\n// \t\tconst zip = new AdmZip(\"./__test__/drop/zips/folder-with-sibling-file.zip\");\n\n// \t\tconst zipBuffer = zip.toBuffer();\n// \t\tconst file = new File([zipBuffer], \"single.zip\");\n// \t\tawait unzipDrop(file, baseApp);\n\n// \t\tconst files = await fs.readdir(outputPath, { withFileTypes: true });\n\n// \t\texpect(files.some((f) => f.name === \"folder1\")).toBe(true);\n// \t\texpect(files.some((f) => f.name === \"test.txt\")).toBe(true);\n// \t});\n// });\n"
  },
  {
    "path": "apps/dokploy/__test__/drop/zips/folder1/folder1.txt",
    "content": "Gogogogogogo"
  },
  {
    "path": "apps/dokploy/__test__/drop/zips/folder2/folder2.txt",
    "content": "gogogogogog"
  },
  {
    "path": "apps/dokploy/__test__/drop/zips/folder3/file3.txt",
    "content": "gogogogogogogogogo"
  },
  {
    "path": "apps/dokploy/__test__/drop/zips/test.txt",
    "content": "dsafasdfasdf"
  },
  {
    "path": "apps/dokploy/__test__/env/environment-access-fallback.test.ts",
    "content": "import { describe, expect, it } from \"vitest\";\n\n// Type definitions matching the project structure\ntype Environment = {\n\tenvironmentId: string;\n\tname: string;\n\tisDefault: boolean;\n};\n\ntype Project = {\n\tprojectId: string;\n\tname: string;\n\tenvironments: Environment[];\n};\n\n/**\n * Helper function that selects the appropriate environment for a user\n * This matches the logic used in search-command.tsx and show.tsx\n */\nfunction selectAccessibleEnvironment(\n\tproject: Project | null | undefined,\n): Environment | null {\n\tif (!project || !project.environments || project.environments.length === 0) {\n\t\treturn null;\n\t}\n\n\t// Find default environment from accessible environments, or fall back to first accessible environment\n\tconst defaultEnvironment =\n\t\tproject.environments.find((environment) => environment.isDefault) ||\n\t\tproject.environments[0];\n\n\treturn defaultEnvironment || null;\n}\n\ndescribe(\"Environment Access Fallback\", () => {\n\tdescribe(\"selectAccessibleEnvironment\", () => {\n\t\tit(\"should return default environment when user has access to it\", () => {\n\t\t\tconst project: Project = {\n\t\t\t\tprojectId: \"proj-1\",\n\t\t\t\tname: \"Test Project\",\n\t\t\t\tenvironments: [\n\t\t\t\t\t{\n\t\t\t\t\t\tenvironmentId: \"env-prod\",\n\t\t\t\t\t\tname: \"production\",\n\t\t\t\t\t\tisDefault: true,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tenvironmentId: \"env-dev\",\n\t\t\t\t\t\tname: \"development\",\n\t\t\t\t\t\tisDefault: false,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t};\n\n\t\t\tconst result = selectAccessibleEnvironment(project);\n\n\t\t\texpect(result).not.toBeNull();\n\t\t\texpect(result?.environmentId).toBe(\"env-prod\");\n\t\t\texpect(result?.isDefault).toBe(true);\n\t\t});\n\n\t\tit(\"should return first accessible environment when user doesn't have access to default\", () => {\n\t\t\t// Simulating filtered environments (user only has access to development)\n\t\t\tconst project: Project = {\n\t\t\t\tprojectId: \"proj-1\",\n\t\t\t\tname: \"Test Project\",\n\t\t\t\tenvironments: [\n\t\t\t\t\t// Note: production is not in the list because user doesn't have access\n\t\t\t\t\t{\n\t\t\t\t\t\tenvironmentId: \"env-dev\",\n\t\t\t\t\t\tname: \"development\",\n\t\t\t\t\t\tisDefault: false,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tenvironmentId: \"env-staging\",\n\t\t\t\t\t\tname: \"staging\",\n\t\t\t\t\t\tisDefault: false,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t};\n\n\t\t\tconst result = selectAccessibleEnvironment(project);\n\n\t\t\texpect(result).not.toBeNull();\n\t\t\texpect(result?.environmentId).toBe(\"env-dev\");\n\t\t\texpect(result?.name).toBe(\"development\");\n\t\t});\n\n\t\tit(\"should return first environment when no default is marked but environments exist\", () => {\n\t\t\tconst project: Project = {\n\t\t\t\tprojectId: \"proj-1\",\n\t\t\t\tname: \"Test Project\",\n\t\t\t\tenvironments: [\n\t\t\t\t\t{\n\t\t\t\t\t\tenvironmentId: \"env-dev\",\n\t\t\t\t\t\tname: \"development\",\n\t\t\t\t\t\tisDefault: false,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tenvironmentId: \"env-staging\",\n\t\t\t\t\t\tname: \"staging\",\n\t\t\t\t\t\tisDefault: false,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t};\n\n\t\t\tconst result = selectAccessibleEnvironment(project);\n\n\t\t\texpect(result).not.toBeNull();\n\t\t\texpect(result?.environmentId).toBe(\"env-dev\");\n\t\t});\n\n\t\tit(\"should return null when project has no accessible environments\", () => {\n\t\t\tconst project: Project = {\n\t\t\t\tprojectId: \"proj-1\",\n\t\t\t\tname: \"Test Project\",\n\t\t\t\tenvironments: [],\n\t\t\t};\n\n\t\t\tconst result = selectAccessibleEnvironment(project);\n\n\t\t\texpect(result).toBeNull();\n\t\t});\n\n\t\tit(\"should return null when project is null\", () => {\n\t\t\tconst result = selectAccessibleEnvironment(null);\n\n\t\t\texpect(result).toBeNull();\n\t\t});\n\n\t\tit(\"should return null when project is undefined\", () => {\n\t\t\tconst result = selectAccessibleEnvironment(undefined);\n\n\t\t\texpect(result).toBeNull();\n\t\t});\n\n\t\tit(\"should handle project with single accessible environment\", () => {\n\t\t\tconst project: Project = {\n\t\t\t\tprojectId: \"proj-1\",\n\t\t\t\tname: \"Test Project\",\n\t\t\t\tenvironments: [\n\t\t\t\t\t{\n\t\t\t\t\t\tenvironmentId: \"env-dev\",\n\t\t\t\t\t\tname: \"development\",\n\t\t\t\t\t\tisDefault: false,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t};\n\n\t\t\tconst result = selectAccessibleEnvironment(project);\n\n\t\t\texpect(result).not.toBeNull();\n\t\t\texpect(result?.environmentId).toBe(\"env-dev\");\n\t\t});\n\n\t\tit(\"should prioritize default environment even when it's not first in the array\", () => {\n\t\t\tconst project: Project = {\n\t\t\t\tprojectId: \"proj-1\",\n\t\t\t\tname: \"Test Project\",\n\t\t\t\tenvironments: [\n\t\t\t\t\t{\n\t\t\t\t\t\tenvironmentId: \"env-dev\",\n\t\t\t\t\t\tname: \"development\",\n\t\t\t\t\t\tisDefault: false,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tenvironmentId: \"env-staging\",\n\t\t\t\t\t\tname: \"staging\",\n\t\t\t\t\t\tisDefault: false,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tenvironmentId: \"env-prod\",\n\t\t\t\t\t\tname: \"production\",\n\t\t\t\t\t\tisDefault: true,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t};\n\n\t\t\tconst result = selectAccessibleEnvironment(project);\n\n\t\t\texpect(result).not.toBeNull();\n\t\t\texpect(result?.environmentId).toBe(\"env-prod\");\n\t\t\texpect(result?.isDefault).toBe(true);\n\t\t});\n\n\t\tit(\"should handle multiple default environments by returning the first one found\", () => {\n\t\t\t// Edge case: multiple environments marked as default (shouldn't happen, but test it)\n\t\t\tconst project: Project = {\n\t\t\t\tprojectId: \"proj-1\",\n\t\t\t\tname: \"Test Project\",\n\t\t\t\tenvironments: [\n\t\t\t\t\t{\n\t\t\t\t\t\tenvironmentId: \"env-prod-1\",\n\t\t\t\t\t\tname: \"production-1\",\n\t\t\t\t\t\tisDefault: true,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tenvironmentId: \"env-prod-2\",\n\t\t\t\t\t\tname: \"production-2\",\n\t\t\t\t\t\tisDefault: true,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t};\n\n\t\t\tconst result = selectAccessibleEnvironment(project);\n\n\t\t\texpect(result).not.toBeNull();\n\t\t\texpect(result?.isDefault).toBe(true);\n\t\t\t// Should return the first default found\n\t\t\texpect(result?.environmentId).toBe(\"env-prod-1\");\n\t\t});\n\n\t\tit(\"should work correctly when user has access to multiple environments including default\", () => {\n\t\t\tconst project: Project = {\n\t\t\t\tprojectId: \"proj-1\",\n\t\t\t\tname: \"Test Project\",\n\t\t\t\tenvironments: [\n\t\t\t\t\t{\n\t\t\t\t\t\tenvironmentId: \"env-prod\",\n\t\t\t\t\t\tname: \"production\",\n\t\t\t\t\t\tisDefault: true,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tenvironmentId: \"env-dev\",\n\t\t\t\t\t\tname: \"development\",\n\t\t\t\t\t\tisDefault: false,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tenvironmentId: \"env-staging\",\n\t\t\t\t\t\tname: \"staging\",\n\t\t\t\t\t\tisDefault: false,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t};\n\n\t\t\tconst result = selectAccessibleEnvironment(project);\n\n\t\t\texpect(result).not.toBeNull();\n\t\t\texpect(result?.environmentId).toBe(\"env-prod\");\n\t\t\texpect(result?.isDefault).toBe(true);\n\t\t});\n\n\t\tit(\"should handle real-world scenario: user with only development access\", () => {\n\t\t\t// This simulates the exact bug we're fixing:\n\t\t\t// User has access to development but not production (default)\n\t\t\t// The filtered environments array only contains development\n\t\t\tconst project: Project = {\n\t\t\t\tprojectId: \"proj-1\",\n\t\t\t\tname: \"My Project\",\n\t\t\t\tenvironments: [\n\t\t\t\t\t// Only development is accessible (production was filtered out)\n\t\t\t\t\t{\n\t\t\t\t\t\tenvironmentId: \"env-dev-123\",\n\t\t\t\t\t\tname: \"development\",\n\t\t\t\t\t\tisDefault: false,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t};\n\n\t\t\tconst result = selectAccessibleEnvironment(project);\n\n\t\t\texpect(result).not.toBeNull();\n\t\t\texpect(result?.environmentId).toBe(\"env-dev-123\");\n\t\t\texpect(result?.name).toBe(\"development\");\n\t\t\t// Should not be null even though it's not the default\n\t\t});\n\t});\n\n\tdescribe(\"Environment selection edge cases\", () => {\n\t\tit(\"should handle project with environments property as undefined\", () => {\n\t\t\tconst project = {\n\t\t\t\tprojectId: \"proj-1\",\n\t\t\t\tname: \"Test Project\",\n\t\t\t\tenvironments: undefined,\n\t\t\t} as unknown as Project;\n\n\t\t\tconst result = selectAccessibleEnvironment(project);\n\n\t\t\texpect(result).toBeNull();\n\t\t});\n\n\t\tit(\"should handle project with null environments array\", () => {\n\t\t\tconst project = {\n\t\t\t\tprojectId: \"proj-1\",\n\t\t\t\tname: \"Test Project\",\n\t\t\t\tenvironments: null,\n\t\t\t} as unknown as Project;\n\n\t\t\tconst result = selectAccessibleEnvironment(project);\n\n\t\t\texpect(result).toBeNull();\n\t\t});\n\t});\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/env/environment.test.ts",
    "content": "import {\n\tprepareEnvironmentVariables,\n\tprepareEnvironmentVariablesForShell,\n} from \"@dokploy/server/index\";\nimport { describe, expect, it } from \"vitest\";\n\nconst projectEnv = `\nENVIRONMENT=staging\nDATABASE_URL=postgres://postgres:postgres@localhost:5432/project_db\nPORT=3000\n`;\n\nconst environmentEnv = `\nNODE_ENV=development\nAPI_URL=https://api.dev.example.com\nREDIS_URL=redis://localhost:6379\nDATABASE_NAME=dev_database\nSECRET_KEY=env-secret-123\n`;\n\ndescribe(\"prepareEnvironmentVariables (environment variables)\", () => {\n\tit(\"resolves environment variables correctly\", () => {\n\t\tconst serviceWithEnvVars = `\nNODE_ENV=\\${{environment.NODE_ENV}}\nAPI_URL=\\${{environment.API_URL}}\nSERVICE_PORT=4000\n`;\n\n\t\tconst resolved = prepareEnvironmentVariables(\n\t\t\tserviceWithEnvVars,\n\t\t\t\"\",\n\t\t\tenvironmentEnv,\n\t\t);\n\n\t\texpect(resolved).toEqual([\n\t\t\t\"NODE_ENV=development\",\n\t\t\t\"API_URL=https://api.dev.example.com\",\n\t\t\t\"SERVICE_PORT=4000\",\n\t\t]);\n\t});\n\n\tit(\"resolves both project and environment variables\", () => {\n\t\tconst serviceWithBoth = `\nENVIRONMENT=\\${{project.ENVIRONMENT}}\nNODE_ENV=\\${{environment.NODE_ENV}}\nAPI_URL=\\${{environment.API_URL}}\nDATABASE_URL=\\${{project.DATABASE_URL}}\nSERVICE_PORT=4000\n`;\n\n\t\tconst resolved = prepareEnvironmentVariables(\n\t\t\tserviceWithBoth,\n\t\t\tprojectEnv,\n\t\t\tenvironmentEnv,\n\t\t);\n\n\t\texpect(resolved).toEqual([\n\t\t\t\"ENVIRONMENT=staging\",\n\t\t\t\"NODE_ENV=development\",\n\t\t\t\"API_URL=https://api.dev.example.com\",\n\t\t\t\"DATABASE_URL=postgres://postgres:postgres@localhost:5432/project_db\",\n\t\t\t\"SERVICE_PORT=4000\",\n\t\t]);\n\t});\n\n\tit(\"handles undefined environment variables\", () => {\n\t\tconst serviceWithUndefined = `\nUNDEFINED_VAR=\\${{environment.UNDEFINED_VAR}}\n`;\n\n\t\texpect(() =>\n\t\t\tprepareEnvironmentVariables(serviceWithUndefined, \"\", environmentEnv),\n\t\t).toThrow(\"Invalid environment variable: environment.UNDEFINED_VAR\");\n\t});\n\n\tit(\"allows service variables to override environment variables\", () => {\n\t\tconst serviceOverrideEnv = `\nNODE_ENV=production\nAPI_URL=\\${{environment.API_URL}}\n`;\n\n\t\tconst resolved = prepareEnvironmentVariables(\n\t\t\tserviceOverrideEnv,\n\t\t\t\"\",\n\t\t\tenvironmentEnv,\n\t\t);\n\n\t\texpect(resolved).toEqual([\n\t\t\t\"NODE_ENV=production\", // Overrides environment variable\n\t\t\t\"API_URL=https://api.dev.example.com\",\n\t\t]);\n\t});\n\n\tit(\"resolves complex references with project, environment, and service variables\", () => {\n\t\tconst complexServiceEnv = `\nFULL_DATABASE_URL=\\${{project.DATABASE_URL}}/\\${{environment.DATABASE_NAME}}\nAPI_ENDPOINT=\\${{environment.API_URL}}/\\${{project.ENVIRONMENT}}/api\nSERVICE_NAME=my-service\nCOMPLEX_VAR=\\${{SERVICE_NAME}}-\\${{environment.NODE_ENV}}-\\${{project.ENVIRONMENT}}\n`;\n\n\t\tconst resolved = prepareEnvironmentVariables(\n\t\t\tcomplexServiceEnv,\n\t\t\tprojectEnv,\n\t\t\tenvironmentEnv,\n\t\t);\n\n\t\texpect(resolved).toEqual([\n\t\t\t\"FULL_DATABASE_URL=postgres://postgres:postgres@localhost:5432/project_db/dev_database\",\n\t\t\t\"API_ENDPOINT=https://api.dev.example.com/staging/api\",\n\t\t\t\"SERVICE_NAME=my-service\",\n\t\t\t\"COMPLEX_VAR=my-service-development-staging\",\n\t\t]);\n\t});\n\n\tit(\"handles environment variables with special characters\", () => {\n\t\tconst specialEnvVars = `\nSPECIAL_URL=https://special.com\nCOMPLEX_KEY=\"key-with-@#$%^&*()\"\nJWT_SECRET=\"secret-with-spaces and symbols!@#\"\n`;\n\n\t\tconst serviceWithSpecial = `\nFULL_URL=\\${{environment.SPECIAL_URL}}/path?key=\\${{environment.COMPLEX_KEY}}\nAUTH_SECRET=\\${{environment.JWT_SECRET}}\n`;\n\n\t\tconst resolved = prepareEnvironmentVariables(\n\t\t\tserviceWithSpecial,\n\t\t\t\"\",\n\t\t\tspecialEnvVars,\n\t\t);\n\n\t\texpect(resolved).toEqual([\n\t\t\t\"FULL_URL=https://special.com/path?key=key-with-@#$%^&*()\",\n\t\t\t\"AUTH_SECRET=secret-with-spaces and symbols!@#\",\n\t\t]);\n\t});\n\n\tit(\"maintains precedence: service > environment > project\", () => {\n\t\tconst conflictingProjectEnv = `\nNODE_ENV=production-project\nAPI_URL=https://project.api.com\nDATABASE_NAME=project_db\n`;\n\n\t\tconst conflictingEnvironmentEnv = `\nNODE_ENV=development-environment\nAPI_URL=https://environment.api.com\nDATABASE_NAME=env_db\n`;\n\n\t\tconst serviceWithConflicts = `\nNODE_ENV=service-override\nPROJECT_ENV=\\${{project.NODE_ENV}}\nENV_VAR=\\${{environment.API_URL}}\nDB_NAME=\\${{environment.DATABASE_NAME}}\n`;\n\n\t\tconst resolved = prepareEnvironmentVariables(\n\t\t\tserviceWithConflicts,\n\t\t\tconflictingProjectEnv,\n\t\t\tconflictingEnvironmentEnv,\n\t\t);\n\n\t\texpect(resolved).toEqual([\n\t\t\t\"NODE_ENV=service-override\", // Service wins\n\t\t\t\"PROJECT_ENV=production-project\", // Project reference\n\t\t\t\"ENV_VAR=https://environment.api.com\", // Environment reference\n\t\t\t\"DB_NAME=env_db\", // Environment reference\n\t\t]);\n\t});\n\n\tit(\"handles empty environment variables\", () => {\n\t\tconst serviceWithEmpty = `\nSERVICE_VAR=test\nPROJECT_VAR=\\${{project.ENVIRONMENT}}\n`;\n\n\t\tconst resolved = prepareEnvironmentVariables(\n\t\t\tserviceWithEmpty,\n\t\t\tprojectEnv,\n\t\t\t\"\",\n\t\t);\n\n\t\texpect(resolved).toEqual([\"SERVICE_VAR=test\", \"PROJECT_VAR=staging\"]);\n\t});\n\n\tit(\"handles mixed quotes and environment variables\", () => {\n\t\tconst envWithQuotes = `\nQUOTED_VAR=\"development\"\nSINGLE_QUOTED='https://api.dev.example.com'\nMIXED_VAR=\"value with 'single' quotes\"\n`;\n\n\t\tconst serviceWithQuotes = `\nNODE_ENV=\\${{environment.QUOTED_VAR}}\nAPI_URL=\\${{environment.SINGLE_QUOTED}}\nCOMPLEX=\"Prefix-\\${{environment.MIXED_VAR}}-Suffix\"\n`;\n\n\t\tconst resolved = prepareEnvironmentVariables(\n\t\t\tserviceWithQuotes,\n\t\t\t\"\",\n\t\t\tenvWithQuotes,\n\t\t);\n\n\t\texpect(resolved).toEqual([\n\t\t\t\"NODE_ENV=development\",\n\t\t\t\"API_URL=https://api.dev.example.com\",\n\t\t\t\"COMPLEX=Prefix-value with 'single' quotes-Suffix\",\n\t\t]);\n\t});\n\n\tit(\"resolves multiple environment references in single value\", () => {\n\t\tconst multiRefEnv = `\nHOST=localhost\nPORT=5432\nUSERNAME=postgres\nPASSWORD=secret123\n`;\n\n\t\tconst serviceWithMultiRefs = `\nDATABASE_URL=postgresql://\\${{environment.USERNAME}}:\\${{environment.PASSWORD}}@\\${{environment.HOST}}:\\${{environment.PORT}}/mydb\nCONNECTION_STRING=\\${{environment.HOST}}:\\${{environment.PORT}}\n`;\n\n\t\tconst resolved = prepareEnvironmentVariables(\n\t\t\tserviceWithMultiRefs,\n\t\t\t\"\",\n\t\t\tmultiRefEnv,\n\t\t);\n\n\t\texpect(resolved).toEqual([\n\t\t\t\"DATABASE_URL=postgresql://postgres:secret123@localhost:5432/mydb\",\n\t\t\t\"CONNECTION_STRING=localhost:5432\",\n\t\t]);\n\t});\n\n\tit(\"handles nested references with environment and project variables\", () => {\n\t\tconst nestedProjectEnv = `\nBASE_DOMAIN=example.com\nPROTOCOL=https\n`;\n\n\t\tconst nestedEnvironmentEnv = `\nSUBDOMAIN=api.dev\nPATH_PREFIX=/v1\n`;\n\n\t\tconst serviceWithNested = `\nFULL_URL=\\${{project.PROTOCOL}}://\\${{environment.SUBDOMAIN}}.\\${{project.BASE_DOMAIN}}\\${{environment.PATH_PREFIX}}/endpoint\nAPI_BASE=\\${{project.PROTOCOL}}://\\${{environment.SUBDOMAIN}}.\\${{project.BASE_DOMAIN}}\n`;\n\n\t\tconst resolved = prepareEnvironmentVariables(\n\t\t\tserviceWithNested,\n\t\t\tnestedProjectEnv,\n\t\t\tnestedEnvironmentEnv,\n\t\t);\n\n\t\texpect(resolved).toEqual([\n\t\t\t\"FULL_URL=https://api.dev.example.com/v1/endpoint\",\n\t\t\t\"API_BASE=https://api.dev.example.com\",\n\t\t]);\n\t});\n\n\tit(\"throws error for malformed environment variable references\", () => {\n\t\tconst serviceWithMalformed = `\nMALFORMED1=\\${{environment.}}\nMALFORMED2=\\${{environment}}\nVALID=\\${{environment.NODE_ENV}}\n`;\n\n\t\t// Should throw error for empty variable name after environment.\n\t\texpect(() =>\n\t\t\tprepareEnvironmentVariables(serviceWithMalformed, \"\", environmentEnv),\n\t\t).toThrow(\"Invalid environment variable: environment.\");\n\t});\n\n\tit(\"handles environment variables with numeric values\", () => {\n\t\tconst numericEnv = `\nPORT=8080\nTIMEOUT=30\nRETRY_COUNT=3\nPERCENTAGE=99.5\n`;\n\n\t\tconst serviceWithNumeric = `\nSERVER_PORT=\\${{environment.PORT}}\nREQUEST_TIMEOUT=\\${{environment.TIMEOUT}}\nMAX_RETRIES=\\${{environment.RETRY_COUNT}}\nSUCCESS_RATE=\\${{environment.PERCENTAGE}}\n`;\n\n\t\tconst resolved = prepareEnvironmentVariables(\n\t\t\tserviceWithNumeric,\n\t\t\t\"\",\n\t\t\tnumericEnv,\n\t\t);\n\n\t\texpect(resolved).toEqual([\n\t\t\t\"SERVER_PORT=8080\",\n\t\t\t\"REQUEST_TIMEOUT=30\",\n\t\t\t\"MAX_RETRIES=3\",\n\t\t\t\"SUCCESS_RATE=99.5\",\n\t\t]);\n\t});\n\n\tit(\"handles boolean-like environment variables\", () => {\n\t\tconst booleanEnv = `\nDEBUG=true\nENABLED=false\nPRODUCTION=1\nDEVELOPMENT=0\n`;\n\n\t\tconst serviceWithBoolean = `\nDEBUG_MODE=\\${{environment.DEBUG}}\nFEATURE_ENABLED=\\${{environment.ENABLED}}\nIS_PROD=\\${{environment.PRODUCTION}}\nIS_DEV=\\${{environment.DEVELOPMENT}}\n`;\n\n\t\tconst resolved = prepareEnvironmentVariables(\n\t\t\tserviceWithBoolean,\n\t\t\t\"\",\n\t\t\tbooleanEnv,\n\t\t);\n\n\t\texpect(resolved).toEqual([\n\t\t\t\"DEBUG_MODE=true\",\n\t\t\t\"FEATURE_ENABLED=false\",\n\t\t\t\"IS_PROD=1\",\n\t\t\t\"IS_DEV=0\",\n\t\t]);\n\t});\n\n\tit(\"handles environment variables with single quotes in values\", () => {\n\t\tconst envWithSingleQuotes = `\nENV_VARIABLE='ENVITONME'NT'\nANOTHER_VAR='value with 'quotes' inside'\nSIMPLE_VAR=no-quotes\n`;\n\n\t\tconst serviceWithSingleQuotes = `\nTEST_VAR=\\${{environment.ENV_VARIABLE}}\nANOTHER_TEST=\\${{environment.ANOTHER_VAR}}\nSIMPLE=\\${{environment.SIMPLE_VAR}}\n`;\n\n\t\tconst resolved = prepareEnvironmentVariables(\n\t\t\tserviceWithSingleQuotes,\n\t\t\t\"\",\n\t\t\tenvWithSingleQuotes,\n\t\t);\n\n\t\texpect(resolved).toEqual([\n\t\t\t\"TEST_VAR=ENVITONME'NT\",\n\t\t\t\"ANOTHER_TEST=value with 'quotes' inside\",\n\t\t\t\"SIMPLE=no-quotes\",\n\t\t]);\n\t});\n});\n\ndescribe(\"prepareEnvironmentVariablesForShell (shell escaping)\", () => {\n\tit(\"escapes single quotes in environment variable values\", () => {\n\t\tconst serviceEnv = `\nENV_VARIABLE='ENVITONME'NT'\nANOTHER_VAR='value with 'quotes' inside'\n`;\n\n\t\tconst resolved = prepareEnvironmentVariablesForShell(serviceEnv, \"\", \"\");\n\n\t\t// shell-quote should wrap these in double quotes\n\t\texpect(resolved).toEqual([\n\t\t\t`\"ENV_VARIABLE=ENVITONME'NT\"`,\n\t\t\t`\"ANOTHER_VAR=value with 'quotes' inside\"`,\n\t\t]);\n\t});\n\n\tit(\"escapes double quotes in environment variable values\", () => {\n\t\tconst serviceEnv = `\nMESSAGE=\"Hello \"World\"\"\nQUOTED_PATH=\"/path/to/\"file\"\"\n`;\n\n\t\tconst resolved = prepareEnvironmentVariablesForShell(serviceEnv, \"\", \"\");\n\n\t\t// shell-quote wraps in single quotes when there are double quotes inside\n\t\texpect(resolved).toEqual([\n\t\t\t`'MESSAGE=Hello \"World\"'`,\n\t\t\t`'QUOTED_PATH=/path/to/\"file\"'`,\n\t\t]);\n\t});\n\n\tit(\"escapes dollar signs in environment variable values\", () => {\n\t\tconst serviceEnv = `\nPRICE=$100\nVARIABLE=$HOME/path\nTEMPLATE=Hello $USER\n`;\n\n\t\tconst resolved = prepareEnvironmentVariablesForShell(serviceEnv, \"\", \"\");\n\n\t\t// Dollar signs should be escaped to prevent variable expansion\n\t\tfor (const env of resolved) {\n\t\t\texpect(env).toContain(\"$\");\n\t\t}\n\t});\n\n\tit(\"escapes backticks in environment variable values\", () => {\n\t\tconst serviceEnv = `\nCOMMAND=\\`echo \"test\"\\`\nNESTED=value with \\`backticks\\` inside\n`;\n\n\t\tconst resolved = prepareEnvironmentVariablesForShell(serviceEnv, \"\", \"\");\n\n\t\t// Backticks are escaped/removed by dotenv parsing, but values should be safely quoted\n\t\texpect(resolved.length).toBe(2);\n\t\texpect(resolved[0]).toContain(\"COMMAND\");\n\t\texpect(resolved[1]).toContain(\"NESTED\");\n\t});\n\n\tit(\"handles environment variables with spaces\", () => {\n\t\tconst serviceEnv = `\nFULL_NAME=\"John Doe\"\nMESSAGE='Hello World'\nSENTENCE=This is a test\n`;\n\n\t\tconst resolved = prepareEnvironmentVariablesForShell(serviceEnv, \"\", \"\");\n\n\t\t// shell-quote uses single quotes for strings with spaces\n\t\texpect(resolved).toEqual([\n\t\t\t`'FULL_NAME=John Doe'`,\n\t\t\t`'MESSAGE=Hello World'`,\n\t\t\t`'SENTENCE=This is a test'`,\n\t\t]);\n\t});\n\n\tit(\"handles environment variables with backslashes\", () => {\n\t\tconst serviceEnv = `\nWINDOWS_PATH=C:\\\\Users\\\\Documents\nESCAPED=value\\\\with\\\\backslashes\n`;\n\n\t\tconst resolved = prepareEnvironmentVariablesForShell(serviceEnv, \"\", \"\");\n\n\t\t// Backslashes should be properly escaped\n\t\texpect(resolved.length).toBe(2);\n\t\tfor (const env of resolved) {\n\t\t\texpect(env).toContain(\"\\\\\");\n\t\t}\n\t});\n\n\tit(\"handles simple environment variables without special characters\", () => {\n\t\tconst serviceEnv = `\nNODE_ENV=production\nPORT=3000\nDEBUG=true\n`;\n\n\t\tconst resolved = prepareEnvironmentVariablesForShell(serviceEnv, \"\", \"\");\n\n\t\t// shell-quote escapes the = sign in some cases\n\t\texpect(resolved).toEqual([\n\t\t\t\"NODE_ENV\\\\=production\",\n\t\t\t\"PORT\\\\=3000\",\n\t\t\t\"DEBUG\\\\=true\",\n\t\t]);\n\t});\n\n\tit(\"handles environment variables with mixed special characters\", () => {\n\t\tconst serviceEnv = `\nCOMPLEX='value with \"double\" and 'single' quotes'\nBASH_COMMAND=echo \"$HOME\" && echo 'test'\nWEIRD=\\`echo \"$VAR\"\\` with 'quotes' and \"more\"\n`;\n\n\t\tconst resolved = prepareEnvironmentVariablesForShell(serviceEnv, \"\", \"\");\n\n\t\t// All should be escaped, none should throw errors\n\t\texpect(resolved.length).toBe(3);\n\t\t// Verify each can be safely used in shell\n\t\tfor (const env of resolved) {\n\t\t\texpect(typeof env).toBe(\"string\");\n\t\t\texpect(env.length).toBeGreaterThan(0);\n\t\t}\n\t});\n\n\tit(\"handles environment variables with newlines\", () => {\n\t\tconst serviceEnv = `\nMULTILINE=\"line1\nline2\nline3\"\n`;\n\n\t\tconst resolved = prepareEnvironmentVariablesForShell(serviceEnv, \"\", \"\");\n\n\t\texpect(resolved.length).toBe(1);\n\t\texpect(resolved[0]).toContain(\"MULTILINE\");\n\t});\n\n\tit(\"handles empty environment variable values\", () => {\n\t\tconst serviceEnv = `\nEMPTY=\nEMPTY_QUOTED=\"\"\nEMPTY_SINGLE=''\n`;\n\n\t\tconst resolved = prepareEnvironmentVariablesForShell(serviceEnv, \"\", \"\");\n\n\t\t// shell-quote escapes the = sign for empty values\n\t\texpect(resolved).toEqual([\n\t\t\t\"EMPTY\\\\=\",\n\t\t\t\"EMPTY_QUOTED\\\\=\",\n\t\t\t\"EMPTY_SINGLE\\\\=\",\n\t\t]);\n\t});\n\n\tit(\"handles environment variables with equals signs in values\", () => {\n\t\tconst serviceEnv = `\nEQUATION=a=b+c\nCONNECTION_STRING=user=admin;password=test\n`;\n\n\t\tconst resolved = prepareEnvironmentVariablesForShell(serviceEnv, \"\", \"\");\n\n\t\texpect(resolved.length).toBe(2);\n\t\texpect(resolved[0]).toContain(\"EQUATION\");\n\t\texpect(resolved[1]).toContain(\"CONNECTION_STRING\");\n\t});\n\n\tit(\"resolves and escapes environment variables together\", () => {\n\t\tconst projectEnv = `\nBASE_URL=https://example.com\nAPI_KEY='secret-key-with-quotes'\n`;\n\n\t\tconst environmentEnv = `\nENV_NAME=production\nDB_PASS='pa$$word'\n`;\n\n\t\tconst serviceEnv = `\nFULL_URL=\\${{project.BASE_URL}}/api\nAUTH_KEY=\\${{project.API_KEY}}\nENVIRONMENT=\\${{environment.ENV_NAME}}\nDB_PASSWORD=\\${{environment.DB_PASS}}\nCUSTOM='value with 'quotes' inside'\n`;\n\n\t\tconst resolved = prepareEnvironmentVariablesForShell(\n\t\t\tserviceEnv,\n\t\t\tprojectEnv,\n\t\t\tenvironmentEnv,\n\t\t);\n\n\t\texpect(resolved.length).toBe(5);\n\t\t// All resolved values should be properly escaped\n\t\tfor (const env of resolved) {\n\t\t\texpect(typeof env).toBe(\"string\");\n\t\t}\n\t});\n\n\tit(\"handles environment variables with semicolons and ampersands\", () => {\n\t\tconst serviceEnv = `\nCOMMAND=echo \"test\" && echo \"test2\"\nMULTIPLE=cmd1; cmd2; cmd3\nURL_WITH_PARAMS=https://example.com?a=1&b=2&c=3\n`;\n\n\t\tconst resolved = prepareEnvironmentVariablesForShell(serviceEnv, \"\", \"\");\n\n\t\texpect(resolved.length).toBe(3);\n\t\t// These should be safely escaped to prevent command injection\n\t\tfor (const env of resolved) {\n\t\t\texpect(typeof env).toBe(\"string\");\n\t\t\texpect(env.length).toBeGreaterThan(0);\n\t\t}\n\t});\n\n\tit(\"handles environment variables with pipes and redirects\", () => {\n\t\tconst serviceEnv = `\nPIPE_COMMAND=cat file | grep test\nREDIRECT=echo \"test\" > output.txt\nBOTH=cat input.txt | grep pattern > output.txt\n`;\n\n\t\tconst resolved = prepareEnvironmentVariablesForShell(serviceEnv, \"\", \"\");\n\n\t\texpect(resolved.length).toBe(3);\n\t\t// Pipes and redirects should be safely quoted\n\t\texpect(resolved[0]).toContain(\"PIPE_COMMAND\");\n\t\texpect(resolved[1]).toContain(\"REDIRECT\");\n\t\texpect(resolved[2]).toContain(\"BOTH\");\n\t\t// At least one should contain a pipe\n\t\tconst hasPipe = resolved.some((env) => env.includes(\"|\"));\n\t\texpect(hasPipe).toBe(true);\n\t});\n\n\tit(\"handles environment variables with parentheses and brackets\", () => {\n\t\tconst serviceEnv = `\nMATH=(a+b)*c\nARRAY=[1,2,3]\nJSON={\"key\":\"value\"}\n`;\n\n\t\tconst resolved = prepareEnvironmentVariablesForShell(serviceEnv, \"\", \"\");\n\n\t\texpect(resolved.length).toBe(3);\n\t\texpect(resolved[0]).toContain(\"(\");\n\t\texpect(resolved[1]).toContain(\"[\");\n\t\texpect(resolved[2]).toContain(\"{\");\n\t});\n\n\tit(\"handles very long environment variable values\", () => {\n\t\tconst longValue = \"a\".repeat(10000);\n\t\tconst serviceEnv = `LONG_VAR=${longValue}`;\n\n\t\tconst resolved = prepareEnvironmentVariablesForShell(serviceEnv, \"\", \"\");\n\n\t\texpect(resolved.length).toBe(1);\n\t\texpect(resolved[0]).toContain(\"LONG_VAR\");\n\t\texpect(resolved[0]?.length).toBeGreaterThan(10000);\n\t});\n\n\tit(\"handles special unicode characters in environment variables\", () => {\n\t\tconst serviceEnv = `\nEMOJI=Hello 🌍 World 🚀\nCHINESE=你好世界\nSPECIAL=café résumé naïve\n`;\n\n\t\tconst resolved = prepareEnvironmentVariablesForShell(serviceEnv, \"\", \"\");\n\n\t\texpect(resolved.length).toBe(3);\n\t\texpect(resolved[0]).toContain(\"🌍\");\n\t\texpect(resolved[1]).toContain(\"你好\");\n\t\texpect(resolved[2]).toContain(\"café\");\n\t});\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/env/shared.test.ts",
    "content": "import { prepareEnvironmentVariables } from \"@dokploy/server/index\";\nimport { describe, expect, it } from \"vitest\";\n\nconst projectEnv = `\nENVIRONMENT=staging\nDATABASE_URL=postgres://postgres:postgres@localhost:5432/project_db\nPORT=3000\n`;\nconst serviceEnv = `\nENVIRONMENT=\\${{project.ENVIRONMENT}}\nDATABASE_URL=\\${{project.DATABASE_URL}}\nSERVICE_PORT=4000\n`;\n\ndescribe(\"prepareEnvironmentVariables\", () => {\n\tit(\"resolves project variables correctly\", () => {\n\t\tconst resolved = prepareEnvironmentVariables(serviceEnv, projectEnv);\n\n\t\texpect(resolved).toEqual([\n\t\t\t\"ENVIRONMENT=staging\",\n\t\t\t\"DATABASE_URL=postgres://postgres:postgres@localhost:5432/project_db\",\n\t\t\t\"SERVICE_PORT=4000\",\n\t\t]);\n\t});\n\n\tit(\"handles undefined project variables\", () => {\n\t\tconst incompleteProjectEnv = `\n\t\tNODE_ENV=production\n\t\t`;\n\n\t\tconst invalidServiceEnv = `\n\t\tUNDEFINED_VAR=\\${{project.UNDEFINED_VAR}}\n\t\t`;\n\n\t\texpect(\n\t\t\t() =>\n\t\t\t\tprepareEnvironmentVariables(invalidServiceEnv, incompleteProjectEnv), // Cambiado el orden\n\t\t).toThrow(\"Invalid project environment variable: project.UNDEFINED_VAR\");\n\t});\n\tit(\"allows service-specific variables to override project variables\", () => {\n\t\tconst serviceSpecificEnv = `\n\t\tENVIRONMENT=production\n\t\tDATABASE_URL=\\${{project.DATABASE_URL}}\n\t\t`;\n\n\t\tconst resolved = prepareEnvironmentVariables(\n\t\t\tserviceSpecificEnv,\n\t\t\tprojectEnv,\n\t\t);\n\n\t\texpect(resolved).toEqual([\n\t\t\t\"ENVIRONMENT=production\", // Overrides project variable\n\t\t\t\"DATABASE_URL=postgres://postgres:postgres@localhost:5432/project_db\",\n\t\t]);\n\t});\n\n\tit(\"resolves complex references for dynamic endpoints\", () => {\n\t\tconst projectEnv = `\nBASE_URL=https://api.example.com\nAPI_VERSION=v1\nPORT=8000\n`;\n\t\tconst serviceEnv = `\nAPI_ENDPOINT=\\${{project.BASE_URL}}/\\${{project.API_VERSION}}/endpoint\nSERVICE_PORT=9000\n`;\n\t\tconst resolved = prepareEnvironmentVariables(serviceEnv, projectEnv);\n\n\t\texpect(resolved).toEqual([\n\t\t\t\"API_ENDPOINT=https://api.example.com/v1/endpoint\",\n\t\t\t\"SERVICE_PORT=9000\",\n\t\t]);\n\t});\n\n\tit(\"handles missing project variables gracefully\", () => {\n\t\tconst projectEnv = `\nPORT=8080\n`;\n\t\tconst serviceEnv = `\nMISSING_VAR=\\${{project.MISSING_KEY}}\nSERVICE_PORT=3000\n`;\n\n\t\texpect(() => prepareEnvironmentVariables(serviceEnv, projectEnv)).toThrow(\n\t\t\t\"Invalid project environment variable: project.MISSING_KEY\",\n\t\t);\n\t});\n\n\tit(\"overrides project variables with service-specific values\", () => {\n\t\tconst projectEnv = `\nENVIRONMENT=staging\nDATABASE_URL=postgres://project:project@localhost:5432/project_db\n`;\n\t\tconst serviceEnv = `\nENVIRONMENT=\\${{project.ENVIRONMENT}}\nDATABASE_URL=postgres://service:service@localhost:5432/service_db\nSERVICE_NAME=my-service\n`;\n\t\tconst resolved = prepareEnvironmentVariables(serviceEnv, projectEnv);\n\n\t\texpect(resolved).toEqual([\n\t\t\t\"ENVIRONMENT=staging\",\n\t\t\t\"DATABASE_URL=postgres://service:service@localhost:5432/service_db\",\n\t\t\t\"SERVICE_NAME=my-service\",\n\t\t]);\n\t});\n\n\tit(\"handles project variables with normal and unusual characters\", () => {\n\t\tconst projectEnv = `\nENVIRONMENT=PRODUCTION\n`;\n\n\t\t// Needs to be in quotes\n\t\tconst serviceEnv = `\nNODE_ENV=\\${{project.ENVIRONMENT}}\nSPECIAL_VAR=\"$^@$^@#$^@!#$@#$-\\${{project.ENVIRONMENT}}\"\n`;\n\n\t\tconst resolved = prepareEnvironmentVariables(serviceEnv, projectEnv);\n\n\t\texpect(resolved).toEqual([\n\t\t\t\"NODE_ENV=PRODUCTION\",\n\t\t\t\"SPECIAL_VAR=$^@$^@#$^@!#$@#$-PRODUCTION\",\n\t\t]);\n\t});\n\n\tit(\"handles complex cases with multiple references, special characters, and spaces\", () => {\n\t\tconst projectEnv = `\nENVIRONMENT=STAGING\nAPP_NAME=MyApp\n`;\n\n\t\tconst serviceEnv = `\nNODE_ENV=\\${{project.ENVIRONMENT}}\nCOMPLEX_VAR=\"Prefix-$#^!@-\\${{project.ENVIRONMENT}}--\\${{project.APP_NAME}} Suffix \"\n`;\n\t\tconst resolved = prepareEnvironmentVariables(serviceEnv, projectEnv);\n\n\t\texpect(resolved).toEqual([\n\t\t\t\"NODE_ENV=STAGING\",\n\t\t\t\"COMPLEX_VAR=Prefix-$#^!@-STAGING--MyApp Suffix \",\n\t\t]);\n\t});\n\n\tit(\"handles references enclosed in single quotes\", () => {\n\t\tconst projectEnv = `\n\tENVIRONMENT=STAGING\n\tAPP_NAME=MyApp\n\t`;\n\n\t\tconst serviceEnv = `\n\tNODE_ENV='\\${{project.ENVIRONMENT}}'\n\tCOMPLEX_VAR='Prefix-$#^!@-\\${{project.ENVIRONMENT}}--\\${{project.APP_NAME}} Suffix'\n\t`;\n\t\tconst resolved = prepareEnvironmentVariables(serviceEnv, projectEnv);\n\n\t\texpect(resolved).toEqual([\n\t\t\t\"NODE_ENV=STAGING\",\n\t\t\t\"COMPLEX_VAR=Prefix-$#^!@-STAGING--MyApp Suffix\",\n\t\t]);\n\t});\n\n\tit(\"handles double and single quotes combined\", () => {\n\t\tconst projectEnv = `\nENVIRONMENT=PRODUCTION\nAPP_NAME=MyApp\n`;\n\t\tconst serviceEnv = `\nNODE_ENV=\"'\\${{project.ENVIRONMENT}}'\"\nCOMPLEX_VAR=\"'Prefix \\\"DoubleQuoted\\\" and \\${{project.APP_NAME}}'\"\n`;\n\t\tconst resolved = prepareEnvironmentVariables(serviceEnv, projectEnv);\n\n\t\texpect(resolved).toEqual([\n\t\t\t\"NODE_ENV='PRODUCTION'\",\n\t\t\t\"COMPLEX_VAR='Prefix \\\"DoubleQuoted\\\" and MyApp'\",\n\t\t]);\n\t});\n});\n\ndescribe(\"prepareEnvironmentVariables (self references)\", () => {\n\tit(\"resolves self references correctly\", () => {\n\t\tconst serviceEnv = `\nENVIRONMENT=staging\nDATABASE_URL=postgres://postgres:postgres@localhost:5432/project_db\nSELF_REF=\\${{ENVIRONMENT}}\n`;\n\n\t\tconst resolved = prepareEnvironmentVariables(serviceEnv, \"\");\n\n\t\texpect(resolved).toEqual([\n\t\t\t\"ENVIRONMENT=staging\",\n\t\t\t\"DATABASE_URL=postgres://postgres:postgres@localhost:5432/project_db\",\n\t\t\t\"SELF_REF=staging\",\n\t\t]);\n\t});\n\n\tit(\"throws on undefined self references\", () => {\n\t\tconst serviceEnv = `\nMISSING_VAR=\\${{UNDEFINED_VAR}}\n`;\n\n\t\texpect(() => prepareEnvironmentVariables(serviceEnv, \"\")).toThrow(\n\t\t\t\"Invalid service environment variable: UNDEFINED_VAR\",\n\t\t);\n\t});\n\n\tit(\"allows overriding and still resolving from self\", () => {\n\t\tconst serviceEnv = `\nENVIRONMENT=production\nOVERRIDE_ENV=\\${{ENVIRONMENT}}\n`;\n\n\t\tconst resolved = prepareEnvironmentVariables(serviceEnv, \"\");\n\n\t\texpect(resolved).toEqual([\n\t\t\t\"ENVIRONMENT=production\",\n\t\t\t\"OVERRIDE_ENV=production\",\n\t\t]);\n\t});\n\n\tit(\"resolves multiple self references inside one value\", () => {\n\t\tconst serviceEnv = `\nENVIRONMENT=staging\nAPP_NAME=MyApp\nCOMPLEX=\\${{APP_NAME}}-\\${{ENVIRONMENT}}-\\${{APP_NAME}}\n`;\n\n\t\tconst resolved = prepareEnvironmentVariables(serviceEnv, \"\");\n\n\t\texpect(resolved).toEqual([\n\t\t\t\"ENVIRONMENT=staging\",\n\t\t\t\"APP_NAME=MyApp\",\n\t\t\t\"COMPLEX=MyApp-staging-MyApp\",\n\t\t]);\n\t});\n\n\tit(\"handles quotes with self references\", () => {\n\t\tconst serviceEnv = `\nENVIRONMENT=production\nQUOTED=\"'\\${{ENVIRONMENT}}'\"\nMIXED=\"\\\"Double \\${{ENVIRONMENT}}\\\"\"\n`;\n\n\t\tconst resolved = prepareEnvironmentVariables(serviceEnv, \"\");\n\n\t\texpect(resolved).toEqual([\n\t\t\t\"ENVIRONMENT=production\",\n\t\t\t\"QUOTED='production'\",\n\t\t\t'MIXED=\"Double production\"',\n\t\t]);\n\t});\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/env/stack-environment.test.ts",
    "content": "import { getEnviromentVariablesObject } from \"@dokploy/server/index\";\nimport { describe, expect, it } from \"vitest\";\n\nconst projectEnv = `\nENVIRONMENT=staging\nDATABASE_URL=postgres://postgres:postgres@localhost:5432/project_db\nPORT=3000\n`;\n\nconst environmentEnv = `\nNODE_ENV=development\nAPI_URL=https://api.dev.example.com\nREDIS_URL=redis://localhost:6379\nDATABASE_NAME=dev_database\nSECRET_KEY=env-secret-123\n`;\n\ndescribe(\"getEnviromentVariablesObject with environment variables (Stack compose)\", () => {\n\tit(\"resolves environment variables correctly for Stack compose\", () => {\n\t\tconst serviceEnv = `\nFOO=\\${{environment.NODE_ENV}}\nBAR=\\${{environment.API_URL}}\nBAZ=test\n`;\n\n\t\tconst result = getEnviromentVariablesObject(\n\t\t\tserviceEnv,\n\t\t\tprojectEnv,\n\t\t\tenvironmentEnv,\n\t\t);\n\n\t\texpect(result).toEqual({\n\t\t\tFOO: \"development\",\n\t\t\tBAR: \"https://api.dev.example.com\",\n\t\t\tBAZ: \"test\",\n\t\t});\n\t});\n\n\tit(\"resolves both project and environment variables for Stack compose\", () => {\n\t\tconst serviceEnv = `\nENVIRONMENT=\\${{project.ENVIRONMENT}}\nNODE_ENV=\\${{environment.NODE_ENV}}\nAPI_URL=\\${{environment.API_URL}}\nDATABASE_URL=\\${{project.DATABASE_URL}}\nSERVICE_PORT=4000\n`;\n\n\t\tconst result = getEnviromentVariablesObject(\n\t\t\tserviceEnv,\n\t\t\tprojectEnv,\n\t\t\tenvironmentEnv,\n\t\t);\n\n\t\texpect(result).toEqual({\n\t\t\tENVIRONMENT: \"staging\",\n\t\t\tNODE_ENV: \"development\",\n\t\t\tAPI_URL: \"https://api.dev.example.com\",\n\t\t\tDATABASE_URL: \"postgres://postgres:postgres@localhost:5432/project_db\",\n\t\t\tSERVICE_PORT: \"4000\",\n\t\t});\n\t});\n\n\tit(\"handles multiple environment references in single value for Stack compose\", () => {\n\t\tconst multiRefEnv = `\nHOST=localhost\nPORT=5432\nUSERNAME=postgres\nPASSWORD=secret123\n`;\n\n\t\tconst serviceEnv = `\nDATABASE_URL=postgresql://\\${{environment.USERNAME}}:\\${{environment.PASSWORD}}@\\${{environment.HOST}}:\\${{environment.PORT}}/mydb\n`;\n\n\t\tconst result = getEnviromentVariablesObject(serviceEnv, \"\", multiRefEnv);\n\n\t\texpect(result).toEqual({\n\t\t\tDATABASE_URL: \"postgresql://postgres:secret123@localhost:5432/mydb\",\n\t\t});\n\t});\n\n\tit(\"throws error for undefined environment variables in Stack compose\", () => {\n\t\tconst serviceWithUndefined = `\nUNDEFINED_VAR=\\${{environment.UNDEFINED_VAR}}\n`;\n\n\t\texpect(() =>\n\t\t\tgetEnviromentVariablesObject(serviceWithUndefined, \"\", environmentEnv),\n\t\t).toThrow(\"Invalid environment variable: environment.UNDEFINED_VAR\");\n\t});\n\n\tit(\"allows service variables to override environment variables in Stack compose\", () => {\n\t\tconst serviceOverrideEnv = `\nNODE_ENV=production\nAPI_URL=\\${{environment.API_URL}}\n`;\n\n\t\tconst result = getEnviromentVariablesObject(\n\t\t\tserviceOverrideEnv,\n\t\t\t\"\",\n\t\t\tenvironmentEnv,\n\t\t);\n\n\t\texpect(result).toEqual({\n\t\t\tNODE_ENV: \"production\",\n\t\t\tAPI_URL: \"https://api.dev.example.com\",\n\t\t});\n\t});\n\n\tit(\"resolves complex references with project, environment, and service variables for Stack compose\", () => {\n\t\tconst complexServiceEnv = `\nFULL_DATABASE_URL=\\${{project.DATABASE_URL}}/\\${{environment.DATABASE_NAME}}\nAPI_ENDPOINT=\\${{environment.API_URL}}/\\${{project.ENVIRONMENT}}/api\nSERVICE_NAME=my-service\nCOMPLEX_VAR=\\${{SERVICE_NAME}}-\\${{environment.NODE_ENV}}-\\${{project.ENVIRONMENT}}\n`;\n\n\t\tconst result = getEnviromentVariablesObject(\n\t\t\tcomplexServiceEnv,\n\t\t\tprojectEnv,\n\t\t\tenvironmentEnv,\n\t\t);\n\n\t\texpect(result).toEqual({\n\t\t\tFULL_DATABASE_URL:\n\t\t\t\t\"postgres://postgres:postgres@localhost:5432/project_db/dev_database\",\n\t\t\tAPI_ENDPOINT: \"https://api.dev.example.com/staging/api\",\n\t\t\tSERVICE_NAME: \"my-service\",\n\t\t\tCOMPLEX_VAR: \"my-service-development-staging\",\n\t\t});\n\t});\n\n\tit(\"maintains precedence: service > environment > project in Stack compose\", () => {\n\t\tconst conflictingProjectEnv = `\nNODE_ENV=production-project\nAPI_URL=https://project.api.com\nDATABASE_NAME=project_db\n`;\n\n\t\tconst conflictingEnvironmentEnv = `\nNODE_ENV=development-environment\nAPI_URL=https://environment.api.com\nDATABASE_NAME=env_db\n`;\n\n\t\tconst serviceWithConflicts = `\nNODE_ENV=service-override\nPROJECT_ENV=\\${{project.NODE_ENV}}\nENV_VAR=\\${{environment.API_URL}}\nDB_NAME=\\${{environment.DATABASE_NAME}}\n`;\n\n\t\tconst result = getEnviromentVariablesObject(\n\t\t\tserviceWithConflicts,\n\t\t\tconflictingProjectEnv,\n\t\t\tconflictingEnvironmentEnv,\n\t\t);\n\n\t\texpect(result).toEqual({\n\t\t\tNODE_ENV: \"service-override\",\n\t\t\tPROJECT_ENV: \"production-project\",\n\t\t\tENV_VAR: \"https://environment.api.com\",\n\t\t\tDB_NAME: \"env_db\",\n\t\t});\n\t});\n\n\tit(\"handles empty environment variables in Stack compose\", () => {\n\t\tconst serviceWithEmpty = `\nSERVICE_VAR=test\nPROJECT_VAR=\\${{project.ENVIRONMENT}}\n`;\n\n\t\tconst result = getEnviromentVariablesObject(\n\t\t\tserviceWithEmpty,\n\t\t\tprojectEnv,\n\t\t\t\"\",\n\t\t);\n\n\t\texpect(result).toEqual({\n\t\t\tSERVICE_VAR: \"test\",\n\t\t\tPROJECT_VAR: \"staging\",\n\t\t});\n\t});\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/permissions/check-permission.test.ts",
    "content": "import { beforeEach, describe, expect, it, vi } from \"vitest\";\n\nconst mockMemberData = (\n\trole: string,\n\toverrides: Record<string, boolean> = {},\n) => ({\n\tid: \"member-1\",\n\trole,\n\tuserId: \"user-1\",\n\torganizationId: \"org-1\",\n\taccessedProjects: [] as string[],\n\taccessedServices: [] as string[],\n\taccessedEnvironments: [] as string[],\n\tcanCreateProjects: overrides.canCreateProjects ?? false,\n\tcanDeleteProjects: overrides.canDeleteProjects ?? false,\n\tcanCreateServices: overrides.canCreateServices ?? false,\n\tcanDeleteServices: overrides.canDeleteServices ?? false,\n\tcanCreateEnvironments: overrides.canCreateEnvironments ?? false,\n\tcanDeleteEnvironments: overrides.canDeleteEnvironments ?? false,\n\tcanAccessToTraefikFiles: overrides.canAccessToTraefikFiles ?? false,\n\tcanAccessToDocker: overrides.canAccessToDocker ?? false,\n\tcanAccessToAPI: overrides.canAccessToAPI ?? false,\n\tcanAccessToSSHKeys: overrides.canAccessToSSHKeys ?? false,\n\tcanAccessToGitProviders: overrides.canAccessToGitProviders ?? false,\n\tuser: { id: \"user-1\", email: \"test@test.com\" },\n});\n\nlet memberToReturn: ReturnType<typeof mockMemberData> =\n\tmockMemberData(\"member\");\n\nvi.mock(\"@dokploy/server/db\", () => ({\n\tdb: {\n\t\tquery: {\n\t\t\tmember: {\n\t\t\t\tfindFirst: vi.fn(() => Promise.resolve(memberToReturn)),\n\t\t\t\tfindMany: vi.fn(() => Promise.resolve([])),\n\t\t\t},\n\t\t\torganizationRole: {\n\t\t\t\tfindFirst: vi.fn(),\n\t\t\t\tfindMany: vi.fn(() => Promise.resolve([])),\n\t\t\t},\n\t\t},\n\t},\n}));\n\nvi.mock(\"@dokploy/server/services/proprietary/license-key\", () => ({\n\thasValidLicense: vi.fn(() => Promise.resolve(false)),\n}));\n\nconst { checkPermission } = await import(\"@dokploy/server/services/permission\");\n\nconst ctx = {\n\tuser: { id: \"user-1\" },\n\tsession: { activeOrganizationId: \"org-1\" },\n};\n\nbeforeEach(() => {\n\tvi.clearAllMocks();\n});\n\ndescribe(\"static roles bypass enterprise resources\", () => {\n\tit(\"owner bypasses deployment.read\", async () => {\n\t\tmemberToReturn = mockMemberData(\"owner\");\n\t\tawait expect(\n\t\t\tcheckPermission(ctx, { deployment: [\"read\"] }),\n\t\t).resolves.toBeUndefined();\n\t});\n\n\tit(\"admin bypasses backup.create\", async () => {\n\t\tmemberToReturn = mockMemberData(\"admin\");\n\t\tawait expect(\n\t\t\tcheckPermission(ctx, { backup: [\"create\"] }),\n\t\t).resolves.toBeUndefined();\n\t});\n\n\tit(\"member bypasses schedule.delete\", async () => {\n\t\tmemberToReturn = mockMemberData(\"member\");\n\t\tawait expect(\n\t\t\tcheckPermission(ctx, { schedule: [\"delete\"] }),\n\t\t).resolves.toBeUndefined();\n\t});\n\n\tit(\"member bypasses multiple enterprise permissions at once\", async () => {\n\t\tmemberToReturn = mockMemberData(\"member\");\n\t\tawait expect(\n\t\t\tcheckPermission(ctx, {\n\t\t\t\tdeployment: [\"read\"],\n\t\t\t\tbackup: [\"create\"],\n\t\t\t\tdomain: [\"delete\"],\n\t\t\t}),\n\t\t).resolves.toBeUndefined();\n\t});\n});\n\ndescribe(\"static roles validate free-tier resources\", () => {\n\tit(\"owner passes project.create\", async () => {\n\t\tmemberToReturn = mockMemberData(\"owner\");\n\t\tawait expect(\n\t\t\tcheckPermission(ctx, { project: [\"create\"] }),\n\t\t).resolves.toBeUndefined();\n\t});\n\n\tit(\"member fails project.create (no legacy override)\", async () => {\n\t\tmemberToReturn = mockMemberData(\"member\");\n\t\tawait expect(\n\t\t\tcheckPermission(ctx, { project: [\"create\"] }),\n\t\t).rejects.toThrow();\n\t});\n\n\tit(\"member passes service.read\", async () => {\n\t\tmemberToReturn = mockMemberData(\"member\");\n\t\tawait expect(\n\t\t\tcheckPermission(ctx, { service: [\"read\"] }),\n\t\t).resolves.toBeUndefined();\n\t});\n\n\tit(\"member fails service.create\", async () => {\n\t\tmemberToReturn = mockMemberData(\"member\");\n\t\tawait expect(\n\t\t\tcheckPermission(ctx, { service: [\"create\"] }),\n\t\t).rejects.toThrow();\n\t});\n});\n\ndescribe(\"legacy boolean overrides for member\", () => {\n\tit(\"member passes project.create with canCreateProjects=true\", async () => {\n\t\tmemberToReturn = mockMemberData(\"member\", { canCreateProjects: true });\n\t\tawait expect(\n\t\t\tcheckPermission(ctx, { project: [\"create\"] }),\n\t\t).resolves.toBeUndefined();\n\t});\n\n\tit(\"member passes docker.read with canAccessToDocker=true\", async () => {\n\t\tmemberToReturn = mockMemberData(\"member\", { canAccessToDocker: true });\n\t\tawait expect(\n\t\t\tcheckPermission(ctx, { docker: [\"read\"] }),\n\t\t).resolves.toBeUndefined();\n\t});\n\n\tit(\"member fails docker.read with canAccessToDocker=false\", async () => {\n\t\tmemberToReturn = mockMemberData(\"member\");\n\t\tawait expect(checkPermission(ctx, { docker: [\"read\"] })).rejects.toThrow();\n\t});\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/permissions/enterprise-only-resources.test.ts",
    "content": "import { describe, it, expect } from \"vitest\";\nimport {\n\tenterpriseOnlyResources,\n\tstatements,\n} from \"@dokploy/server/lib/access-control\";\n\nconst FREE_TIER_RESOURCES = [\n\t\"organization\",\n\t\"member\",\n\t\"invitation\",\n\t\"team\",\n\t\"ac\",\n\t\"project\",\n\t\"service\",\n\t\"environment\",\n\t\"docker\",\n\t\"sshKeys\",\n\t\"gitProviders\",\n\t\"traefikFiles\",\n\t\"api\",\n];\n\nconst ENTERPRISE_RESOURCES = [\n\t\"volume\",\n\t\"deployment\",\n\t\"envVars\",\n\t\"projectEnvVars\",\n\t\"environmentEnvVars\",\n\t\"server\",\n\t\"registry\",\n\t\"certificate\",\n\t\"backup\",\n\t\"volumeBackup\",\n\t\"schedule\",\n\t\"domain\",\n\t\"destination\",\n\t\"notification\",\n\t\"logs\",\n\t\"monitoring\",\n\t\"auditLog\",\n];\n\ndescribe(\"enterpriseOnlyResources set\", () => {\n\tit(\"contains all enterprise resources\", () => {\n\t\tfor (const resource of ENTERPRISE_RESOURCES) {\n\t\t\texpect(enterpriseOnlyResources.has(resource)).toBe(true);\n\t\t}\n\t});\n\n\tit(\"does NOT contain free-tier resources\", () => {\n\t\tfor (const resource of FREE_TIER_RESOURCES) {\n\t\t\texpect(enterpriseOnlyResources.has(resource)).toBe(false);\n\t\t}\n\t});\n\n\tit(\"every resource in statements is either free or enterprise\", () => {\n\t\tconst allResources = Object.keys(statements);\n\t\tfor (const resource of allResources) {\n\t\t\tconst isFree = FREE_TIER_RESOURCES.includes(resource);\n\t\t\tconst isEnterprise = enterpriseOnlyResources.has(resource);\n\t\t\texpect(isFree || isEnterprise).toBe(true);\n\t\t}\n\t});\n\n\tit(\"free and enterprise sets don't overlap\", () => {\n\t\tfor (const resource of FREE_TIER_RESOURCES) {\n\t\t\texpect(enterpriseOnlyResources.has(resource)).toBe(false);\n\t\t}\n\t});\n\n\tit(\"all statement resources are accounted for\", () => {\n\t\tconst allResources = Object.keys(statements);\n\t\tconst categorized = [...FREE_TIER_RESOURCES, ...ENTERPRISE_RESOURCES];\n\t\tfor (const resource of allResources) {\n\t\t\texpect(categorized).toContain(resource);\n\t\t}\n\t});\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/permissions/resolve-permissions.test.ts",
    "content": "import { beforeEach, describe, expect, it, vi } from \"vitest\";\n\nconst mockMemberData = (\n\trole: string,\n\toverrides: Record<string, boolean> = {},\n) => ({\n\tid: \"member-1\",\n\trole,\n\tuserId: \"user-1\",\n\torganizationId: \"org-1\",\n\taccessedProjects: [] as string[],\n\taccessedServices: [] as string[],\n\taccessedEnvironments: [] as string[],\n\tcanCreateProjects: overrides.canCreateProjects ?? false,\n\tcanDeleteProjects: overrides.canDeleteProjects ?? false,\n\tcanCreateServices: overrides.canCreateServices ?? false,\n\tcanDeleteServices: overrides.canDeleteServices ?? false,\n\tcanCreateEnvironments: overrides.canCreateEnvironments ?? false,\n\tcanDeleteEnvironments: overrides.canDeleteEnvironments ?? false,\n\tcanAccessToTraefikFiles: overrides.canAccessToTraefikFiles ?? false,\n\tcanAccessToDocker: overrides.canAccessToDocker ?? false,\n\tcanAccessToAPI: overrides.canAccessToAPI ?? false,\n\tcanAccessToSSHKeys: overrides.canAccessToSSHKeys ?? false,\n\tcanAccessToGitProviders: overrides.canAccessToGitProviders ?? false,\n\tuser: { id: \"user-1\", email: \"test@test.com\" },\n});\n\nlet memberToReturn: ReturnType<typeof mockMemberData> =\n\tmockMemberData(\"member\");\n\nvi.mock(\"@dokploy/server/db\", () => ({\n\tdb: {\n\t\tquery: {\n\t\t\tmember: {\n\t\t\t\tfindFirst: vi.fn(() => Promise.resolve(memberToReturn)),\n\t\t\t\tfindMany: vi.fn(() => Promise.resolve([])),\n\t\t\t},\n\t\t\torganizationRole: {\n\t\t\t\tfindFirst: vi.fn(),\n\t\t\t\tfindMany: vi.fn(() => Promise.resolve([])),\n\t\t\t},\n\t\t},\n\t},\n}));\n\nvi.mock(\"@dokploy/server/services/proprietary/license-key\", () => ({\n\thasValidLicense: vi.fn(() => Promise.resolve(false)),\n}));\n\nconst { resolvePermissions } = await import(\n\t\"@dokploy/server/services/permission\"\n);\nconst { enterpriseOnlyResources, statements } = await import(\n\t\"@dokploy/server/lib/access-control\"\n);\n\nconst ctx = {\n\tuser: { id: \"user-1\" },\n\tsession: { activeOrganizationId: \"org-1\" },\n};\n\nbeforeEach(() => {\n\tvi.clearAllMocks();\n});\n\ndescribe(\"enterprise resources for static roles\", () => {\n\tit(\"owner gets true for all enterprise resources\", async () => {\n\t\tmemberToReturn = mockMemberData(\"owner\");\n\t\tconst perms = await resolvePermissions(ctx);\n\n\t\tfor (const resource of enterpriseOnlyResources) {\n\t\t\tconst actions = statements[resource as keyof typeof statements];\n\t\t\tfor (const action of actions) {\n\t\t\t\texpect((perms as any)[resource][action]).toBe(true);\n\t\t\t}\n\t\t}\n\t});\n\n\tit(\"admin gets true for all enterprise resources\", async () => {\n\t\tmemberToReturn = mockMemberData(\"admin\");\n\t\tconst perms = await resolvePermissions(ctx);\n\n\t\tfor (const resource of enterpriseOnlyResources) {\n\t\t\tconst actions = statements[resource as keyof typeof statements];\n\t\t\tfor (const action of actions) {\n\t\t\t\texpect((perms as any)[resource][action]).toBe(true);\n\t\t\t}\n\t\t}\n\t});\n\n\tit(\"member gets true for service-level enterprise resources\", async () => {\n\t\tmemberToReturn = mockMemberData(\"member\");\n\t\tconst perms = await resolvePermissions(ctx);\n\n\t\texpect(perms.deployment.read).toBe(true);\n\t\texpect(perms.deployment.create).toBe(true);\n\t\texpect(perms.domain.read).toBe(true);\n\t\texpect(perms.backup.read).toBe(true);\n\t\texpect(perms.logs.read).toBe(true);\n\t\texpect(perms.monitoring.read).toBe(true);\n\t});\n\n\tit(\"member gets false for org-level enterprise resources\", async () => {\n\t\tmemberToReturn = mockMemberData(\"member\");\n\t\tconst perms = await resolvePermissions(ctx);\n\n\t\texpect(perms.server.read).toBe(false);\n\t\texpect(perms.registry.read).toBe(false);\n\t\texpect(perms.certificate.read).toBe(false);\n\t\texpect(perms.destination.read).toBe(false);\n\t\texpect(perms.notification.read).toBe(false);\n\t\texpect(perms.auditLog.read).toBe(false);\n\t});\n});\n\ndescribe(\"free-tier resources for member\", () => {\n\tit(\"member gets service.read=true\", async () => {\n\t\tmemberToReturn = mockMemberData(\"member\");\n\t\tconst perms = await resolvePermissions(ctx);\n\t\texpect(perms.service.read).toBe(true);\n\t});\n\n\tit(\"member gets project.create=false without legacy override\", async () => {\n\t\tmemberToReturn = mockMemberData(\"member\");\n\t\tconst perms = await resolvePermissions(ctx);\n\t\texpect(perms.project.create).toBe(false);\n\t});\n\n\tit(\"member gets project.create=true with canCreateProjects\", async () => {\n\t\tmemberToReturn = mockMemberData(\"member\", { canCreateProjects: true });\n\t\tconst perms = await resolvePermissions(ctx);\n\t\texpect(perms.project.create).toBe(true);\n\t});\n\n\tit(\"member gets docker.read=false without legacy override\", async () => {\n\t\tmemberToReturn = mockMemberData(\"member\");\n\t\tconst perms = await resolvePermissions(ctx);\n\t\texpect(perms.docker.read).toBe(false);\n\t});\n\n\tit(\"member gets docker.read=true with canAccessToDocker\", async () => {\n\t\tmemberToReturn = mockMemberData(\"member\", { canAccessToDocker: true });\n\t\tconst perms = await resolvePermissions(ctx);\n\t\texpect(perms.docker.read).toBe(true);\n\t});\n});\n\ndescribe(\"free-tier resources for owner\", () => {\n\tit(\"owner gets all free-tier permissions as true\", async () => {\n\t\tmemberToReturn = mockMemberData(\"owner\");\n\t\tconst perms = await resolvePermissions(ctx);\n\t\texpect(perms.project.create).toBe(true);\n\t\texpect(perms.project.delete).toBe(true);\n\t\texpect(perms.service.create).toBe(true);\n\t\texpect(perms.service.read).toBe(true);\n\t\texpect(perms.service.delete).toBe(true);\n\t\texpect(perms.docker.read).toBe(true);\n\t\texpect(perms.traefikFiles.read).toBe(true);\n\t\texpect(perms.traefikFiles.write).toBe(true);\n\t});\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/permissions/service-access.test.ts",
    "content": "import { beforeEach, describe, expect, it, vi } from \"vitest\";\n\nconst mockMemberData = (\n\trole: string,\n\taccessedServices: string[] = [],\n\taccessedProjects: string[] = [],\n) => ({\n\tid: \"member-1\",\n\trole,\n\tuserId: \"user-1\",\n\torganizationId: \"org-1\",\n\taccessedProjects,\n\taccessedServices,\n\taccessedEnvironments: [] as string[],\n\tcanCreateProjects: false,\n\tcanDeleteProjects: false,\n\tcanCreateServices: false,\n\tcanDeleteServices: false,\n\tcanCreateEnvironments: false,\n\tcanDeleteEnvironments: false,\n\tcanAccessToTraefikFiles: false,\n\tcanAccessToDocker: false,\n\tcanAccessToAPI: false,\n\tcanAccessToSSHKeys: false,\n\tcanAccessToGitProviders: false,\n\tuser: { id: \"user-1\", email: \"test@test.com\" },\n});\n\nlet memberToReturn: ReturnType<typeof mockMemberData> =\n\tmockMemberData(\"member\");\n\nvi.mock(\"@dokploy/server/db\", () => ({\n\tdb: {\n\t\tquery: {\n\t\t\tmember: {\n\t\t\t\tfindFirst: vi.fn(() => Promise.resolve(memberToReturn)),\n\t\t\t\tfindMany: vi.fn(() => Promise.resolve([])),\n\t\t\t},\n\t\t\torganizationRole: {\n\t\t\t\tfindFirst: vi.fn(),\n\t\t\t\tfindMany: vi.fn(() => Promise.resolve([])),\n\t\t\t},\n\t\t},\n\t},\n}));\n\nvi.mock(\"@dokploy/server/services/proprietary/license-key\", () => ({\n\thasValidLicense: vi.fn(() => Promise.resolve(false)),\n}));\n\nconst { checkServicePermissionAndAccess, checkServiceAccess } = await import(\n\t\"@dokploy/server/services/permission\"\n);\n\nconst ctx = {\n\tuser: { id: \"user-1\" },\n\tsession: { activeOrganizationId: \"org-1\" },\n};\n\nbeforeEach(() => {\n\tvi.clearAllMocks();\n});\n\ndescribe(\"checkServicePermissionAndAccess\", () => {\n\tit(\"owner bypasses accessedServices check\", async () => {\n\t\tmemberToReturn = mockMemberData(\"owner\", []);\n\t\tawait expect(\n\t\t\tcheckServicePermissionAndAccess(ctx, \"service-123\", {\n\t\t\t\tdeployment: [\"read\"],\n\t\t\t}),\n\t\t).resolves.toBeUndefined();\n\t});\n\n\tit(\"admin bypasses accessedServices check\", async () => {\n\t\tmemberToReturn = mockMemberData(\"admin\", []);\n\t\tawait expect(\n\t\t\tcheckServicePermissionAndAccess(ctx, \"service-123\", {\n\t\t\t\tbackup: [\"create\"],\n\t\t\t}),\n\t\t).resolves.toBeUndefined();\n\t});\n\n\tit(\"member with access to service passes\", async () => {\n\t\tmemberToReturn = mockMemberData(\"member\", [\"service-123\"]);\n\t\tawait expect(\n\t\t\tcheckServicePermissionAndAccess(ctx, \"service-123\", {\n\t\t\t\tdeployment: [\"read\"],\n\t\t\t}),\n\t\t).resolves.toBeUndefined();\n\t});\n\n\tit(\"member WITHOUT access to service fails\", async () => {\n\t\tmemberToReturn = mockMemberData(\"member\", [\"other-service\"]);\n\t\tawait expect(\n\t\t\tcheckServicePermissionAndAccess(ctx, \"service-123\", {\n\t\t\t\tdeployment: [\"read\"],\n\t\t\t}),\n\t\t).rejects.toThrow(\"You don't have access to this service\");\n\t});\n\n\tit(\"member with empty accessedServices fails\", async () => {\n\t\tmemberToReturn = mockMemberData(\"member\", []);\n\t\tawait expect(\n\t\t\tcheckServicePermissionAndAccess(ctx, \"service-123\", {\n\t\t\t\tdomain: [\"delete\"],\n\t\t\t}),\n\t\t).rejects.toThrow(\"You don't have access to this service\");\n\t});\n});\n\ndescribe(\"checkServiceAccess\", () => {\n\tit(\"member with service access passes read check\", async () => {\n\t\tmemberToReturn = mockMemberData(\"member\", [\"app-1\"]);\n\t\tawait expect(\n\t\t\tcheckServiceAccess(ctx, \"app-1\", \"read\"),\n\t\t).resolves.toBeUndefined();\n\t});\n\n\tit(\"member without service access fails read check\", async () => {\n\t\tmemberToReturn = mockMemberData(\"member\", []);\n\t\tawait expect(checkServiceAccess(ctx, \"app-1\", \"read\")).rejects.toThrow(\n\t\t\t\"You don't have access to this service\",\n\t\t);\n\t});\n\n\tit(\"owner bypasses all access checks\", async () => {\n\t\tmemberToReturn = mockMemberData(\"owner\", [], []);\n\t\tawait expect(\n\t\t\tcheckServiceAccess(ctx, \"project-1\", \"create\"),\n\t\t).resolves.toBeUndefined();\n\t});\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/requests/request.test.ts",
    "content": "import { parseRawConfig, processLogs } from \"@dokploy/server\";\nimport { describe, expect, it } from \"vitest\";\n\nconst sampleLogEntry = `{\"ClientAddr\":\"172.19.0.1:56732\",\"ClientHost\":\"172.19.0.1\",\"ClientPort\":\"56732\",\"ClientUsername\":\"-\",\"DownstreamContentSize\":0,\"DownstreamStatus\":304,\"Duration\":14729375,\"OriginContentSize\":0,\"OriginDuration\":14051833,\"OriginStatus\":304,\"Overhead\":677542,\"RequestAddr\":\"s222-umami-c381af.traefik.me\",\"RequestContentSize\":0,\"RequestCount\":122,\"RequestHost\":\"s222-umami-c381af.traefik.me\",\"RequestMethod\":\"GET\",\"RequestPath\":\"/dashboard?_rsc=1rugv\",\"RequestPort\":\"-\",\"RequestProtocol\":\"HTTP/1.1\",\"RequestScheme\":\"http\",\"RetryAttempts\":0,\"RouterName\":\"s222-umami-60e104-47-web@docker\",\"ServiceAddr\":\"10.0.1.15:3000\",\"ServiceName\":\"s222-umami-60e104-47-web@docker\",\"ServiceURL\":{\"Scheme\":\"http\",\"Opaque\":\"\",\"User\":null,\"Host\":\"10.0.1.15:3000\",\"Path\":\"\",\"RawPath\":\"\",\"ForceQuery\":false,\"RawQuery\":\"\",\"Fragment\":\"\",\"RawFragment\":\"\"},\"StartLocal\":\"2024-08-25T04:34:37.306691884Z\",\"StartUTC\":\"2024-08-25T04:34:37.306691884Z\",\"entryPointName\":\"web\",\"level\":\"info\",\"msg\":\"\",\"time\":\"2024-08-25T04:34:37Z\"}`;\n\ndescribe(\"processLogs\", () => {\n\tit(\"should process a single log entry correctly\", () => {\n\t\tconst result = processLogs(sampleLogEntry);\n\t\texpect(result).toHaveLength(1);\n\t\texpect(result[0]).toEqual({\n\t\t\thour: \"2024-08-25T04:00:00Z\",\n\t\t\tcount: 1,\n\t\t});\n\t});\n\n\tit(\"should process multiple log entries and group by hour\", () => {\n\t\tconst sampleLogEntry = `{\"ClientAddr\":\"172.19.0.1:58094\",\"ClientHost\":\"172.19.0.1\",\"ClientPort\":\"58094\",\"ClientUsername\":\"-\",\"DownstreamContentSize\":50,\"DownstreamStatus\":200,\"Duration\":35914250,\"OriginContentSize\":50,\"OriginDuration\":35817959,\"OriginStatus\":200,\"Overhead\":96291,\"RequestAddr\":\"s222-pocketbase-f4a6e5.traefik.me\",\"RequestContentSize\":0,\"RequestCount\":991,\"RequestHost\":\"s222-pocketbase-f4a6e5.traefik.me\",\"RequestMethod\":\"GET\",\"RequestPath\":\"/api/logs/stats?filter=\",\"RequestPort\":\"-\",\"RequestProtocol\":\"HTTP/1.1\",\"RequestScheme\":\"http\",\"RetryAttempts\":0,\"RouterName\":\"s222-pocketbase-e94e25-44-web@docker\",\"ServiceAddr\":\"10.0.1.12:80\",\"ServiceName\":\"s222-pocketbase-e94e25-44-web@docker\",\"ServiceURL\":{\"Scheme\":\"http\",\"Opaque\":\"\",\"User\":null,\"Host\":\"10.0.1.12:80\",\"Path\":\"\",\"RawPath\":\"\",\"ForceQuery\":false,\"RawQuery\":\"\",\"Fragment\":\"\",\"RawFragment\":\"\"},\"StartLocal\":\"2024-08-25T17:44:29.274072471Z\",\"StartUTC\":\"2024-08-25T17:44:29.274072471Z\",\"entryPointName\":\"web\",\"level\":\"info\",\"msg\":\"\",\"time\":\"2024-08-25T17:44:29Z\"}\n{\"ClientAddr\":\"172.19.0.1:58108\",\"ClientHost\":\"172.19.0.1\",\"ClientPort\":\"58108\",\"ClientUsername\":\"-\",\"DownstreamContentSize\":30975,\"DownstreamStatus\":200,\"Duration\":31406458,\"OriginContentSize\":30975,\"OriginDuration\":31046791,\"OriginStatus\":200,\"Overhead\":359667,\"RequestAddr\":\"s222-pocketbase-f4a6e5.traefik.me\",\"RequestContentSize\":0,\"RequestCount\":992,\"RequestHost\":\"s222-pocketbase-f4a6e5.traefik.me\",\"RequestMethod\":\"GET\",\"RequestPath\":\"/api/logs?page=1\\u0026perPage=50\\u0026sort=-rowid\\u0026skipTotal=1\\u0026filter=\",\"RequestPort\":\"-\",\"RequestProtocol\":\"HTTP/1.1\",\"RequestScheme\":\"http\",\"RetryAttempts\":0,\"RouterName\":\"s222-pocketbase-e94e25-44-web@docker\",\"ServiceAddr\":\"10.0.1.12:80\",\"ServiceName\":\"s222-pocketbase-e94e25-44-web@docker\",\"ServiceURL\":{\"Scheme\":\"http\",\"Opaque\":\"\",\"User\":null,\"Host\":\"10.0.1.12:80\",\"Path\":\"\",\"RawPath\":\"\",\"ForceQuery\":false,\"RawQuery\":\"\",\"Fragment\":\"\",\"RawFragment\":\"\"},\"StartLocal\":\"2024-08-25T17:44:29.278990221Z\",\"StartUTC\":\"2024-08-25T17:44:29.278990221Z\",\"entryPointName\":\"web\",\"level\":\"info\",\"msg\":\"\",\"time\":\"2024-08-25T17:44:29Z\"}\n`;\n\n\t\tconst result = processLogs(sampleLogEntry);\n\t\texpect(result).toHaveLength(1);\n\t\texpect(result).toEqual([{ hour: \"2024-08-25T17:00:00Z\", count: 2 }]);\n\t});\n\n\tit(\"should return an empty array for empty input\", () => {\n\t\texpect(processLogs(\"\")).toEqual([]);\n\t\texpect(processLogs(null as any)).toEqual([]);\n\t\texpect(processLogs(undefined as any)).toEqual([]);\n\t});\n\n\t// it(\"should parse a single log entry correctly\", () => {\n\t// \tconst result = parseRawConfig(sampleLogEntry);\n\t// \texpect(result).toHaveLength(1);\n\t// \texpect(result.data[0]).toHaveProperty(\"ClientAddr\", \"172.19.0.1:56732\");\n\t// \texpect(result.data[0]).toHaveProperty(\n\t// \t\t\"StartUTC\",\n\t// \t\t\"2024-08-25T04:34:37.306691884Z\",\n\t// \t);\n\t// });\n\n\tit(\"should parse multiple log entries\", () => {\n\t\tconst multipleEntries = `${sampleLogEntry}\\n${sampleLogEntry}`;\n\t\tconst result = parseRawConfig(multipleEntries);\n\t\texpect(result.data).toHaveLength(2);\n\n\t\tfor (const entry of result.data) {\n\t\t\texpect(entry).toHaveProperty(\"ClientAddr\", \"172.19.0.1:56732\");\n\t\t}\n\t});\n\n\tit(\"should handle whitespace and empty lines\", () => {\n\t\tconst entryWithWhitespace = `\\n${sampleLogEntry}\\n\\n${sampleLogEntry}\\n`;\n\t\tconst result = parseRawConfig(entryWithWhitespace);\n\t\texpect(result.data).toHaveLength(2);\n\t});\n\n\tit(\"should filter out Dokploy dashboard requests\", () => {\n\t\tconst dokployDashboardEntry = `{\"ClientAddr\":\"172.71.187.131:9485\",\"ClientHost\":\"172.71.187.131\",\"ClientPort\":\"9485\",\"ClientUsername\":\"-\",\"DownstreamContentSize\":14550,\"DownstreamStatus\":200,\"Duration\":57681682,\"OriginContentSize\":14550,\"OriginDuration\":57612242,\"OriginStatus\":200,\"Overhead\":69440,\"RequestAddr\":\"hostinger.dokploy.com\",\"RequestContentSize\":0,\"RequestCount\":20142,\"RequestHost\":\"hostinger.dokploy.com\",\"RequestMethod\":\"GET\",\"RequestPath\":\"/_next/data/cb_zzI4Rp9G7Q7djrFKh0/en/dashboard/traefik.json\",\"RequestPort\":\"-\",\"RequestProtocol\":\"HTTP/2.0\",\"RequestScheme\":\"https\",\"RetryAttempts\":0,\"RouterName\":\"dokploy-router-app-secure@file\",\"ServiceAddr\":\"dokploy:3000\",\"ServiceName\":\"dokploy-service-app@file\",\"ServiceURL\":\"http://dokploy:3000\",\"StartLocal\":\"2025-12-10T05:10:41.957755949Z\",\"StartUTC\":\"2025-12-10T05:10:41.957755949Z\",\"TLSCipher\":\"TLS_AES_128_GCM_SHA256\",\"TLSVersion\":\"1.3\",\"entryPointName\":\"websecure\",\"level\":\"info\",\"msg\":\"\",\"time\":\"2025-12-10T05:10:42Z\"}`;\n\n\t\t// Test with only Dokploy dashboard entry - should be filtered out\n\t\tconst resultOnlyDokploy = parseRawConfig(dokployDashboardEntry);\n\t\texpect(resultOnlyDokploy.data).toHaveLength(0);\n\t\texpect(resultOnlyDokploy.totalCount).toBe(0);\n\n\t\t// Test with mixed entries - Dokploy should be filtered, others should remain\n\t\tconst mixedEntries = `${dokployDashboardEntry}\\n${sampleLogEntry}`;\n\t\tconst resultMixed = parseRawConfig(mixedEntries);\n\t\texpect(resultMixed.data).toHaveLength(1);\n\t\texpect(resultMixed.totalCount).toBe(1);\n\t\texpect(resultMixed.data[0]?.ServiceName).not.toBe(\n\t\t\t\"dokploy-service-app@file\",\n\t\t);\n\t});\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/server/mechanizeDockerContainer.test.ts",
    "content": "import type { ApplicationNested } from \"@dokploy/server/utils/builders\";\nimport { mechanizeDockerContainer } from \"@dokploy/server/utils/builders\";\nimport { beforeEach, describe, expect, it, vi } from \"vitest\";\n\ntype MockCreateServiceOptions = {\n\tTaskTemplate?: {\n\t\tContainerSpec?: {\n\t\t\tStopGracePeriod?: number;\n\t\t\tUlimits?: Array<{ Name: string; Soft: number; Hard: number }>;\n\t\t};\n\t};\n\t[key: string]: unknown;\n};\n\nconst { inspectMock, getServiceMock, createServiceMock, getRemoteDockerMock } =\n\tvi.hoisted(() => {\n\t\tconst inspect = vi.fn<() => Promise<never>>();\n\t\tconst getService = vi.fn(() => ({ inspect }));\n\t\tconst createService = vi.fn<\n\t\t\t(opts: MockCreateServiceOptions) => Promise<void>\n\t\t>(async () => undefined);\n\t\tconst getRemoteDocker = vi.fn(async () => ({\n\t\t\tgetService,\n\t\t\tcreateService,\n\t\t}));\n\t\treturn {\n\t\t\tinspectMock: inspect,\n\t\t\tgetServiceMock: getService,\n\t\t\tcreateServiceMock: createService,\n\t\t\tgetRemoteDockerMock: getRemoteDocker,\n\t\t};\n\t});\n\nvi.mock(\"@dokploy/server/utils/servers/remote-docker\", () => ({\n\tgetRemoteDocker: getRemoteDockerMock,\n}));\n\nconst createApplication = (\n\toverrides: Partial<ApplicationNested> = {},\n): ApplicationNested =>\n\t({\n\t\tappName: \"test-app\",\n\t\tbuildType: \"dockerfile\",\n\t\tenv: null,\n\t\tmounts: [],\n\t\tcpuLimit: null,\n\t\tmemoryLimit: null,\n\t\tmemoryReservation: null,\n\t\tcpuReservation: null,\n\t\tcommand: null,\n\t\tports: [],\n\t\tsourceType: \"docker\",\n\t\tdockerImage: \"example:latest\",\n\t\tregistry: null,\n\t\tenvironment: {\n\t\t\tproject: { env: null },\n\t\t\tenv: null,\n\t\t},\n\t\treplicas: 1,\n\t\tstopGracePeriodSwarm: 0n,\n\t\tulimitsSwarm: null,\n\t\tserverId: \"server-id\",\n\t\t...overrides,\n\t}) as unknown as ApplicationNested;\n\ndescribe(\"mechanizeDockerContainer\", () => {\n\tbeforeEach(() => {\n\t\tinspectMock.mockReset();\n\t\tinspectMock.mockRejectedValue(new Error(\"service not found\"));\n\t\tgetServiceMock.mockClear();\n\t\tcreateServiceMock.mockClear();\n\t\tgetRemoteDockerMock.mockClear();\n\t\tgetRemoteDockerMock.mockResolvedValue({\n\t\t\tgetService: getServiceMock,\n\t\t\tcreateService: createServiceMock,\n\t\t});\n\t});\n\n\tit(\"converts bigint stopGracePeriodSwarm to a number and keeps zero values\", async () => {\n\t\tconst application = createApplication({ stopGracePeriodSwarm: 0n });\n\n\t\tawait mechanizeDockerContainer(application);\n\n\t\texpect(createServiceMock).toHaveBeenCalledTimes(1);\n\t\tconst call = createServiceMock.mock.calls[0] as\n\t\t\t| [MockCreateServiceOptions]\n\t\t\t| undefined;\n\t\tif (!call) {\n\t\t\tthrow new Error(\"createServiceMock should have been called once\");\n\t\t}\n\t\tconst [settings] = call;\n\t\texpect(settings.TaskTemplate?.ContainerSpec?.StopGracePeriod).toBe(0);\n\t\texpect(typeof settings.TaskTemplate?.ContainerSpec?.StopGracePeriod).toBe(\n\t\t\t\"number\",\n\t\t);\n\t});\n\n\tit(\"omits StopGracePeriod when stopGracePeriodSwarm is null\", async () => {\n\t\tconst application = createApplication({ stopGracePeriodSwarm: null });\n\n\t\tawait mechanizeDockerContainer(application);\n\n\t\texpect(createServiceMock).toHaveBeenCalledTimes(1);\n\t\tconst call = createServiceMock.mock.calls[0] as\n\t\t\t| [MockCreateServiceOptions]\n\t\t\t| undefined;\n\t\tif (!call) {\n\t\t\tthrow new Error(\"createServiceMock should have been called once\");\n\t\t}\n\t\tconst [settings] = call;\n\t\texpect(settings.TaskTemplate?.ContainerSpec).not.toHaveProperty(\n\t\t\t\"StopGracePeriod\",\n\t\t);\n\t});\n\n\tit(\"passes ulimits to ContainerSpec when ulimitsSwarm is defined\", async () => {\n\t\tconst ulimits = [\n\t\t\t{ Name: \"nofile\", Soft: 10000, Hard: 20000 },\n\t\t\t{ Name: \"nproc\", Soft: 4096, Hard: 8192 },\n\t\t];\n\t\tconst application = createApplication({ ulimitsSwarm: ulimits });\n\n\t\tawait mechanizeDockerContainer(application);\n\n\t\texpect(createServiceMock).toHaveBeenCalledTimes(1);\n\t\tconst call = createServiceMock.mock.calls[0];\n\t\tif (!call) {\n\t\t\tthrow new Error(\"createServiceMock should have been called once\");\n\t\t}\n\t\tconst [settings] = call;\n\t\texpect(settings.TaskTemplate?.ContainerSpec?.Ulimits).toEqual(ulimits);\n\t});\n\n\tit(\"omits Ulimits when ulimitsSwarm is null\", async () => {\n\t\tconst application = createApplication({ ulimitsSwarm: null });\n\n\t\tawait mechanizeDockerContainer(application);\n\n\t\texpect(createServiceMock).toHaveBeenCalledTimes(1);\n\t\tconst call = createServiceMock.mock.calls[0];\n\t\tif (!call) {\n\t\t\tthrow new Error(\"createServiceMock should have been called once\");\n\t\t}\n\t\tconst [settings] = call;\n\t\texpect(settings.TaskTemplate?.ContainerSpec).not.toHaveProperty(\"Ulimits\");\n\t});\n\n\tit(\"omits Ulimits when ulimitsSwarm is an empty array\", async () => {\n\t\tconst application = createApplication({ ulimitsSwarm: [] });\n\n\t\tawait mechanizeDockerContainer(application);\n\n\t\texpect(createServiceMock).toHaveBeenCalledTimes(1);\n\t\tconst call = createServiceMock.mock.calls[0];\n\t\tif (!call) {\n\t\t\tthrow new Error(\"createServiceMock should have been called once\");\n\t\t}\n\t\tconst [settings] = call;\n\t\texpect(settings.TaskTemplate?.ContainerSpec).not.toHaveProperty(\"Ulimits\");\n\t});\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/setup.ts",
    "content": "import { vi } from \"vitest\";\n\n/**\n * Mock the DB module so tests that import from @dokploy/server (barrel)\n * never open a real TCP connection to PostgreSQL (e.g. in CI where no DB runs).\n * Without this, loading the server barrel pulls in lib/auth and db, which\n * connect to localhost:5432 and cause ECONNREFUSED.\n */\nvi.mock(\"@dokploy/server/db\", () => {\n\tconst chain = () => chain;\n\tchain.set = () => chain;\n\tchain.where = () => chain;\n\tchain.values = () => chain;\n\tchain.returning = () => Promise.resolve([{}]);\n\tchain.from = () => chain;\n\tchain.innerJoin = () => chain;\n\tchain.then = (resolve: (value: unknown) => void) => {\n\t\tresolve([]);\n\t};\n\n\tconst tableMock = {\n\t\tfindFirst: vi.fn(() => Promise.resolve(undefined)),\n\t\tfindMany: vi.fn(() => Promise.resolve([])),\n\t\tinsert: vi.fn(() => Promise.resolve([{}])),\n\t\tupdate: vi.fn(() => chain),\n\t\tdelete: vi.fn(() => chain),\n\t};\n\n\treturn {\n\t\tdb: {\n\t\t\tselect: vi.fn(() => chain),\n\t\t\tinsert: vi.fn(() => ({\n\t\t\t\tvalues: () => ({ returning: () => Promise.resolve([{}]) }),\n\t\t\t})),\n\t\t\tupdate: vi.fn(() => chain),\n\t\t\tdelete: vi.fn(() => chain),\n\t\t\tquery: new Proxy({} as Record<string, typeof tableMock>, {\n\t\t\t\tget: () => tableMock,\n\t\t\t}),\n\t\t},\n\t\tdbUrl: \"postgres://mock:mock@localhost:5432/mock\",\n\t};\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/templates/config.template.test.ts",
    "content": "import type { Schema } from \"@dokploy/server/templates\";\nimport type { CompleteTemplate } from \"@dokploy/server/templates/processors\";\nimport { processTemplate } from \"@dokploy/server/templates/processors\";\nimport { describe, expect, it } from \"vitest\";\n\ndescribe(\"processTemplate\", () => {\n\t// Mock schema for testing\n\tconst mockSchema: Schema = {\n\t\tprojectName: \"test\",\n\t\tserverIp: \"127.0.0.1\",\n\t};\n\n\tdescribe(\"variables processing\", () => {\n\t\tit(\"should process basic variables with utility functions\", () => {\n\t\t\tconst template: CompleteTemplate = {\n\t\t\t\tmetadata: {} as any,\n\t\t\t\tvariables: {\n\t\t\t\t\tmain_domain: \"${domain}\",\n\t\t\t\t\tsecret_base: \"${base64:64}\",\n\t\t\t\t\ttotp_key: \"${base64:32}\",\n\t\t\t\t\tpassword: \"${password:32}\",\n\t\t\t\t\thash: \"${hash:16}\",\n\t\t\t\t},\n\t\t\t\tconfig: {\n\t\t\t\t\tdomains: [],\n\t\t\t\t\tenv: {},\n\t\t\t\t},\n\t\t\t};\n\n\t\t\tconst result = processTemplate(template, mockSchema);\n\t\t\texpect(result.envs).toHaveLength(0);\n\t\t\texpect(result.domains).toHaveLength(0);\n\t\t\texpect(result.mounts).toHaveLength(0);\n\t\t});\n\n\t\tit(\"should allow referencing variables in other variables\", () => {\n\t\t\tconst template: CompleteTemplate = {\n\t\t\t\tmetadata: {} as any,\n\t\t\t\tvariables: {\n\t\t\t\t\tmain_domain: \"${domain}\",\n\t\t\t\t\tapi_domain: \"api.${main_domain}\",\n\t\t\t\t},\n\t\t\t\tconfig: {\n\t\t\t\t\tdomains: [],\n\t\t\t\t\tenv: {},\n\t\t\t\t},\n\t\t\t};\n\n\t\t\tconst result = processTemplate(template, mockSchema);\n\t\t\texpect(result.envs).toHaveLength(0);\n\t\t\texpect(result.domains).toHaveLength(0);\n\t\t\texpect(result.mounts).toHaveLength(0);\n\t\t});\n\n\t\tit(\"should allow creation of real jwt secret\", () => {\n\t\t\tconst template: CompleteTemplate = {\n\t\t\t\tmetadata: {} as any,\n\t\t\t\tvariables: {\n\t\t\t\t\tjwt_secret: \"cQsdycq1hDLopQonF6jUTqgQc5WEZTwWLL02J6XJ\",\n\t\t\t\t\tanon_payload: JSON.stringify({\n\t\t\t\t\t\trole: \"tester\",\n\t\t\t\t\t\tiss: \"dockploy\",\n\t\t\t\t\t\tiat: \"${timestamps:2025-01-01T00:00:00Z}\",\n\t\t\t\t\t\texp: \"${timestamps:2030-01-01T00:00:00Z}\",\n\t\t\t\t\t}),\n\t\t\t\t\tanon_key: \"${jwt:jwt_secret:anon_payload}\",\n\t\t\t\t},\n\t\t\t\tconfig: {\n\t\t\t\t\tdomains: [],\n\t\t\t\t\tenv: {\n\t\t\t\t\t\tANON_KEY: \"${anon_key}\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t};\n\t\t\tconst result = processTemplate(template, mockSchema);\n\t\t\texpect(result.envs).toHaveLength(1);\n\t\t\texpect(result.envs).toContain(\n\t\t\t\t\"ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOiIxNzM1Njg5NjAwIiwiZXhwIjoiMTg5MzQ1NjAwMCIsInJvbGUiOiJ0ZXN0ZXIiLCJpc3MiOiJkb2NrcGxveSJ9.BG5JoxL2_NaTFbPgyZdm3kRWenf_O3su_HIRKGCJ_kY\",\n\t\t\t);\n\t\t\texpect(result.mounts).toHaveLength(0);\n\t\t\texpect(result.domains).toHaveLength(0);\n\t\t});\n\t});\n\n\tdescribe(\"domains processing\", () => {\n\t\tit(\"should process domains with explicit host\", () => {\n\t\t\tconst template: CompleteTemplate = {\n\t\t\t\tmetadata: {} as any,\n\t\t\t\tvariables: {\n\t\t\t\t\tmain_domain: \"${domain}\",\n\t\t\t\t},\n\t\t\t\tconfig: {\n\t\t\t\t\tdomains: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tserviceName: \"plausible\",\n\t\t\t\t\t\t\tport: 8000,\n\t\t\t\t\t\t\thost: \"${main_domain}\",\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\tenv: {},\n\t\t\t\t},\n\t\t\t};\n\n\t\t\tconst result = processTemplate(template, mockSchema);\n\t\t\texpect(result.domains).toHaveLength(1);\n\t\t\tconst domain = result.domains[0];\n\t\t\texpect(domain).toBeDefined();\n\t\t\tif (!domain) return;\n\t\t\texpect(domain).toMatchObject({\n\t\t\t\tserviceName: \"plausible\",\n\t\t\t\tport: 8000,\n\t\t\t});\n\t\t\texpect(domain.host).toBeDefined();\n\t\t\texpect(domain.host).toContain(mockSchema.projectName);\n\t\t});\n\n\t\tit(\"should generate random domain if host is not specified\", () => {\n\t\t\tconst template: CompleteTemplate = {\n\t\t\t\tmetadata: {} as any,\n\t\t\t\tvariables: {},\n\t\t\t\tconfig: {\n\t\t\t\t\tdomains: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tserviceName: \"plausible\",\n\t\t\t\t\t\t\tport: 8000,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\tenv: {},\n\t\t\t\t},\n\t\t\t};\n\n\t\t\tconst result = processTemplate(template, mockSchema);\n\t\t\texpect(result.domains).toHaveLength(1);\n\t\t\tconst domain = result.domains[0];\n\t\t\texpect(domain).toBeDefined();\n\t\t\tif (!domain || !domain.host) return;\n\t\t\texpect(domain.host).toBeDefined();\n\t\t\texpect(domain.host).toContain(mockSchema.projectName);\n\t\t});\n\n\t\tit(\"should allow using ${domain} directly in host\", () => {\n\t\t\tconst template: CompleteTemplate = {\n\t\t\t\tmetadata: {} as any,\n\t\t\t\tvariables: {},\n\t\t\t\tconfig: {\n\t\t\t\t\tdomains: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tserviceName: \"plausible\",\n\t\t\t\t\t\t\tport: 8000,\n\t\t\t\t\t\t\thost: \"${domain}\",\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\tenv: {},\n\t\t\t\t},\n\t\t\t};\n\n\t\t\tconst result = processTemplate(template, mockSchema);\n\t\t\texpect(result.domains).toHaveLength(1);\n\t\t\tconst domain = result.domains[0];\n\t\t\texpect(domain).toBeDefined();\n\t\t\tif (!domain || !domain.host) return;\n\t\t\texpect(domain.host).toBeDefined();\n\t\t\texpect(domain.host).toContain(mockSchema.projectName);\n\t\t});\n\t});\n\n\tdescribe(\"environment variables processing\", () => {\n\t\tit(\"should process env vars with variable references\", () => {\n\t\t\tconst template: CompleteTemplate = {\n\t\t\t\tmetadata: {} as any,\n\t\t\t\tvariables: {\n\t\t\t\t\tmain_domain: \"${domain}\",\n\t\t\t\t\tsecret_base: \"${base64:64}\",\n\t\t\t\t},\n\t\t\t\tconfig: {\n\t\t\t\t\tdomains: [],\n\t\t\t\t\tenv: {\n\t\t\t\t\t\tBASE_URL: \"http://${main_domain}\",\n\t\t\t\t\t\tSECRET_KEY_BASE: \"${secret_base}\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t};\n\n\t\t\tconst result = processTemplate(template, mockSchema);\n\t\t\texpect(result.envs).toHaveLength(2);\n\t\t\tconst baseUrl = result.envs.find((env: string) =>\n\t\t\t\tenv.startsWith(\"BASE_URL=\"),\n\t\t\t);\n\t\t\tconst secretKey = result.envs.find((env: string) =>\n\t\t\t\tenv.startsWith(\"SECRET_KEY_BASE=\"),\n\t\t\t);\n\n\t\t\texpect(baseUrl).toBeDefined();\n\t\t\texpect(secretKey).toBeDefined();\n\t\t\tif (!baseUrl || !secretKey) return;\n\n\t\t\texpect(baseUrl).toContain(mockSchema.projectName);\n\t\t\tconst base64Value = secretKey.split(\"=\")[1];\n\t\t\texpect(base64Value).toBeDefined();\n\t\t\tif (!base64Value) return;\n\t\t\texpect(base64Value).toMatch(/^[A-Za-z0-9+/]+={0,2}$/);\n\t\t\texpect(base64Value.length).toBeGreaterThanOrEqual(86);\n\t\t\texpect(base64Value.length).toBeLessThanOrEqual(88);\n\t\t});\n\n\t\tit(\"should process env vars when provided as an array\", () => {\n\t\t\tconst template: CompleteTemplate = {\n\t\t\t\tmetadata: {} as any,\n\t\t\t\tvariables: {},\n\t\t\t\tconfig: {\n\t\t\t\t\tdomains: [],\n\t\t\t\t\tenv: [\n\t\t\t\t\t\t'CLOUDFLARE_TUNNEL_TOKEN=\"<INSERT TOKEN>\"',\n\t\t\t\t\t\t'ANOTHER_VAR=\"some value\"',\n\t\t\t\t\t\t\"DOMAIN=${domain}\",\n\t\t\t\t\t],\n\t\t\t\t\tmounts: [],\n\t\t\t\t},\n\t\t\t};\n\n\t\t\tconst result = processTemplate(template, mockSchema);\n\t\t\texpect(result.envs).toHaveLength(3);\n\n\t\t\t// Should preserve exact format for static values\n\t\t\texpect(result.envs[0]).toBe('CLOUDFLARE_TUNNEL_TOKEN=\"<INSERT TOKEN>\"');\n\t\t\texpect(result.envs[1]).toBe('ANOTHER_VAR=\"some value\"');\n\n\t\t\t// Should process variables in array items\n\t\t\texpect(result.envs[2]).toContain(mockSchema.projectName);\n\t\t});\n\n\t\tit(\"should allow using utility functions directly in env vars\", () => {\n\t\t\tconst template: CompleteTemplate = {\n\t\t\t\tmetadata: {} as any,\n\t\t\t\tvariables: {},\n\t\t\t\tconfig: {\n\t\t\t\t\tdomains: [],\n\t\t\t\t\tenv: {\n\t\t\t\t\t\tRANDOM_DOMAIN: \"${domain}\",\n\t\t\t\t\t\tSECRET_KEY: \"${base64:32}\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t};\n\n\t\t\tconst result = processTemplate(template, mockSchema);\n\t\t\texpect(result.envs).toHaveLength(2);\n\t\t\tconst randomDomainEnv = result.envs.find((env: string) =>\n\t\t\t\tenv.startsWith(\"RANDOM_DOMAIN=\"),\n\t\t\t);\n\t\t\tconst secretKeyEnv = result.envs.find((env: string) =>\n\t\t\t\tenv.startsWith(\"SECRET_KEY=\"),\n\t\t\t);\n\t\t\texpect(randomDomainEnv).toBeDefined();\n\t\t\texpect(secretKeyEnv).toBeDefined();\n\t\t\tif (!randomDomainEnv || !secretKeyEnv) return;\n\n\t\t\texpect(randomDomainEnv).toContain(mockSchema.projectName);\n\t\t\tconst base64Value = secretKeyEnv.split(\"=\")[1];\n\t\t\texpect(base64Value).toBeDefined();\n\t\t\tif (!base64Value) return;\n\t\t\texpect(base64Value).toMatch(/^[A-Za-z0-9+/]+={0,2}$/);\n\t\t\texpect(base64Value.length).toBeGreaterThanOrEqual(42);\n\t\t\texpect(base64Value.length).toBeLessThanOrEqual(44);\n\t\t});\n\n\t\tit(\"should handle boolean values in env vars when provided as an array\", () => {\n\t\t\tconst template: CompleteTemplate = {\n\t\t\t\tmetadata: {} as any,\n\t\t\t\tvariables: {},\n\t\t\t\tconfig: {\n\t\t\t\t\tdomains: [],\n\t\t\t\t\tenv: [\n\t\t\t\t\t\t\"ENABLE_USER_SIGN_UP=false\",\n\t\t\t\t\t\t\"DEBUG_MODE=true\",\n\t\t\t\t\t\t\"SOME_NUMBER=42\",\n\t\t\t\t\t],\n\t\t\t\t\tmounts: [],\n\t\t\t\t},\n\t\t\t};\n\n\t\t\tconst result = processTemplate(template, mockSchema);\n\t\t\texpect(result.envs).toHaveLength(3);\n\t\t\texpect(result.envs).toContain(\"ENABLE_USER_SIGN_UP=false\");\n\t\t\texpect(result.envs).toContain(\"DEBUG_MODE=true\");\n\t\t\texpect(result.envs).toContain(\"SOME_NUMBER=42\");\n\t\t});\n\n\t\tit(\"should handle boolean values in env vars when provided as an object\", () => {\n\t\t\tconst template: CompleteTemplate = {\n\t\t\t\tmetadata: {} as any,\n\t\t\t\tvariables: {},\n\t\t\t\tconfig: {\n\t\t\t\t\tdomains: [],\n\t\t\t\t\tenv: {\n\t\t\t\t\t\tENABLE_USER_SIGN_UP: false,\n\t\t\t\t\t\tDEBUG_MODE: true,\n\t\t\t\t\t\tSOME_NUMBER: 42,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t};\n\n\t\t\tconst result = processTemplate(template, mockSchema);\n\t\t\texpect(result.envs).toHaveLength(3);\n\t\t\texpect(result.envs).toContain(\"ENABLE_USER_SIGN_UP=false\");\n\t\t\texpect(result.envs).toContain(\"DEBUG_MODE=true\");\n\t\t\texpect(result.envs).toContain(\"SOME_NUMBER=42\");\n\t\t});\n\t});\n\n\tdescribe(\"mounts processing\", () => {\n\t\tit(\"should process mounts with variable references\", () => {\n\t\t\tconst template: CompleteTemplate = {\n\t\t\t\tmetadata: {} as any,\n\t\t\t\tvariables: {\n\t\t\t\t\tconfig_path: \"/etc/config\",\n\t\t\t\t\tsecret_key: \"${base64:32}\",\n\t\t\t\t},\n\t\t\t\tconfig: {\n\t\t\t\t\tdomains: [],\n\t\t\t\t\tenv: {},\n\t\t\t\t\tmounts: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfilePath: \"${config_path}/config.xml\",\n\t\t\t\t\t\t\tcontent: \"secret_key=${secret_key}\",\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t};\n\n\t\t\tconst result = processTemplate(template, mockSchema);\n\t\t\texpect(result.mounts).toHaveLength(1);\n\t\t\tconst mount = result.mounts[0];\n\t\t\texpect(mount).toBeDefined();\n\t\t\tif (!mount) return;\n\t\t\texpect(mount.filePath).toContain(\"/etc/config\");\n\t\t\texpect(mount.content).toMatch(/secret_key=[A-Za-z0-9+/]{32}/);\n\t\t});\n\n\t\tit(\"should allow using utility functions directly in mount content\", () => {\n\t\t\tconst template: CompleteTemplate = {\n\t\t\t\tmetadata: {} as any,\n\t\t\t\tvariables: {},\n\t\t\t\tconfig: {\n\t\t\t\t\tdomains: [],\n\t\t\t\t\tenv: {},\n\t\t\t\t\tmounts: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfilePath: \"/config/secrets.txt\",\n\t\t\t\t\t\t\tcontent: \"random_domain=${domain}\\nsecret=${base64:32}\",\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t};\n\n\t\t\tconst result = processTemplate(template, mockSchema);\n\t\t\texpect(result.mounts).toHaveLength(1);\n\t\t\tconst mount = result.mounts[0];\n\t\t\texpect(mount).toBeDefined();\n\t\t\tif (!mount) return;\n\t\t\texpect(mount.content).toContain(mockSchema.projectName);\n\t\t\texpect(mount.content).toMatch(/secret=[A-Za-z0-9+/]{32}/);\n\t\t});\n\t});\n\n\tdescribe(\"complex template processing\", () => {\n\t\tit(\"should process a complete template with all features\", () => {\n\t\t\tconst template: CompleteTemplate = {\n\t\t\t\tmetadata: {} as any,\n\t\t\t\tvariables: {\n\t\t\t\t\tmain_domain: \"${domain}\",\n\t\t\t\t\tsecret_base: \"${base64:64}\",\n\t\t\t\t\ttotp_key: \"${base64:32}\",\n\t\t\t\t},\n\t\t\t\tconfig: {\n\t\t\t\t\tdomains: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tserviceName: \"plausible\",\n\t\t\t\t\t\t\tport: 8000,\n\t\t\t\t\t\t\thost: \"${main_domain}\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tserviceName: \"api\",\n\t\t\t\t\t\t\tport: 3000,\n\t\t\t\t\t\t\thost: \"api.${main_domain}\",\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\tenv: {\n\t\t\t\t\t\tBASE_URL: \"http://${main_domain}\",\n\t\t\t\t\t\tSECRET_KEY_BASE: \"${secret_base}\",\n\t\t\t\t\t\tTOTP_VAULT_KEY: \"${totp_key}\",\n\t\t\t\t\t},\n\t\t\t\t\tmounts: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfilePath: \"/config/app.conf\",\n\t\t\t\t\t\t\tcontent: `\n                domain=\\${main_domain}\n                secret=\\${secret_base}\n                totp=\\${totp_key}\n              `,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t};\n\n\t\t\tconst result = processTemplate(template, mockSchema);\n\n\t\t\t// Check domains\n\t\t\texpect(result.domains).toHaveLength(2);\n\t\t\tconst [domain1, domain2] = result.domains;\n\t\t\texpect(domain1).toBeDefined();\n\t\t\texpect(domain2).toBeDefined();\n\t\t\tif (!domain1 || !domain2) return;\n\t\t\texpect(domain1.host).toBeDefined();\n\t\t\texpect(domain1.host).toContain(mockSchema.projectName);\n\t\t\texpect(domain2.host).toContain(\"api.\");\n\t\t\texpect(domain2.host).toContain(mockSchema.projectName);\n\n\t\t\t// Check env vars\n\t\t\texpect(result.envs).toHaveLength(3);\n\t\t\tconst baseUrl = result.envs.find((env: string) =>\n\t\t\t\tenv.startsWith(\"BASE_URL=\"),\n\t\t\t);\n\t\t\tconst secretKey = result.envs.find((env: string) =>\n\t\t\t\tenv.startsWith(\"SECRET_KEY_BASE=\"),\n\t\t\t);\n\t\t\tconst totpKey = result.envs.find((env: string) =>\n\t\t\t\tenv.startsWith(\"TOTP_VAULT_KEY=\"),\n\t\t\t);\n\n\t\t\texpect(baseUrl).toBeDefined();\n\t\t\texpect(secretKey).toBeDefined();\n\t\t\texpect(totpKey).toBeDefined();\n\t\t\tif (!baseUrl || !secretKey || !totpKey) return;\n\n\t\t\texpect(baseUrl).toContain(mockSchema.projectName);\n\n\t\t\t// Check base64 lengths and format\n\t\t\tconst secretKeyValue = secretKey.split(\"=\")[1];\n\t\t\tconst totpKeyValue = totpKey.split(\"=\")[1];\n\n\t\t\texpect(secretKeyValue).toBeDefined();\n\t\t\texpect(totpKeyValue).toBeDefined();\n\t\t\tif (!secretKeyValue || !totpKeyValue) return;\n\n\t\t\texpect(secretKeyValue).toMatch(/^[A-Za-z0-9+/]+={0,2}$/);\n\t\t\texpect(secretKeyValue.length).toBeGreaterThanOrEqual(86);\n\t\t\texpect(secretKeyValue.length).toBeLessThanOrEqual(88);\n\n\t\t\texpect(totpKeyValue).toMatch(/^[A-Za-z0-9+/]+={0,2}$/);\n\t\t\texpect(totpKeyValue.length).toBeGreaterThanOrEqual(42);\n\t\t\texpect(totpKeyValue.length).toBeLessThanOrEqual(44);\n\n\t\t\t// Check mounts\n\t\t\texpect(result.mounts).toHaveLength(1);\n\t\t\tconst mount = result.mounts[0];\n\t\t\texpect(mount).toBeDefined();\n\t\t\tif (!mount) return;\n\t\t\texpect(mount.content).toContain(mockSchema.projectName);\n\t\t\texpect(mount.content).toMatch(/secret=[A-Za-z0-9+/]{86,88}/);\n\t\t\texpect(mount.content).toMatch(/totp=[A-Za-z0-9+/]{42,44}/);\n\t\t});\n\t});\n\n\tdescribe(\"Should populate envs, domains and mounts in the case we didn't used any variable\", () => {\n\t\tit(\"should populate envs, domains and mounts in the case we didn't used any variable\", () => {\n\t\t\tconst template: CompleteTemplate = {\n\t\t\t\tmetadata: {} as any,\n\t\t\t\tvariables: {},\n\t\t\t\tconfig: {\n\t\t\t\t\tdomains: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tserviceName: \"plausible\",\n\t\t\t\t\t\t\tport: 8000,\n\t\t\t\t\t\t\thost: \"${hash}\",\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\tenv: {\n\t\t\t\t\t\tBASE_URL: \"http://${domain}\",\n\t\t\t\t\t\tSECRET_KEY_BASE: \"${password:32}\",\n\t\t\t\t\t\tTOTP_VAULT_KEY: \"${base64:128}\",\n\t\t\t\t\t},\n\t\t\t\t\tmounts: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfilePath: \"/config/secrets.txt\",\n\t\t\t\t\t\t\tcontent: \"random_domain=${domain}\\nsecret=${password:32}\",\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t};\n\n\t\t\tconst result = processTemplate(template, mockSchema);\n\t\t\texpect(result.envs).toHaveLength(3);\n\t\t\texpect(result.domains).toHaveLength(1);\n\t\t\texpect(result.mounts).toHaveLength(1);\n\t\t});\n\t});\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/templates/helpers.template.test.ts",
    "content": "import type { Schema } from \"@dokploy/server/templates\";\nimport { processValue } from \"@dokploy/server/templates/processors\";\nimport { describe, expect, it } from \"vitest\";\n\ndescribe(\"helpers functions\", () => {\n\t// Mock schema for testing\n\tconst mockSchema: Schema = {\n\t\tprojectName: \"test\",\n\t\tserverIp: \"127.0.0.1\",\n\t};\n\t// some helpers to test jwt\n\ttype JWTParts = [string, string, string];\n\tconst jwtMatchExp = /^[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]+$/;\n\tconst jwtBase64Decode = (str: string) => {\n\t\tconst base64 = str.replace(/-/g, \"+\").replace(/_/g, \"/\");\n\t\tconst padding = \"=\".repeat((4 - (base64.length % 4)) % 4);\n\t\tconst decoded = Buffer.from(base64 + padding, \"base64\").toString(\"utf-8\");\n\t\treturn JSON.parse(decoded);\n\t};\n\tconst jwtCheckHeader = (jwtHeader: string) => {\n\t\tconst decodedHeader = jwtBase64Decode(jwtHeader);\n\t\texpect(decodedHeader).toHaveProperty(\"alg\");\n\t\texpect(decodedHeader).toHaveProperty(\"typ\");\n\t\texpect(decodedHeader.alg).toEqual(\"HS256\");\n\t\texpect(decodedHeader.typ).toEqual(\"JWT\");\n\t};\n\n\tdescribe(\"${domain}\", () => {\n\t\tit(\"should generate a random domain\", () => {\n\t\t\tconst domain = processValue(\"${domain}\", {}, mockSchema);\n\t\t\texpect(domain.startsWith(`${mockSchema.projectName}-`)).toBeTruthy();\n\t\t\texpect(\n\t\t\t\tdomain.endsWith(\n\t\t\t\t\t`${mockSchema.serverIp.replaceAll(\".\", \"-\")}.traefik.me`,\n\t\t\t\t),\n\t\t\t).toBeTruthy();\n\t\t});\n\t});\n\n\tdescribe(\"${base64}\", () => {\n\t\tit(\"should generate a base64 string\", () => {\n\t\t\tconst base64 = processValue(\"${base64}\", {}, mockSchema);\n\t\t\texpect(base64).toMatch(/^[A-Za-z0-9+=/]+={0,2}$/);\n\t\t});\n\t\tit.each([\n\t\t\t[4, 8],\n\t\t\t[8, 12],\n\t\t\t[16, 24],\n\t\t\t[32, 44],\n\t\t\t[64, 88],\n\t\t\t[128, 172],\n\t\t])(\n\t\t\t\"should generate a base64 string from parameter %d bytes length\",\n\t\t\t(length, finalLength) => {\n\t\t\t\tconst base64 = processValue(`\\${base64:${length}}`, {}, mockSchema);\n\t\t\t\texpect(base64).toMatch(/^[A-Za-z0-9+=/]+={0,2}$/);\n\t\t\t\texpect(base64.length).toBe(finalLength);\n\t\t\t},\n\t\t);\n\t});\n\n\tdescribe(\"${password}\", () => {\n\t\tit(\"should generate a password string\", () => {\n\t\t\tconst password = processValue(\"${password}\", {}, mockSchema);\n\t\t\texpect(password).toMatch(/^[A-Za-z0-9]+$/);\n\t\t});\n\t\tit.each([6, 8, 12, 16, 32])(\n\t\t\t\"should generate a password string respecting parameter %d length\",\n\t\t\t(length) => {\n\t\t\t\tconst password = processValue(`\\${password:${length}}`, {}, mockSchema);\n\t\t\t\texpect(password).toMatch(/^[A-Za-z0-9]+$/);\n\t\t\t\texpect(password.length).toBe(length);\n\t\t\t},\n\t\t);\n\t});\n\n\tdescribe(\"${hash}\", () => {\n\t\tit(\"should generate a hash string\", () => {\n\t\t\tconst hash = processValue(\"${hash}\", {}, mockSchema);\n\t\t\texpect(hash).toMatch(/^[A-Za-z0-9]+$/);\n\t\t});\n\t\tit.each([6, 8, 12, 16, 32])(\n\t\t\t\"should generate a hash string respecting parameter %d length\",\n\t\t\t(length) => {\n\t\t\t\tconst hash = processValue(`\\${hash:${length}}`, {}, mockSchema);\n\t\t\t\texpect(hash).toMatch(/^[A-Za-z0-9]+$/);\n\t\t\t\texpect(hash.length).toBe(length);\n\t\t\t},\n\t\t);\n\t});\n\n\tdescribe(\"${uuid}\", () => {\n\t\tit(\"should generate a UUID string\", () => {\n\t\t\tconst uuid = processValue(\"${uuid}\", {}, mockSchema);\n\t\t\texpect(uuid).toMatch(\n\t\t\t\t/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/,\n\t\t\t);\n\t\t});\n\t});\n\n\tdescribe(\"${timestamp}\", () => {\n\t\tit(\"should generate a timestamp string in milliseconds\", () => {\n\t\t\tconst timestamp = processValue(\"${timestamp}\", {}, mockSchema);\n\t\t\tconst nowLength = Math.floor(Date.now()).toString().length;\n\t\t\texpect(timestamp).toMatch(/^\\d+$/);\n\t\t\texpect(timestamp.length).toBe(nowLength);\n\t\t});\n\t});\n\tdescribe(\"${timestampms}\", () => {\n\t\tit(\"should generate a timestamp string in milliseconds\", () => {\n\t\t\tconst timestamp = processValue(\"${timestampms}\", {}, mockSchema);\n\t\t\tconst nowLength = Date.now().toString().length;\n\t\t\texpect(timestamp).toMatch(/^\\d+$/);\n\t\t\texpect(timestamp.length).toBe(nowLength);\n\t\t});\n\t\tit(\"should generate a timestamp string in milliseconds from parameter\", () => {\n\t\t\tconst timestamp = processValue(\n\t\t\t\t\"${timestampms:2025-01-01}\",\n\t\t\t\t{},\n\t\t\t\tmockSchema,\n\t\t\t);\n\t\t\texpect(timestamp).toEqual(\"1735689600000\");\n\t\t});\n\t});\n\tdescribe(\"${timestamps}\", () => {\n\t\tit(\"should generate a timestamp string in seconds\", () => {\n\t\t\tconst timestamps = processValue(\"${timestamps}\", {}, mockSchema);\n\t\t\tconst nowLength = Math.floor(Date.now() / 1000).toString().length;\n\t\t\texpect(timestamps).toMatch(/^\\d+$/);\n\t\t\texpect(timestamps.length).toBe(nowLength);\n\t\t});\n\t\tit(\"should generate a timestamp string in seconds from parameter\", () => {\n\t\t\tconst timestamps = processValue(\n\t\t\t\t\"${timestamps:2025-01-01}\",\n\t\t\t\t{},\n\t\t\t\tmockSchema,\n\t\t\t);\n\t\t\texpect(timestamps).toEqual(\"1735689600\");\n\t\t});\n\t});\n\n\tdescribe(\"${randomPort}\", () => {\n\t\tit(\"should generate a random port string\", () => {\n\t\t\tconst randomPort = processValue(\"${randomPort}\", {}, mockSchema);\n\t\t\texpect(randomPort).toMatch(/^\\d+$/);\n\t\t\texpect(Number(randomPort)).toBeLessThan(65536);\n\t\t});\n\t});\n\n\tdescribe(\"${username}\", () => {\n\t\tit(\"should generate a username string\", () => {\n\t\t\tconst username = processValue(\"${username}\", {}, mockSchema);\n\t\t\texpect(username).toMatch(/^[a-zA-Z0-9._-]{3,}$/);\n\t\t});\n\t});\n\n\tdescribe(\"${email}\", () => {\n\t\tit(\"should generate an email string\", () => {\n\t\t\tconst email = processValue(\"${email}\", {}, mockSchema);\n\t\t\texpect(email).toMatch(/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$/);\n\t\t});\n\t});\n\n\tdescribe(\"Empty string variables\", () => {\n\t\tit(\"should replace variables with empty string values correctly\", () => {\n\t\t\tconst variables = {\n\t\t\t\tsmtp_username: \"\",\n\t\t\t\tsmtp_password: \"\",\n\t\t\t\tnon_empty: \"value\",\n\t\t\t};\n\n\t\t\tconst result1 = processValue(\"${smtp_username}\", variables, mockSchema);\n\t\t\texpect(result1).toBe(\"\");\n\n\t\t\tconst result2 = processValue(\"${smtp_password}\", variables, mockSchema);\n\t\t\texpect(result2).toBe(\"\");\n\n\t\t\tconst result3 = processValue(\"${non_empty}\", variables, mockSchema);\n\t\t\texpect(result3).toBe(\"value\");\n\t\t});\n\n\t\tit(\"should not replace undefined variables\", () => {\n\t\t\tconst variables = {\n\t\t\t\tdefined_var: \"\",\n\t\t\t};\n\n\t\t\tconst result = processValue(\"${undefined_var}\", variables, mockSchema);\n\t\t\texpect(result).toBe(\"${undefined_var}\");\n\t\t});\n\n\t\tit(\"should handle mixed empty and non-empty variables in template\", () => {\n\t\t\tconst variables = {\n\t\t\t\tsmtp_address: \"smtp.example.com\",\n\t\t\t\tsmtp_port: \"2525\",\n\t\t\t\tsmtp_username: \"\",\n\t\t\t\tsmtp_password: \"\",\n\t\t\t};\n\n\t\t\tconst template =\n\t\t\t\t\"SMTP_ADDRESS=${smtp_address} SMTP_PORT=${smtp_port} SMTP_USERNAME=${smtp_username} SMTP_PASSWORD=${smtp_password}\";\n\t\t\tconst result = processValue(template, variables, mockSchema);\n\t\t\texpect(result).toBe(\n\t\t\t\t\"SMTP_ADDRESS=smtp.example.com SMTP_PORT=2525 SMTP_USERNAME= SMTP_PASSWORD=\",\n\t\t\t);\n\t\t});\n\t});\n\n\tdescribe(\"${jwt}\", () => {\n\t\tit(\"should generate a JWT string\", () => {\n\t\t\tconst jwt = processValue(\"${jwt}\", {}, mockSchema);\n\t\t\texpect(jwt).toMatch(jwtMatchExp);\n\t\t\tconst parts = jwt.split(\".\") as JWTParts;\n\t\t\tconst decodedPayload = jwtBase64Decode(parts[1]);\n\t\t\tjwtCheckHeader(parts[0]);\n\t\t\texpect(decodedPayload).toHaveProperty(\"iat\");\n\t\t\texpect(decodedPayload).toHaveProperty(\"iss\");\n\t\t\texpect(decodedPayload).toHaveProperty(\"exp\");\n\t\t\texpect(decodedPayload.iss).toEqual(\"dokploy\");\n\t\t});\n\t\tit.each([6, 8, 12, 16, 32])(\n\t\t\t\"should generate a random hex string from parameter %d byte length\",\n\t\t\t(length) => {\n\t\t\t\tconst jwt = processValue(`\\${jwt:${length}}`, {}, mockSchema);\n\t\t\t\texpect(jwt).toMatch(/^[A-Za-z0-9-_.]+$/);\n\t\t\t\texpect(jwt.length).toBeGreaterThanOrEqual(length); // bytes translated to hex can take up to 2x the length\n\t\t\t\texpect(jwt.length).toBeLessThanOrEqual(length * 2);\n\t\t\t},\n\t\t);\n\t});\n\tdescribe(\"${jwt:secret}\", () => {\n\t\tit(\"should generate a JWT string respecting parameter secret from variable\", () => {\n\t\t\tconst jwt = processValue(\n\t\t\t\t\"${jwt:secret}\",\n\t\t\t\t{ secret: \"mysecret\" },\n\t\t\t\tmockSchema,\n\t\t\t);\n\t\t\texpect(jwt).toMatch(jwtMatchExp);\n\t\t\tconst parts = jwt.split(\".\") as JWTParts;\n\t\t\tconst decodedPayload = jwtBase64Decode(parts[1]);\n\t\t\tjwtCheckHeader(parts[0]);\n\t\t\texpect(decodedPayload).toHaveProperty(\"iat\");\n\t\t\texpect(decodedPayload).toHaveProperty(\"iss\");\n\t\t\texpect(decodedPayload).toHaveProperty(\"exp\");\n\t\t\texpect(decodedPayload.iss).toEqual(\"dokploy\");\n\t\t});\n\t});\n\tdescribe(\"${jwt:secret:payload}\", () => {\n\t\tit(\"should generate a JWT string respecting parameters secret and payload from variables\", () => {\n\t\t\tconst iat = Math.floor(new Date(\"2025-01-01T00:00:00Z\").getTime() / 1000);\n\t\t\tconst expiry = iat + 3600;\n\t\t\tconst jwt = processValue(\n\t\t\t\t\"${jwt:secret:payload}\",\n\t\t\t\t{\n\t\t\t\t\tsecret: \"mysecret\",\n\t\t\t\t\tpayload: `{\"iss\": \"test-issuer\", \"iat\": ${iat}, \"exp\": ${expiry}, \"customprop\": \"customvalue\"}`,\n\t\t\t\t},\n\t\t\t\tmockSchema,\n\t\t\t);\n\t\t\texpect(jwt).toMatch(jwtMatchExp);\n\t\t\tconst parts = jwt.split(\".\") as JWTParts;\n\t\t\tjwtCheckHeader(parts[0]);\n\t\t\tconst decodedPayload = jwtBase64Decode(parts[1]);\n\t\t\texpect(decodedPayload).toHaveProperty(\"iat\");\n\t\t\texpect(decodedPayload.iat).toEqual(iat);\n\t\t\texpect(decodedPayload).toHaveProperty(\"iss\");\n\t\t\texpect(decodedPayload.iss).toEqual(\"test-issuer\");\n\t\t\texpect(decodedPayload).toHaveProperty(\"exp\");\n\t\t\texpect(decodedPayload.exp).toEqual(expiry);\n\t\t\texpect(decodedPayload).toHaveProperty(\"customprop\");\n\t\t\texpect(decodedPayload.customprop).toEqual(\"customvalue\");\n\t\t\texpect(jwt).toEqual(\n\t\t\t\t\"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3MzU2ODk2MDAsImV4cCI6MTczNTY5MzIwMCwiaXNzIjoidGVzdC1pc3N1ZXIiLCJjdXN0b21wcm9wIjoiY3VzdG9tdmFsdWUifQ.m42U7PZSUSCf7gBOJrxJir0rQmyPq4rA59Dydr_QahI\",\n\t\t\t);\n\t\t});\n\n\t\tit(\"should handle JWT payload with newlines and whitespace by trimming them\", () => {\n\t\t\tconst iat = Math.floor(new Date(\"2025-01-01T00:00:00Z\").getTime() / 1000);\n\t\t\tconst expiry = iat + 3600;\n\t\t\tconst payloadWithNewlines = `{\n  \"role\": \"anon\",\n  \"iss\": \"supabase\",\n  \"exp\": ${expiry}\n}\n`;\n\t\t\tconst jwt = processValue(\n\t\t\t\t\"${jwt:secret:payload}\",\n\t\t\t\t{\n\t\t\t\t\tsecret: \"mysecret\",\n\t\t\t\t\tpayload: payloadWithNewlines,\n\t\t\t\t},\n\t\t\t\tmockSchema,\n\t\t\t);\n\t\t\texpect(jwt).toMatch(jwtMatchExp);\n\t\t\tconst parts = jwt.split(\".\") as JWTParts;\n\t\t\tjwtCheckHeader(parts[0]);\n\t\t\tconst decodedPayload = jwtBase64Decode(parts[1]);\n\t\t\texpect(decodedPayload).toHaveProperty(\"role\");\n\t\t\texpect(decodedPayload.role).toEqual(\"anon\");\n\t\t\texpect(decodedPayload).toHaveProperty(\"iss\");\n\t\t\texpect(decodedPayload.iss).toEqual(\"supabase\");\n\t\t\texpect(decodedPayload).toHaveProperty(\"exp\");\n\t\t\texpect(decodedPayload.exp).toEqual(expiry);\n\t\t});\n\n\t\tit(\"should handle JWT payload with leading and trailing whitespace\", () => {\n\t\t\tconst iat = Math.floor(new Date(\"2025-01-01T00:00:00Z\").getTime() / 1000);\n\t\t\tconst expiry = iat + 3600;\n\t\t\tconst payloadWithWhitespace = `   {\"role\": \"service_role\", \"iss\": \"supabase\", \"exp\": ${expiry}}   `;\n\t\t\tconst jwt = processValue(\n\t\t\t\t\"${jwt:secret:payload}\",\n\t\t\t\t{\n\t\t\t\t\tsecret: \"mysecret\",\n\t\t\t\t\tpayload: payloadWithWhitespace,\n\t\t\t\t},\n\t\t\t\tmockSchema,\n\t\t\t);\n\t\t\texpect(jwt).toMatch(jwtMatchExp);\n\t\t\tconst parts = jwt.split(\".\") as JWTParts;\n\t\t\tjwtCheckHeader(parts[0]);\n\t\t\tconst decodedPayload = jwtBase64Decode(parts[1]);\n\t\t\texpect(decodedPayload).toHaveProperty(\"role\");\n\t\t\texpect(decodedPayload.role).toEqual(\"service_role\");\n\t\t\texpect(decodedPayload).toHaveProperty(\"iss\");\n\t\t\texpect(decodedPayload.iss).toEqual(\"supabase\");\n\t\t\texpect(decodedPayload).toHaveProperty(\"exp\");\n\t\t\texpect(decodedPayload.exp).toEqual(expiry);\n\t\t});\n\t});\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/traefik/server/update-server-config.test.ts",
    "content": "import { fs, vol } from \"memfs\";\n\nvi.mock(\"node:fs\", () => ({\n\t...fs,\n\tdefault: fs,\n}));\n\nimport type { FileConfig } from \"@dokploy/server\";\nimport {\n\tcreateDefaultServerTraefikConfig,\n\tloadOrCreateConfig,\n\tupdateServerTraefik,\n} from \"@dokploy/server\";\nimport type { webServerSettings } from \"@dokploy/server/db/schema\";\nimport { beforeEach, expect, test, vi } from \"vitest\";\n\ntype WebServerSettings = typeof webServerSettings.$inferSelect;\n\nconst baseSettings: WebServerSettings = {\n\tid: \"\",\n\thttps: false,\n\tcertificateType: \"none\",\n\thost: null,\n\tserverIp: null,\n\tletsEncryptEmail: null,\n\tsshPrivateKey: null,\n\tenableDockerCleanup: false,\n\tlogCleanupCron: null,\n\tmetricsConfig: {\n\t\tcontainers: {\n\t\t\trefreshRate: 20,\n\t\t\tservices: {\n\t\t\t\tinclude: [],\n\t\t\t\texclude: [],\n\t\t\t},\n\t\t},\n\t\tserver: {\n\t\t\ttype: \"Dokploy\",\n\t\t\tcronJob: \"\",\n\t\t\tport: 4500,\n\t\t\trefreshRate: 20,\n\t\t\tretentionDays: 2,\n\t\t\ttoken: \"\",\n\t\t\tthresholds: {\n\t\t\t\tcpu: 0,\n\t\t\t\tmemory: 0,\n\t\t\t},\n\t\t\turlCallback: \"\",\n\t\t},\n\t},\n\twhitelabelingConfig: {\n\t\tappName: null,\n\t\tappDescription: null,\n\t\tlogoUrl: null,\n\t\tfaviconUrl: null,\n\t\tcustomCss: null,\n\t\tloginLogoUrl: null,\n\t\tsupportUrl: null,\n\t\tdocsUrl: null,\n\t\terrorPageTitle: null,\n\t\terrorPageDescription: null,\n\t\tmetaTitle: null,\n\t\tfooterText: null,\n\t},\n\tcleanupCacheApplications: false,\n\tcleanupCacheOnCompose: false,\n\tcleanupCacheOnPreviews: false,\n\tcreatedAt: null,\n\tupdatedAt: new Date(),\n};\n\nbeforeEach(() => {\n\tvol.reset();\n\tcreateDefaultServerTraefikConfig();\n});\n\ntest(\"Should read the configuration file\", () => {\n\tconst config: FileConfig = loadOrCreateConfig(\"dokploy\");\n\texpect(config.http?.routers?.[\"dokploy-router-app\"]?.service).toBe(\n\t\t\"dokploy-service-app\",\n\t);\n});\n\ntest(\"Should apply redirect-to-https\", () => {\n\tupdateServerTraefik(\n\t\t{\n\t\t\t...baseSettings,\n\t\t\thttps: true,\n\t\t\tcertificateType: \"letsencrypt\",\n\t\t},\n\t\t\"example.com\",\n\t);\n\n\tconst config: FileConfig = loadOrCreateConfig(\"dokploy\");\n\n\texpect(config.http?.routers?.[\"dokploy-router-app\"]?.middlewares).toContain(\n\t\t\"redirect-to-https\",\n\t);\n});\n\ntest(\"Should change only host when no certificate\", () => {\n\tupdateServerTraefik(baseSettings, \"example.com\");\n\n\tconst config: FileConfig = loadOrCreateConfig(\"dokploy\");\n\n\texpect(config.http?.routers?.[\"dokploy-router-app-secure\"]).toBeUndefined();\n});\n\ntest(\"Should not touch config without host\", () => {\n\tconst originalConfig: FileConfig = loadOrCreateConfig(\"dokploy\");\n\n\tupdateServerTraefik(baseSettings, null);\n\n\tconst config: FileConfig = loadOrCreateConfig(\"dokploy\");\n\n\texpect(originalConfig).toEqual(config);\n});\n\ntest(\"Should remove websecure if https rollback to http\", () => {\n\tupdateServerTraefik(\n\t\t{ ...baseSettings, certificateType: \"letsencrypt\" },\n\t\t\"example.com\",\n\t);\n\n\tupdateServerTraefik(\n\t\t{ ...baseSettings, certificateType: \"none\" },\n\t\t\"example.com\",\n\t);\n\n\tconst config: FileConfig = loadOrCreateConfig(\"dokploy\");\n\n\texpect(config.http?.routers?.[\"dokploy-router-app-secure\"]).toBeUndefined();\n\texpect(\n\t\tconfig.http?.routers?.[\"dokploy-router-app\"]?.middlewares,\n\t).not.toContain(\"redirect-to-https\");\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/traefik/traefik.test.ts",
    "content": "import type { ApplicationNested, Domain, Redirect } from \"@dokploy/server\";\nimport { createRouterConfig } from \"@dokploy/server\";\nimport { expect, test } from \"vitest\";\n\nconst baseApp: ApplicationNested = {\n\trailpackVersion: \"0.15.4\",\n\trollbackActive: false,\n\tapplicationId: \"\",\n\tpreviewLabels: [],\n\tcreateEnvFile: true,\n\tbitbucketRepositorySlug: \"\",\n\therokuVersion: \"\",\n\tgiteaRepository: \"\",\n\tgiteaOwner: \"\",\n\tgiteaBranch: \"\",\n\tbuildServerId: \"\",\n\tbuildRegistryId: \"\",\n\tbuildRegistry: null,\n\tgiteaBuildPath: \"\",\n\tgiteaId: \"\",\n\targs: [],\n\trollbackRegistryId: \"\",\n\trollbackRegistry: null,\n\tdeployments: [],\n\tcleanCache: false,\n\tapplicationStatus: \"done\",\n\tendpointSpecSwarm: null,\n\tappName: \"\",\n\tautoDeploy: true,\n\tenableSubmodules: false,\n\tpreviewRequireCollaboratorPermissions: false,\n\tserverId: \"\",\n\tbranch: null,\n\tdockerBuildStage: \"\",\n\tregistryUrl: \"\",\n\twatchPaths: [],\n\tbuildArgs: null,\n\tbuildSecrets: null,\n\tisPreviewDeploymentsActive: false,\n\tpreviewBuildArgs: null,\n\tpreviewBuildSecrets: null,\n\ttriggerType: \"push\",\n\tpreviewCertificateType: \"none\",\n\tpreviewEnv: null,\n\tpreviewHttps: false,\n\tpreviewPath: \"/\",\n\tpreviewPort: 3000,\n\tpreviewLimit: 0,\n\tpreviewCustomCertResolver: null,\n\tpreviewWildcard: \"\",\n\tenvironmentId: \"\",\n\tenvironment: {\n\t\tenv: \"\",\n\t\tisDefault: false,\n\t\tenvironmentId: \"\",\n\t\tname: \"\",\n\t\tcreatedAt: \"\",\n\t\tdescription: \"\",\n\t\tprojectId: \"\",\n\t\tproject: {\n\t\t\tenv: \"\",\n\t\t\torganizationId: \"\",\n\t\t\tname: \"\",\n\t\t\tdescription: \"\",\n\t\t\tcreatedAt: \"\",\n\t\t\tprojectId: \"\",\n\t\t},\n\t},\n\tbuildPath: \"/\",\n\tgitlabPathNamespace: \"\",\n\tbuildType: \"nixpacks\",\n\tbitbucketBranch: \"\",\n\tbitbucketBuildPath: \"\",\n\tbitbucketId: \"\",\n\tbitbucketRepository: \"\",\n\tbitbucketOwner: \"\",\n\tgithubId: \"\",\n\tgitlabProjectId: 0,\n\tgitlabBranch: \"\",\n\tgitlabBuildPath: \"\",\n\tgitlabId: \"\",\n\tgitlabRepository: \"\",\n\tgitlabOwner: \"\",\n\tcommand: null,\n\tcpuLimit: null,\n\tcpuReservation: null,\n\tcreatedAt: \"\",\n\tcustomGitBranch: \"\",\n\tcustomGitBuildPath: \"\",\n\tcustomGitSSHKeyId: null,\n\tcustomGitUrl: \"\",\n\tdescription: \"\",\n\tdockerfile: null,\n\tdockerImage: null,\n\tdropBuildPath: null,\n\tenabled: null,\n\tenv: null,\n\thealthCheckSwarm: null,\n\tlabelsSwarm: null,\n\tmemoryLimit: null,\n\tmemoryReservation: null,\n\tmodeSwarm: null,\n\tmounts: [],\n\tname: \"\",\n\tnetworkSwarm: null,\n\towner: null,\n\tpassword: null,\n\tplacementSwarm: null,\n\tports: [],\n\tpublishDirectory: null,\n\tisStaticSpa: null,\n\tredirects: [],\n\trefreshToken: \"\",\n\tregistry: null,\n\tregistryId: null,\n\treplicas: 1,\n\trepository: null,\n\trestartPolicySwarm: null,\n\trollbackConfigSwarm: null,\n\tsecurity: [],\n\tsourceType: \"git\",\n\tsubtitle: null,\n\ttitle: null,\n\tupdateConfigSwarm: null,\n\tusername: null,\n\tdockerContextPath: null,\n\tstopGracePeriodSwarm: null,\n\tulimitsSwarm: null,\n};\n\nconst baseDomain: Domain = {\n\tapplicationId: \"\",\n\tcertificateType: \"none\",\n\tcreatedAt: \"\",\n\tdomainId: \"\",\n\thost: \"\",\n\thttps: false,\n\tpath: null,\n\tport: null,\n\tserviceName: \"\",\n\tcomposeId: \"\",\n\tcustomCertResolver: null,\n\tdomainType: \"application\",\n\tuniqueConfigKey: 1,\n\tpreviewDeploymentId: \"\",\n\tinternalPath: \"/\",\n\tstripPath: false,\n};\n\nconst baseRedirect: Redirect = {\n\tredirectId: \"\",\n\tregex: \"\",\n\treplacement: \"\",\n\tpermanent: false,\n\tuniqueConfigKey: 1,\n\tcreatedAt: \"\",\n\tapplicationId: \"\",\n};\n\n/** Middlewares */\n\ntest(\"Web entrypoint on http domain\", async () => {\n\tconst router = await createRouterConfig(\n\t\tbaseApp,\n\t\t{ ...baseDomain, https: false },\n\t\t\"web\",\n\t);\n\n\texpect(router.middlewares).not.toContain(\"redirect-to-https\");\n\texpect(router.rule).not.toContain(\"PathPrefix\");\n});\n\ntest(\"Web entrypoint on http domain with custom path\", async () => {\n\tconst router = await createRouterConfig(\n\t\tbaseApp,\n\t\t{ ...baseDomain, path: \"/foo\", https: false },\n\t\t\"web\",\n\t);\n\n\texpect(router.rule).toContain(\"PathPrefix(`/foo`)\");\n});\n\ntest(\"Web entrypoint on http domain with redirect\", async () => {\n\tconst router = await createRouterConfig(\n\t\t{\n\t\t\t...baseApp,\n\t\t\tappName: \"test\",\n\t\t\tredirects: [{ ...baseRedirect, uniqueConfigKey: 1 }],\n\t\t},\n\t\t{ ...baseDomain, https: false },\n\t\t\"web\",\n\t);\n\n\texpect(router.middlewares).not.toContain(\"redirect-to-https\");\n\texpect(router.middlewares).toContain(\"redirect-test-1\");\n});\n\ntest(\"Web entrypoint on http domain with multiple redirect\", async () => {\n\tconst router = await createRouterConfig(\n\t\t{\n\t\t\t...baseApp,\n\t\t\tappName: \"test\",\n\t\t\tredirects: [\n\t\t\t\t{ ...baseRedirect, uniqueConfigKey: 1 },\n\t\t\t\t{ ...baseRedirect, uniqueConfigKey: 2 },\n\t\t\t],\n\t\t},\n\t\t{ ...baseDomain, https: false },\n\t\t\"web\",\n\t);\n\n\texpect(router.middlewares).not.toContain(\"redirect-to-https\");\n\texpect(router.middlewares).toContain(\"redirect-test-1\");\n\texpect(router.middlewares).toContain(\"redirect-test-2\");\n});\n\ntest(\"Web entrypoint on https domain\", async () => {\n\tconst router = await createRouterConfig(\n\t\tbaseApp,\n\t\t{ ...baseDomain, https: true },\n\t\t\"web\",\n\t);\n\n\texpect(router.middlewares).toContain(\"redirect-to-https\");\n});\n\ntest(\"Web entrypoint on https domain with redirect\", async () => {\n\tconst router = await createRouterConfig(\n\t\t{\n\t\t\t...baseApp,\n\t\t\tappName: \"test\",\n\t\t\tredirects: [{ ...baseRedirect, uniqueConfigKey: 1 }],\n\t\t},\n\t\t{ ...baseDomain, https: true },\n\t\t\"web\",\n\t);\n\n\texpect(router.middlewares).toContain(\"redirect-to-https\");\n\texpect(router.middlewares).not.toContain(\"redirect-test-1\");\n});\n\ntest(\"Websecure entrypoint on https domain\", async () => {\n\tconst router = await createRouterConfig(\n\t\tbaseApp,\n\t\t{ ...baseDomain, https: true },\n\t\t\"websecure\",\n\t);\n\n\texpect(router.middlewares).not.toContain(\"redirect-to-https\");\n});\n\ntest(\"Websecure entrypoint on https domain with redirect\", async () => {\n\tconst router = await createRouterConfig(\n\t\t{\n\t\t\t...baseApp,\n\t\t\tappName: \"test\",\n\t\t\tredirects: [{ ...baseRedirect, uniqueConfigKey: 1 }],\n\t\t},\n\t\t{ ...baseDomain, https: true },\n\t\t\"websecure\",\n\t);\n\n\texpect(router.middlewares).not.toContain(\"redirect-to-https\");\n\texpect(router.middlewares).toContain(\"redirect-test-1\");\n});\n\n/** Certificates */\n\ntest(\"CertificateType on websecure entrypoint\", async () => {\n\tconst router = await createRouterConfig(\n\t\tbaseApp,\n\t\t{ ...baseDomain, certificateType: \"letsencrypt\" },\n\t\t\"websecure\",\n\t);\n\n\texpect(router.tls?.certResolver).toBe(\"letsencrypt\");\n});\n\n/** IDN/Punycode */\n\ntest(\"Internationalized domain name is converted to punycode\", async () => {\n\tconst router = await createRouterConfig(\n\t\tbaseApp,\n\t\t{ ...baseDomain, host: \"тест.рф\" },\n\t\t\"web\",\n\t);\n\n\t// тест.рф in punycode is xn--e1aybc.xn--p1ai\n\texpect(router.rule).toContain(\"Host(`xn--e1aybc.xn--p1ai`)\");\n\texpect(router.rule).not.toContain(\"тест.рф\");\n});\n\ntest(\"ASCII domain remains unchanged\", async () => {\n\tconst router = await createRouterConfig(\n\t\tbaseApp,\n\t\t{ ...baseDomain, host: \"example.com\" },\n\t\t\"web\",\n\t);\n\n\texpect(router.rule).toContain(\"Host(`example.com`)\");\n});\n\ntest(\"Russian Cyrillic label with .ru TLD is converted to punycode\", async () => {\n\tconst router = await createRouterConfig(\n\t\tbaseApp,\n\t\t{ ...baseDomain, host: \"сайт.ru\" },\n\t\t\"web\",\n\t);\n\n\t// сайт in punycode is xn--80aswg\n\texpect(router.rule).toContain(\"Host(`xn--80aswg.ru`)\");\n\texpect(router.rule).not.toContain(\"сайт\");\n});\n\ntest(\"Subdomain with Russian IDN TLD converts non-ASCII part to punycode\", async () => {\n\tconst router = await createRouterConfig(\n\t\tbaseApp,\n\t\t{ ...baseDomain, host: \"app.тест.рф\" },\n\t\t\"web\",\n\t);\n\n\t// app stays ASCII, тест.рф becomes xn--e1aybc.xn--p1ai\n\texpect(router.rule).toContain(\"Host(`app.xn--e1aybc.xn--p1ai`)\");\n\texpect(router.rule).not.toContain(\"тест.рф\");\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/utils/backups.test.ts",
    "content": "import { normalizeS3Path } from \"@dokploy/server/utils/backups/utils\";\nimport { describe, expect, test } from \"vitest\";\n\ndescribe(\"normalizeS3Path\", () => {\n\ttest(\"should handle empty and whitespace-only prefix\", () => {\n\t\texpect(normalizeS3Path(\"\")).toBe(\"\");\n\t\texpect(normalizeS3Path(\"/\")).toBe(\"\");\n\t\texpect(normalizeS3Path(\"  \")).toBe(\"\");\n\t\texpect(normalizeS3Path(\"\\t\")).toBe(\"\");\n\t\texpect(normalizeS3Path(\"\\n\")).toBe(\"\");\n\t\texpect(normalizeS3Path(\" \\n \\t \")).toBe(\"\");\n\t});\n\n\ttest(\"should trim whitespace from prefix\", () => {\n\t\texpect(normalizeS3Path(\" prefix\")).toBe(\"prefix/\");\n\t\texpect(normalizeS3Path(\"prefix \")).toBe(\"prefix/\");\n\t\texpect(normalizeS3Path(\" prefix \")).toBe(\"prefix/\");\n\t\texpect(normalizeS3Path(\"\\tprefix\\t\")).toBe(\"prefix/\");\n\t\texpect(normalizeS3Path(\" prefix/nested \")).toBe(\"prefix/nested/\");\n\t});\n\n\ttest(\"should remove leading slashes\", () => {\n\t\texpect(normalizeS3Path(\"/prefix\")).toBe(\"prefix/\");\n\t\texpect(normalizeS3Path(\"///prefix\")).toBe(\"prefix/\");\n\t});\n\n\ttest(\"should remove trailing slashes\", () => {\n\t\texpect(normalizeS3Path(\"prefix/\")).toBe(\"prefix/\");\n\t\texpect(normalizeS3Path(\"prefix///\")).toBe(\"prefix/\");\n\t});\n\n\ttest(\"should remove both leading and trailing slashes\", () => {\n\t\texpect(normalizeS3Path(\"/prefix/\")).toBe(\"prefix/\");\n\t\texpect(normalizeS3Path(\"///prefix///\")).toBe(\"prefix/\");\n\t});\n\n\ttest(\"should handle nested paths\", () => {\n\t\texpect(normalizeS3Path(\"prefix/nested\")).toBe(\"prefix/nested/\");\n\t\texpect(normalizeS3Path(\"/prefix/nested/\")).toBe(\"prefix/nested/\");\n\t\texpect(normalizeS3Path(\"///prefix/nested///\")).toBe(\"prefix/nested/\");\n\t});\n\n\ttest(\"should preserve middle slashes\", () => {\n\t\texpect(normalizeS3Path(\"prefix/nested/deep\")).toBe(\"prefix/nested/deep/\");\n\t\texpect(normalizeS3Path(\"/prefix/nested/deep/\")).toBe(\"prefix/nested/deep/\");\n\t});\n\n\ttest(\"should handle special characters\", () => {\n\t\texpect(normalizeS3Path(\"prefix-with-dashes\")).toBe(\"prefix-with-dashes/\");\n\t\texpect(normalizeS3Path(\"prefix_with_underscores\")).toBe(\n\t\t\t\"prefix_with_underscores/\",\n\t\t);\n\t\texpect(normalizeS3Path(\"prefix.with.dots\")).toBe(\"prefix.with.dots/\");\n\t});\n\n\ttest(\"should handle the cases from the bug report\", () => {\n\t\texpect(normalizeS3Path(\"instance-backups/\")).toBe(\"instance-backups/\");\n\t\texpect(normalizeS3Path(\"/instance-backups/\")).toBe(\"instance-backups/\");\n\t\texpect(normalizeS3Path(\"instance-backups\")).toBe(\"instance-backups/\");\n\t});\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/vitest.config.ts",
    "content": "import path from \"node:path\";\nimport tsconfigPaths from \"vite-tsconfig-paths\";\nimport { defineConfig } from \"vitest/config\";\n\nexport default defineConfig({\n\ttest: {\n\t\tinclude: [\"__test__/**/*.test.ts\"], // Incluir solo los archivos de test en el directorio __test__\n\t\texclude: [\"**/node_modules/**\", \"**/dist/**\", \"**/.docker/**\"],\n\t\tpool: \"forks\",\n\t\tsetupFiles: [path.resolve(__dirname, \"setup.ts\")],\n\t},\n\tdefine: {\n\t\t\"process.env\": {\n\t\t\tNODE: \"test\",\n\t\t\tGITHUB_CLIENT_ID: \"test\",\n\t\t\tGITHUB_CLIENT_SECRET: \"test\",\n\t\t\tGOOGLE_CLIENT_ID: \"test\",\n\t\t\tGOOGLE_CLIENT_SECRET: \"test\",\n\t\t},\n\t},\n\tplugins: [\n\t\ttsconfigPaths({\n\t\t\tprojects: [path.resolve(__dirname, \"../tsconfig.json\")],\n\t\t}),\n\t],\n\tresolve: {\n\t\talias: {\n\t\t\t\"@dokploy/server\": path.resolve(\n\t\t\t\t__dirname,\n\t\t\t\t\"../../../packages/server/src\",\n\t\t\t),\n\t\t},\n\t},\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/wss/readValidDirectory.test.ts",
    "content": "import path from \"node:path\";\nimport { describe, expect, it, vi } from \"vitest\";\n\nconst BASE = \"/base\";\n\nvi.mock(\"@dokploy/server/constants\", async (importOriginal) => {\n\tconst actual =\n\t\tawait importOriginal<typeof import(\"@dokploy/server/constants\")>();\n\treturn {\n\t\t...actual,\n\t\tpaths: () => ({\n\t\t\t...actual.paths(),\n\t\t\tBASE_PATH: BASE,\n\t\t\tLOGS_PATH: `${BASE}/logs`,\n\t\t\tAPPLICATIONS_PATH: `${BASE}/applications`,\n\t\t}),\n\t};\n});\n\n// Import after mock so paths() uses our BASE\nconst { readValidDirectory } = await import(\"@dokploy/server\");\n\ndescribe(\"readValidDirectory (path traversal)\", () => {\n\tit(\"returns true when directory is exactly BASE_PATH\", () => {\n\t\texpect(readValidDirectory(BASE)).toBe(true);\n\t\texpect(readValidDirectory(path.resolve(BASE))).toBe(true);\n\t});\n\n\tit(\"returns true when directory is under BASE_PATH\", () => {\n\t\texpect(readValidDirectory(`${BASE}/logs`)).toBe(true);\n\t\texpect(readValidDirectory(`${BASE}/logs/app/foo.log`)).toBe(true);\n\t\texpect(readValidDirectory(`${BASE}/applications/myapp/code`)).toBe(true);\n\t});\n\n\tit(\"returns false for path traversal escaping base (absolute)\", () => {\n\t\texpect(readValidDirectory(\"/etc/passwd\")).toBe(false);\n\t\texpect(readValidDirectory(\"/etc/cron.d/malicious\")).toBe(false);\n\t\texpect(readValidDirectory(\"/tmp/outside\")).toBe(false);\n\t});\n\n\tit(\"returns false when resolved path escapes base via ..\", () => {\n\t\t// Resolved: /etc/passwd (outside /base)\n\t\texpect(readValidDirectory(`${BASE}/../etc/passwd`)).toBe(false);\n\t\texpect(readValidDirectory(`${BASE}/logs/../../etc/passwd`)).toBe(false);\n\t\texpect(readValidDirectory(`${BASE}/..`)).toBe(false);\n\t});\n\n\tit(\"returns true when .. stays within base\", () => {\n\t\t// e.g. /base/logs/../applications -> /base/applications (still under /base)\n\t\texpect(readValidDirectory(`${BASE}/logs/../applications`)).toBe(true);\n\t\texpect(readValidDirectory(`${BASE}/foo/../bar`)).toBe(true);\n\t});\n\n\tit(\"accepts serverId for remote base path\", () => {\n\t\t// With our mock, serverId doesn't change BASE_PATH; just ensure it doesn't throw\n\t\texpect(readValidDirectory(BASE, \"server-1\")).toBe(true);\n\t\texpect(readValidDirectory(\"/etc/passwd\", \"server-1\")).toBe(false);\n\t});\n\n\tit(\"returns false for null/undefined-like paths that resolve outside\", () => {\n\t\t// Paths that might resolve to cwd or root\n\t\texpect(readValidDirectory(\".\")).toBe(false);\n\t\texpect(readValidDirectory(\"..\")).toBe(false);\n\t});\n\n\tit(\"returns true for BASE_PATH with trailing slash or double slashes under base\", () => {\n\t\texpect(readValidDirectory(`${BASE}/`)).toBe(true);\n\t\texpect(readValidDirectory(`${BASE}//logs`)).toBe(true);\n\t\texpect(readValidDirectory(`${BASE}/applications///myapp/code`)).toBe(true);\n\t});\n\n\tit(\"returns false when path looks like base but is a sibling or prefix\", () => {\n\t\texpect(readValidDirectory(\"/base-evil\")).toBe(false);\n\t\texpect(readValidDirectory(\"/bas\")).toBe(false);\n\t\texpect(readValidDirectory(`${BASE}/../base-evil`)).toBe(false);\n\t});\n\n\tit(\"returns false for empty string (resolves to cwd)\", () => {\n\t\texpect(readValidDirectory(\"\")).toBe(false);\n\t});\n});\n"
  },
  {
    "path": "apps/dokploy/__test__/wss/utils.test.ts",
    "content": "import { describe, expect, it } from \"vitest\";\nimport {\n\tisValidContainerId,\n\tisValidSearch,\n\tisValidSince,\n\tisValidTail,\n} from \"../../server/wss/utils\";\n\ndescribe(\"isValidTail (docker-container-logs)\", () => {\n\tit(\"accepts valid numeric tail values\", () => {\n\t\texpect(isValidTail(\"0\")).toBe(true);\n\t\texpect(isValidTail(\"1\")).toBe(true);\n\t\texpect(isValidTail(\"100\")).toBe(true);\n\t\texpect(isValidTail(\"10000\")).toBe(true);\n\t});\n\n\tit(\"rejects tail above 10000\", () => {\n\t\texpect(isValidTail(\"10001\")).toBe(false);\n\t\texpect(isValidTail(\"99999\")).toBe(false);\n\t});\n\n\tit(\"rejects non-numeric tail\", () => {\n\t\texpect(isValidTail(\"\")).toBe(false);\n\t\texpect(isValidTail(\"abc\")).toBe(false);\n\t\texpect(isValidTail(\"10a\")).toBe(false);\n\t\texpect(isValidTail(\"-1\")).toBe(false);\n\t});\n\n\tit(\"rejects command injection payloads in tail\", () => {\n\t\texpect(isValidTail(\"10; whoami; #\")).toBe(false);\n\t\texpect(isValidTail(\"100 | cat /etc/passwd\")).toBe(false);\n\t\texpect(isValidTail(\"$(id)\")).toBe(false);\n\t\texpect(isValidTail(\"`id`\")).toBe(false);\n\t\texpect(isValidTail(\"100\\nid\")).toBe(false);\n\t\texpect(isValidTail(\"100 && id\")).toBe(false);\n\t\texpect(isValidTail(\"100; env | grep DATABASE\")).toBe(false);\n\t});\n});\n\ndescribe(\"isValidSince (docker-container-logs)\", () => {\n\tit(\"accepts 'all'\", () => {\n\t\texpect(isValidSince(\"all\")).toBe(true);\n\t});\n\n\tit(\"accepts valid duration format (number + s|m|h|d)\", () => {\n\t\texpect(isValidSince(\"5s\")).toBe(true);\n\t\texpect(isValidSince(\"10m\")).toBe(true);\n\t\texpect(isValidSince(\"1h\")).toBe(true);\n\t\texpect(isValidSince(\"2d\")).toBe(true);\n\t\texpect(isValidSince(\"0s\")).toBe(true);\n\t\texpect(isValidSince(\"999d\")).toBe(true);\n\t});\n\n\tit(\"rejects invalid duration format\", () => {\n\t\texpect(isValidSince(\"\")).toBe(false);\n\t\texpect(isValidSince(\"5\")).toBe(false);\n\t\texpect(isValidSince(\"s\")).toBe(false);\n\t\texpect(isValidSince(\"5x\")).toBe(false);\n\t\texpect(isValidSince(\"5sec\")).toBe(false);\n\t\texpect(isValidSince(\"5 m\")).toBe(false);\n\t});\n\n\tit(\"rejects command injection payloads in since\", () => {\n\t\texpect(isValidSince(\"5s; whoami\")).toBe(false);\n\t\texpect(isValidSince(\"all; id\")).toBe(false);\n\t\texpect(isValidSince(\"1m$(id)\")).toBe(false);\n\t\texpect(isValidSince(\"1m | cat /etc/passwd\")).toBe(false);\n\t});\n});\n\ndescribe(\"isValidSearch (docker-container-logs)\", () => {\n\tit(\"accepts empty string\", () => {\n\t\texpect(isValidSearch(\"\")).toBe(true);\n\t});\n\n\tit(\"accepts only alphanumeric, space, dot, underscore, hyphen\", () => {\n\t\texpect(isValidSearch(\"error\")).toBe(true);\n\t\texpect(isValidSearch(\"foo bar\")).toBe(true);\n\t\texpect(isValidSearch(\"a-zA-Z0-9_.-\")).toBe(true);\n\t\texpect(isValidSearch(\"\")).toBe(true);\n\t});\n\n\tit(\"rejects strings longer than 500 chars\", () => {\n\t\texpect(isValidSearch(\"a\".repeat(501))).toBe(false);\n\t\texpect(isValidSearch(\"a\".repeat(500))).toBe(true);\n\t});\n\n\tit(\"rejects control characters and non-printable\", () => {\n\t\texpect(isValidSearch(\"foo\\nbar\")).toBe(false);\n\t\texpect(isValidSearch(\"foo\\rbar\")).toBe(false);\n\t\texpect(isValidSearch(\"\\x00\")).toBe(false);\n\t\texpect(isValidSearch(\"a\\x19b\")).toBe(false);\n\t});\n\n\tit(\"rejects command injection vectors in search (search is concatenated into shell)\", () => {\n\t\t// Double-quoted context (SSH line 99): $ and ` execute\n\t\texpect(isValidSearch(\"$(whoami)\")).toBe(false);\n\t\texpect(isValidSearch(\"`id`\")).toBe(false);\n\t\texpect(isValidSearch(\"$(id)\")).toBe(false);\n\t\t// Single-quoted context (local line 153): ' breaks out\n\t\texpect(isValidSearch(\"'$(whoami)'\")).toBe(false);\n\t\texpect(isValidSearch(\"error'\")).toBe(false);\n\t\texpect(isValidSearch(\"'; whoami; #\")).toBe(false);\n\t\t// Other shell-metacharacters\n\t\texpect(isValidSearch(\"error; id\")).toBe(false);\n\t\texpect(isValidSearch(\"a|b\")).toBe(false);\n\t\texpect(isValidSearch('error\"')).toBe(false);\n\t\texpect(isValidSearch(\"a&b\")).toBe(false);\n\t});\n});\n\ndescribe(\"isValidContainerId (docker-container-logs)\", () => {\n\tit(\"accepts valid hex container IDs\", () => {\n\t\texpect(isValidContainerId(\"a\".repeat(12))).toBe(true);\n\t\texpect(isValidContainerId(\"abc123def456\")).toBe(true);\n\t\texpect(isValidContainerId(\"a\".repeat(64))).toBe(true);\n\t});\n\n\tit(\"accepts valid container names\", () => {\n\t\texpect(isValidContainerId(\"my-container\")).toBe(true);\n\t\texpect(isValidContainerId(\"app_1\")).toBe(true);\n\t\texpect(isValidContainerId(\"service.name\")).toBe(true);\n\t});\n\n\tit(\"rejects command injection in container ID\", () => {\n\t\texpect(isValidContainerId(\"dummy; whoami\")).toBe(false);\n\t\texpect(isValidContainerId(\"$(id)\")).toBe(false);\n\t\texpect(isValidContainerId(\"`id`\")).toBe(false);\n\t\texpect(isValidContainerId(\"container|cat /etc/passwd\")).toBe(false);\n\t\texpect(isValidContainerId(\"x; env | grep DATABASE\")).toBe(false);\n\t});\n});\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/advanced/cluster/modify-swarm-settings.tsx",
    "content": "import { Settings } from \"lucide-react\";\nimport { useState } from \"react\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { cn } from \"@/lib/utils\";\nimport {\n\tEndpointSpecForm,\n\tHealthCheckForm,\n\tLabelsForm,\n\tModeForm,\n\tNetworkForm,\n\tPlacementForm,\n\tRestartPolicyForm,\n\tRollbackConfigForm,\n\tStopGracePeriodForm,\n\tUpdateConfigForm,\n} from \"./swarm-forms\";\n\ntype MenuItem = {\n\tid: string;\n\tlabel: string;\n\tdescription: string;\n\tdocDescription: string;\n};\n\nconst menuItems: MenuItem[] = [\n\t{\n\t\tid: \"health-check\",\n\t\tlabel: \"Health Check\",\n\t\tdescription: \"Configure health check settings\",\n\t\tdocDescription:\n\t\t\t\"Configure HEALTHCHECK to test a container's health. Determines if a container is healthy by running a command inside the container. Test, Interval, Timeout, StartPeriod, and Retries control health monitoring.\",\n\t},\n\t{\n\t\tid: \"restart-policy\",\n\t\tlabel: \"Restart Policy\",\n\t\tdescription: \"Configure restart policy\",\n\t\tdocDescription:\n\t\t\t\"Configure the restart policy for containers in the service. Condition (none, on-failure, any), Delay (nanoseconds between restarts), MaxAttempts, and Window control restart behavior.\",\n\t},\n\t{\n\t\tid: \"placement\",\n\t\tlabel: \"Placement\",\n\t\tdescription: \"Configure placement constraints\",\n\t\tdocDescription:\n\t\t\t\"Control which nodes service tasks can be scheduled on. Constraints (node.id==xyz), Preferences (spread.node.labels.zone), MaxReplicas, and Platforms specify task placement rules.\",\n\t},\n\t{\n\t\tid: \"update-config\",\n\t\tlabel: \"Update Config\",\n\t\tdescription: \"Configure update strategy\",\n\t\tdocDescription:\n\t\t\t\"Configure how the service should be updated. Parallelism (tasks updated simultaneously), Delay, FailureAction (pause, continue, rollback), Monitor, MaxFailureRatio, and Order (stop-first, start-first) control updates.\",\n\t},\n\t{\n\t\tid: \"rollback-config\",\n\t\tlabel: \"Rollback Config\",\n\t\tdescription: \"Configure rollback strategy\",\n\t\tdocDescription:\n\t\t\t\"Configure automated rollback on update failure. Uses same parameters as UpdateConfig: Parallelism, Delay, FailureAction, Monitor, MaxFailureRatio, and Order.\",\n\t},\n\t{\n\t\tid: \"mode\",\n\t\tlabel: \"Mode\",\n\t\tdescription: \"Configure service mode\",\n\t\tdocDescription:\n\t\t\t\"Set service mode to either 'Replicated' with a specified number of tasks (Replicas), or 'Global' (one task per node).\",\n\t},\n\t{\n\t\tid: \"network\",\n\t\tlabel: \"Network\",\n\t\tdescription: \"Configure network attachments\",\n\t\tdocDescription:\n\t\t\t\"Attach the service to one or more networks. Specify the network name (Target) and optional network aliases for service discovery.\",\n\t},\n\t{\n\t\tid: \"labels\",\n\t\tlabel: \"Labels\",\n\t\tdescription: \"Configure service labels\",\n\t\tdocDescription:\n\t\t\t\"Add metadata to services using labels. Labels are key-value pairs (e.g., com.example.foo=bar) for organizing and filtering services.\",\n\t},\n\t{\n\t\tid: \"stop-grace-period\",\n\t\tlabel: \"Stop Grace Period\",\n\t\tdescription: \"Configure stop grace period\",\n\t\tdocDescription:\n\t\t\t\"Time to wait before forcefully killing a container. Specified in nanoseconds (e.g., 10000000000 = 10 seconds). Allows containers to shutdown gracefully.\",\n\t},\n\t{\n\t\tid: \"endpoint-spec\",\n\t\tlabel: \"Endpoint Spec\",\n\t\tdescription: \"Configure endpoint specification\",\n\t\tdocDescription:\n\t\t\t\"Configure endpoint mode for service discovery. Mode 'vip' (virtual IP - default) uses a single virtual IP. Mode 'dnsrr' (DNS round-robin) returns DNS entries for all tasks.\",\n\t},\n];\n\nconst hasStopGracePeriodSwarm = (\n\tvalue: unknown,\n): value is { stopGracePeriodSwarm: bigint | number | string | null } =>\n\ttypeof value === \"object\" &&\n\tvalue !== null &&\n\t\"stopGracePeriodSwarm\" in value;\n\ninterface Props {\n\tid: string;\n\ttype: \"postgres\" | \"mariadb\" | \"mongo\" | \"mysql\" | \"redis\" | \"application\";\n}\n\nexport const AddSwarmSettings = ({ id, type }: Props) => {\n\tconst [activeMenu, setActiveMenu] = useState<string>(\"health-check\");\n\tconst [open, setOpen] = useState(false);\n\treturn (\n\t\t<Dialog open={open} onOpenChange={setOpen}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t<Button variant=\"secondary\" className=\"cursor-pointer w-fit\">\n\t\t\t\t\t<Settings className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\tSwarm Settings\n\t\t\t\t</Button>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-6xl max-h-[85vh]\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Swarm Settings</DialogTitle>\n\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\tConfigure swarm settings for your service.\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t<div>\n\t\t\t\t\t<AlertBlock type=\"info\">\n\t\t\t\t\t\tChanging settings such as placements may cause the logs/monitoring,\n\t\t\t\t\t\tbackups and other features to be unavailable.\n\t\t\t\t\t</AlertBlock>\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"flex gap-4 h-[60vh] py-4\">\n\t\t\t\t\t{/* Left Column - Menu */}\n\t\t\t\t\t<div className=\"w-64 flex-shrink-0 border-r pr-4 overflow-y-auto\">\n\t\t\t\t\t\t<nav className=\"space-y-1\">\n\t\t\t\t\t\t\t<TooltipProvider>\n\t\t\t\t\t\t\t\t{menuItems.map((item) => (\n\t\t\t\t\t\t\t\t\t<Tooltip key={item.id}>\n\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => setActiveMenu(item.id)}\n\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"w-full text-left px-3 py-2 rounded-md text-sm transition-colors\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tactiveMenu === item.id\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"bg-primary text-primary-foreground\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"hover:bg-muted\",\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"font-medium\">{item.label}</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"text-xs opacity-80\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{item.description}\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t<TooltipContent side=\"right\" className=\"max-w-xs\">\n\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-xs\">{item.docDescription}</p>\n\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t</nav>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t{/* Right Column - Form */}\n\t\t\t\t\t<div className=\"flex-1 overflow-y-auto\">\n\t\t\t\t\t\t{activeMenu === \"health-check\" && (\n\t\t\t\t\t\t\t<HealthCheckForm id={id} type={type} />\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{activeMenu === \"restart-policy\" && (\n\t\t\t\t\t\t\t<RestartPolicyForm id={id} type={type} />\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{activeMenu === \"placement\" && (\n\t\t\t\t\t\t\t<PlacementForm id={id} type={type} />\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{activeMenu === \"update-config\" && (\n\t\t\t\t\t\t\t<UpdateConfigForm id={id} type={type} />\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{activeMenu === \"rollback-config\" && (\n\t\t\t\t\t\t\t<RollbackConfigForm id={id} type={type} />\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{activeMenu === \"mode\" && <ModeForm id={id} type={type} />}\n\t\t\t\t\t\t{activeMenu === \"network\" && <NetworkForm id={id} type={type} />}\n\t\t\t\t\t\t{activeMenu === \"labels\" && <LabelsForm id={id} type={type} />}\n\t\t\t\t\t\t{activeMenu === \"stop-grace-period\" && (\n\t\t\t\t\t\t\t<StopGracePeriodForm id={id} type={type} />\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{activeMenu === \"endpoint-spec\" && (\n\t\t\t\t\t\t\t<EndpointSpecForm id={id} type={type} />\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/advanced/cluster/show-cluster-settings.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { Server } from \"lucide-react\";\nimport Link from \"next/link\";\nimport { useEffect } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectGroup,\n\tSelectItem,\n\tSelectLabel,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { api } from \"@/utils/api\";\nimport { AddSwarmSettings } from \"./modify-swarm-settings\";\n\ninterface Props {\n\tid: string;\n\ttype: \"postgres\" | \"mariadb\" | \"mongo\" | \"mysql\" | \"redis\" | \"application\";\n}\n\nconst AddRedirectchema = z.object({\n\treplicas: z.number().min(1, \"Replicas must be at least 1\"),\n\tregistryId: z.string().optional(),\n});\n\ntype AddCommand = z.infer<typeof AddRedirectchema>;\n\nexport const ShowClusterSettings = ({ id, type }: Props) => {\n\tconst queryMap = {\n\t\tpostgres: () =>\n\t\t\tapi.postgres.one.useQuery({ postgresId: id }, { enabled: !!id }),\n\t\tredis: () => api.redis.one.useQuery({ redisId: id }, { enabled: !!id }),\n\t\tmysql: () => api.mysql.one.useQuery({ mysqlId: id }, { enabled: !!id }),\n\t\tmariadb: () =>\n\t\t\tapi.mariadb.one.useQuery({ mariadbId: id }, { enabled: !!id }),\n\t\tapplication: () =>\n\t\t\tapi.application.one.useQuery({ applicationId: id }, { enabled: !!id }),\n\t\tmongo: () => api.mongo.one.useQuery({ mongoId: id }, { enabled: !!id }),\n\t};\n\tconst { data, refetch } = queryMap[type]\n\t\t? queryMap[type]()\n\t\t: api.mongo.one.useQuery({ mongoId: id }, { enabled: !!id });\n\tconst { data: registries } = api.registry.all.useQuery();\n\n\tconst mutationMap = {\n\t\tpostgres: () => api.postgres.update.useMutation(),\n\t\tredis: () => api.redis.update.useMutation(),\n\t\tmysql: () => api.mysql.update.useMutation(),\n\t\tmariadb: () => api.mariadb.update.useMutation(),\n\t\tapplication: () => api.application.update.useMutation(),\n\t\tmongo: () => api.mongo.update.useMutation(),\n\t};\n\n\tconst { mutateAsync, isPending } = mutationMap[type]\n\t\t? mutationMap[type]()\n\t\t: api.mongo.update.useMutation();\n\n\tconst form = useForm<AddCommand>({\n\t\tdefaultValues: {\n\t\t\t...(type === \"application\" && data && \"registryId\" in data\n\t\t\t\t? {\n\t\t\t\t\t\tregistryId: data?.registryId || \"\",\n\t\t\t\t\t}\n\t\t\t\t: {}),\n\t\t\treplicas: data?.replicas || 1,\n\t\t},\n\t\tresolver: zodResolver(AddRedirectchema),\n\t});\n\n\tuseEffect(() => {\n\t\tif (data?.command) {\n\t\t\tform.reset({\n\t\t\t\t...(type === \"application\" && data && \"registryId\" in data\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tregistryId: data?.registryId || \"\",\n\t\t\t\t\t\t}\n\t\t\t\t\t: {}),\n\t\t\t\treplicas: data?.replicas || 1,\n\t\t\t});\n\t\t}\n\t}, [form, form.reset, form.formState.isSubmitSuccessful, data?.command]);\n\n\tconst onSubmit = async (data: AddCommand) => {\n\t\tawait mutateAsync({\n\t\t\tapplicationId: id || \"\",\n\t\t\tpostgresId: id || \"\",\n\t\t\tredisId: id || \"\",\n\t\t\tmysqlId: id || \"\",\n\t\t\tmariadbId: id || \"\",\n\t\t\tmongoId: id || \"\",\n\t\t\t...(type === \"application\"\n\t\t\t\t? {\n\t\t\t\t\t\tregistryId:\n\t\t\t\t\t\t\tdata?.registryId === \"none\" || !data?.registryId\n\t\t\t\t\t\t\t\t? null\n\t\t\t\t\t\t\t\t: data?.registryId,\n\t\t\t\t\t}\n\t\t\t\t: {}),\n\t\t\treplicas: data?.replicas,\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(\"Command Updated\");\n\t\t\t\tawait refetch();\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error updating the command\");\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<Card className=\"bg-background\">\n\t\t\t<CardHeader className=\"flex flex-row justify-between\">\n\t\t\t\t<div>\n\t\t\t\t\t<CardTitle className=\"text-xl\">Cluster Settings</CardTitle>\n\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\tModify swarm settings for the service.\n\t\t\t\t\t</CardDescription>\n\t\t\t\t</div>\n\t\t\t\t<AddSwarmSettings id={id} type={type} />\n\t\t\t</CardHeader>\n\t\t\t<CardContent className=\"flex flex-col gap-4\">\n\t\t\t\t<AlertBlock type=\"info\">\n\t\t\t\t\tPlease remember to click Redeploy after modify the cluster settings to\n\t\t\t\t\tapply the changes.\n\t\t\t\t</AlertBlock>\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\tclassName=\"grid w-full gap-4\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"replicas\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Replicas</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"1\"\n\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst value = e.target.value;\n\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(value === \"\" ? 0 : Number(value));\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value || \"\"}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t{type === \"application\" && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{registries && registries?.length === 0 ? (\n\t\t\t\t\t\t\t\t\t<div className=\"pt-10\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col items-center gap-3\">\n\t\t\t\t\t\t\t\t\t\t\t<Server className=\"size-8 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-base text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\tTo use a cluster feature, you need to configure at least\n\t\t\t\t\t\t\t\t\t\t\t\ta registry first. Please, go to{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\t\thref=\"/dashboard/settings/cluster\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-foreground\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\tSettings\n\t\t\t\t\t\t\t\t\t\t\t\t</Link>{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\tto do so.\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"registryId\"\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Select a registry</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonValueChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdefaultValue={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a registry\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{registries?.map((registry) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={registry.registryId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={registry.registryId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{registry.registryName}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value={\"none\"}>None</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tRegistries ({registries?.length})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t<div className=\"flex justify-end\">\n\t\t\t\t\t\t\t<Button isLoading={isPending} type=\"submit\" className=\"w-fit\">\n\t\t\t\t\t\t\t\tSave\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</form>\n\t\t\t\t</Form>\n\t\t\t</CardContent>\n\t\t</Card>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/advanced/cluster/swarm-forms/endpoint-spec-form.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { api } from \"@/utils/api\";\n\nexport const endpointSpecFormSchema = z.object({\n\tMode: z.string().optional(),\n});\n\ninterface EndpointSpecFormProps {\n\tid: string;\n\ttype: \"postgres\" | \"mariadb\" | \"mongo\" | \"mysql\" | \"redis\" | \"application\";\n}\n\nexport const EndpointSpecForm = ({ id, type }: EndpointSpecFormProps) => {\n\tconst [isLoading, setIsLoading] = useState(false);\n\n\tconst queryMap = {\n\t\tpostgres: () =>\n\t\t\tapi.postgres.one.useQuery({ postgresId: id }, { enabled: !!id }),\n\t\tredis: () => api.redis.one.useQuery({ redisId: id }, { enabled: !!id }),\n\t\tmysql: () => api.mysql.one.useQuery({ mysqlId: id }, { enabled: !!id }),\n\t\tmariadb: () =>\n\t\t\tapi.mariadb.one.useQuery({ mariadbId: id }, { enabled: !!id }),\n\t\tapplication: () =>\n\t\t\tapi.application.one.useQuery({ applicationId: id }, { enabled: !!id }),\n\t\tmongo: () => api.mongo.one.useQuery({ mongoId: id }, { enabled: !!id }),\n\t};\n\tconst { data, refetch } = queryMap[type]\n\t\t? queryMap[type]()\n\t\t: api.mongo.one.useQuery({ mongoId: id }, { enabled: !!id });\n\n\tconst mutationMap = {\n\t\tpostgres: () => api.postgres.update.useMutation(),\n\t\tredis: () => api.redis.update.useMutation(),\n\t\tmysql: () => api.mysql.update.useMutation(),\n\t\tmariadb: () => api.mariadb.update.useMutation(),\n\t\tapplication: () => api.application.update.useMutation(),\n\t\tmongo: () => api.mongo.update.useMutation(),\n\t};\n\n\tconst { mutateAsync } = mutationMap[type]\n\t\t? mutationMap[type]()\n\t\t: api.mongo.update.useMutation();\n\n\tconst form = useForm<any>({\n\t\tresolver: zodResolver(endpointSpecFormSchema),\n\t\tdefaultValues: {\n\t\t\tMode: undefined,\n\t\t},\n\t});\n\n\tuseEffect(() => {\n\t\tif (data?.endpointSpecSwarm) {\n\t\t\tconst es = data.endpointSpecSwarm;\n\t\t\tform.reset({\n\t\t\t\tMode: es.Mode,\n\t\t\t});\n\t\t}\n\t}, [data, form]);\n\n\tconst onSubmit = async (formData: z.infer<typeof endpointSpecFormSchema>) => {\n\t\tsetIsLoading(true);\n\t\ttry {\n\t\t\t// Check if all values are empty, if so, send null to clear the database\n\t\t\tconst hasAnyValue =\n\t\t\t\tformData.Mode !== undefined &&\n\t\t\t\tformData.Mode !== null &&\n\t\t\t\tformData.Mode !== \"\";\n\n\t\t\tawait mutateAsync({\n\t\t\t\tapplicationId: id || \"\",\n\t\t\t\tpostgresId: id || \"\",\n\t\t\t\tredisId: id || \"\",\n\t\t\t\tmysqlId: id || \"\",\n\t\t\t\tmariadbId: id || \"\",\n\t\t\t\tmongoId: id || \"\",\n\t\t\t\tendpointSpecSwarm: hasAnyValue ? formData : null,\n\t\t\t});\n\n\t\t\ttoast.success(\"Endpoint spec updated successfully\");\n\t\t\trefetch();\n\t\t} catch {\n\t\t\ttoast.error(\"Error updating endpoint spec\");\n\t\t} finally {\n\t\t\tsetIsLoading(false);\n\t\t}\n\t};\n\n\treturn (\n\t\t<Form {...form}>\n\t\t\t<form onSubmit={form.handleSubmit(onSubmit)} className=\"space-y-4\">\n\t\t\t\t<FormField\n\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\tname=\"Mode\"\n\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t<FormLabel>Mode</FormLabel>\n\t\t\t\t\t\t\t<FormDescription>Endpoint mode (vip or dnsrr)</FormDescription>\n\t\t\t\t\t\t\t<Select onValueChange={field.onChange} value={field.value}>\n\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select endpoint mode\" />\n\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t<SelectItem value=\"vip\">VIP (Virtual IP)</SelectItem>\n\t\t\t\t\t\t\t\t\t<SelectItem value=\"dnsrr\">DNS Round Robin</SelectItem>\n\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t)}\n\t\t\t\t/>\n\n\t\t\t\t<div className=\"flex justify-end gap-2\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tform.reset({\n\t\t\t\t\t\t\t\tMode: undefined,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tClear\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button type=\"submit\" isLoading={isLoading}>\n\t\t\t\t\t\tSave Endpoint Spec\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t</form>\n\t\t</Form>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/advanced/cluster/swarm-forms/health-check-form.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { api } from \"@/utils/api\";\n\nexport const healthCheckFormSchema = z.object({\n\tTest: z.array(z.string()).optional(),\n\tInterval: z.coerce.number().optional(),\n\tTimeout: z.coerce.number().optional(),\n\tStartPeriod: z.coerce.number().optional(),\n\tRetries: z.coerce.number().optional(),\n});\n\ninterface HealthCheckFormProps {\n\tid: string;\n\ttype: \"postgres\" | \"mariadb\" | \"mongo\" | \"mysql\" | \"redis\" | \"application\";\n}\n\nexport const HealthCheckForm = ({ id, type }: HealthCheckFormProps) => {\n\tconst [isLoading, setIsLoading] = useState(false);\n\n\tconst queryMap = {\n\t\tpostgres: () =>\n\t\t\tapi.postgres.one.useQuery({ postgresId: id }, { enabled: !!id }),\n\t\tredis: () => api.redis.one.useQuery({ redisId: id }, { enabled: !!id }),\n\t\tmysql: () => api.mysql.one.useQuery({ mysqlId: id }, { enabled: !!id }),\n\t\tmariadb: () =>\n\t\t\tapi.mariadb.one.useQuery({ mariadbId: id }, { enabled: !!id }),\n\t\tapplication: () =>\n\t\t\tapi.application.one.useQuery({ applicationId: id }, { enabled: !!id }),\n\t\tmongo: () => api.mongo.one.useQuery({ mongoId: id }, { enabled: !!id }),\n\t};\n\tconst { data, refetch } = queryMap[type]\n\t\t? queryMap[type]()\n\t\t: api.mongo.one.useQuery({ mongoId: id }, { enabled: !!id });\n\n\tconst mutationMap = {\n\t\tpostgres: () => api.postgres.update.useMutation(),\n\t\tredis: () => api.redis.update.useMutation(),\n\t\tmysql: () => api.mysql.update.useMutation(),\n\t\tmariadb: () => api.mariadb.update.useMutation(),\n\t\tapplication: () => api.application.update.useMutation(),\n\t\tmongo: () => api.mongo.update.useMutation(),\n\t};\n\n\tconst { mutateAsync } = mutationMap[type]\n\t\t? mutationMap[type]()\n\t\t: api.mongo.update.useMutation();\n\n\tconst form = useForm<any>({\n\t\tresolver: zodResolver(healthCheckFormSchema),\n\t\tdefaultValues: {\n\t\t\tTest: [],\n\t\t\tInterval: undefined,\n\t\t\tTimeout: undefined,\n\t\t\tStartPeriod: undefined,\n\t\t\tRetries: undefined,\n\t\t},\n\t});\n\n\tconst testCommands = form.watch(\"Test\") || [];\n\n\tuseEffect(() => {\n\t\tif (data?.healthCheckSwarm) {\n\t\t\tconst hc = data.healthCheckSwarm;\n\t\t\tform.reset({\n\t\t\t\tTest: hc.Test || [],\n\t\t\t\tInterval: hc.Interval,\n\t\t\t\tTimeout: hc.Timeout,\n\t\t\t\tStartPeriod: hc.StartPeriod,\n\t\t\t\tRetries: hc.Retries,\n\t\t\t});\n\t\t}\n\t}, [data, form]);\n\n\tconst onSubmit = async (formData: z.infer<typeof healthCheckFormSchema>) => {\n\t\tsetIsLoading(true);\n\t\ttry {\n\t\t\t// Check if all values are empty, if so, send null to clear the database\n\t\t\tconst hasAnyValue =\n\t\t\t\t(formData.Test && formData.Test.length > 0) ||\n\t\t\t\tformData.Interval !== undefined ||\n\t\t\t\tformData.Timeout !== undefined ||\n\t\t\t\tformData.StartPeriod !== undefined ||\n\t\t\t\tformData.Retries !== undefined;\n\n\t\t\tawait mutateAsync({\n\t\t\t\tapplicationId: id || \"\",\n\t\t\t\tpostgresId: id || \"\",\n\t\t\t\tredisId: id || \"\",\n\t\t\t\tmysqlId: id || \"\",\n\t\t\t\tmariadbId: id || \"\",\n\t\t\t\tmongoId: id || \"\",\n\t\t\t\thealthCheckSwarm: hasAnyValue ? formData : null,\n\t\t\t});\n\n\t\t\ttoast.success(\"Health check updated successfully\");\n\t\t\trefetch();\n\t\t} catch {\n\t\t\ttoast.error(\"Error updating health check\");\n\t\t} finally {\n\t\t\tsetIsLoading(false);\n\t\t}\n\t};\n\n\tconst addTestCommand = () => {\n\t\tform.setValue(\"Test\", [...testCommands, \"\"]);\n\t};\n\n\tconst updateTestCommand = (index: number, value: string) => {\n\t\tconst newCommands = [...testCommands];\n\t\tnewCommands[index] = value;\n\t\tform.setValue(\"Test\", newCommands);\n\t};\n\n\tconst removeTestCommand = (index: number) => {\n\t\tform.setValue(\n\t\t\t\"Test\",\n\t\t\ttestCommands.filter((_: string, i: number) => i !== index),\n\t\t);\n\t};\n\n\treturn (\n\t\t<Form {...form}>\n\t\t\t<form onSubmit={form.handleSubmit(onSubmit)} className=\"space-y-4\">\n\t\t\t\t<div>\n\t\t\t\t\t<FormLabel>Test Commands</FormLabel>\n\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\tCommand to run for health check (e.g., [\"CMD-SHELL\", \"curl -f\n\t\t\t\t\t\thttp://localhost:3000/health\"])\n\t\t\t\t\t</FormDescription>\n\t\t\t\t\t<div className=\"space-y-2 mt-2\">\n\t\t\t\t\t\t{testCommands.map((cmd: string, index: number) => (\n\t\t\t\t\t\t\t<div key={index} className=\"flex gap-2\">\n\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\tvalue={cmd}\n\t\t\t\t\t\t\t\t\tonChange={(e) => updateTestCommand(index, e.target.value)}\n\t\t\t\t\t\t\t\t\tplaceholder={\n\t\t\t\t\t\t\t\t\t\tindex === 0\n\t\t\t\t\t\t\t\t\t\t\t? \"CMD-SHELL\"\n\t\t\t\t\t\t\t\t\t\t\t: \"curl -f http://localhost:3000/health\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\tvariant=\"destructive\"\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\tonClick={() => removeTestCommand(index)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tRemove\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t))}\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\tonClick={addTestCommand}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tAdd Command\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<FormField\n\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\tname=\"Interval\"\n\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t<FormLabel>Interval (nanoseconds)</FormLabel>\n\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\tTime between health checks (e.g., 10000000000 for 10 seconds)\n\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t<Input type=\"number\" placeholder=\"10000000000\" {...field} />\n\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t)}\n\t\t\t\t/>\n\n\t\t\t\t<FormField\n\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\tname=\"Timeout\"\n\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t<FormLabel>Timeout (nanoseconds)</FormLabel>\n\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\tMaximum time to wait for health check response\n\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t<Input type=\"number\" placeholder=\"10000000000\" {...field} />\n\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t)}\n\t\t\t\t/>\n\n\t\t\t\t<FormField\n\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\tname=\"StartPeriod\"\n\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t<FormLabel>Start Period (nanoseconds)</FormLabel>\n\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\tInitial grace period before health checks begin\n\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t<Input type=\"number\" placeholder=\"10000000000\" {...field} />\n\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t)}\n\t\t\t\t/>\n\n\t\t\t\t<FormField\n\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\tname=\"Retries\"\n\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t<FormLabel>Retries</FormLabel>\n\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\tNumber of consecutive failures needed to consider container\n\t\t\t\t\t\t\t\tunhealthy\n\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t<Input type=\"number\" placeholder=\"3\" {...field} />\n\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t)}\n\t\t\t\t/>\n\n\t\t\t\t<div className=\"flex justify-end gap-2\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tform.reset({\n\t\t\t\t\t\t\t\tTest: [],\n\t\t\t\t\t\t\t\tInterval: undefined,\n\t\t\t\t\t\t\t\tTimeout: undefined,\n\t\t\t\t\t\t\t\tStartPeriod: undefined,\n\t\t\t\t\t\t\t\tRetries: undefined,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tClear\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button type=\"submit\" isLoading={isLoading}>\n\t\t\t\t\t\tSave Health Check\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t</form>\n\t\t</Form>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/advanced/cluster/swarm-forms/index.ts",
    "content": "export { EndpointSpecForm } from \"./endpoint-spec-form\";\nexport { HealthCheckForm } from \"./health-check-form\";\nexport { LabelsForm } from \"./labels-form\";\nexport { ModeForm } from \"./mode-form\";\nexport { NetworkForm } from \"./network-form\";\nexport { PlacementForm } from \"./placement-form\";\nexport { RestartPolicyForm } from \"./restart-policy-form\";\nexport { RollbackConfigForm } from \"./rollback-config-form\";\nexport { StopGracePeriodForm } from \"./stop-grace-period-form\";\nexport { UpdateConfigForm } from \"./update-config-form\";\nexport { filterEmptyValues, hasValues } from \"./utils\";\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/advanced/cluster/swarm-forms/labels-form.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { useEffect, useState } from \"react\";\nimport { useFieldArray, useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { api } from \"@/utils/api\";\n\nexport const labelsFormSchema = z.object({\n\tlabels: z\n\t\t.array(\n\t\t\tz.object({\n\t\t\t\tkey: z.string(),\n\t\t\t\tvalue: z.string(),\n\t\t\t}),\n\t\t)\n\t\t.optional(),\n});\n\ninterface LabelsFormProps {\n\tid: string;\n\ttype: \"postgres\" | \"mariadb\" | \"mongo\" | \"mysql\" | \"redis\" | \"application\";\n}\n\nexport const LabelsForm = ({ id, type }: LabelsFormProps) => {\n\tconst [isLoading, setIsLoading] = useState(false);\n\n\tconst queryMap = {\n\t\tpostgres: () =>\n\t\t\tapi.postgres.one.useQuery({ postgresId: id }, { enabled: !!id }),\n\t\tredis: () => api.redis.one.useQuery({ redisId: id }, { enabled: !!id }),\n\t\tmysql: () => api.mysql.one.useQuery({ mysqlId: id }, { enabled: !!id }),\n\t\tmariadb: () =>\n\t\t\tapi.mariadb.one.useQuery({ mariadbId: id }, { enabled: !!id }),\n\t\tapplication: () =>\n\t\t\tapi.application.one.useQuery({ applicationId: id }, { enabled: !!id }),\n\t\tmongo: () => api.mongo.one.useQuery({ mongoId: id }, { enabled: !!id }),\n\t};\n\tconst { data, refetch } = queryMap[type]\n\t\t? queryMap[type]()\n\t\t: api.mongo.one.useQuery({ mongoId: id }, { enabled: !!id });\n\n\tconst mutationMap = {\n\t\tpostgres: () => api.postgres.update.useMutation(),\n\t\tredis: () => api.redis.update.useMutation(),\n\t\tmysql: () => api.mysql.update.useMutation(),\n\t\tmariadb: () => api.mariadb.update.useMutation(),\n\t\tapplication: () => api.application.update.useMutation(),\n\t\tmongo: () => api.mongo.update.useMutation(),\n\t};\n\n\tconst { mutateAsync } = mutationMap[type]\n\t\t? mutationMap[type]()\n\t\t: api.mongo.update.useMutation();\n\n\tconst form = useForm<any>({\n\t\tresolver: zodResolver(labelsFormSchema),\n\t\tdefaultValues: {\n\t\t\tlabels: [],\n\t\t},\n\t});\n\n\tconst { fields, append, remove } = useFieldArray({\n\t\tcontrol: form.control,\n\t\tname: \"labels\",\n\t});\n\n\tuseEffect(() => {\n\t\tif (data?.labelsSwarm && typeof data.labelsSwarm === \"object\") {\n\t\t\tconst labelEntries = Object.entries(data.labelsSwarm).map(\n\t\t\t\t([key, value]) => ({\n\t\t\t\t\tkey,\n\t\t\t\t\tvalue: value as string,\n\t\t\t\t}),\n\t\t\t);\n\t\t\tform.reset({ labels: labelEntries });\n\t\t}\n\t}, [data, form]);\n\n\tconst onSubmit = async (formData: z.infer<typeof labelsFormSchema>) => {\n\t\tsetIsLoading(true);\n\t\ttry {\n\t\t\tconst labelsObject =\n\t\t\t\tformData.labels?.reduce(\n\t\t\t\t\t(acc, { key, value }) => {\n\t\t\t\t\t\tif (key && value) {\n\t\t\t\t\t\t\tacc[key] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn acc;\n\t\t\t\t\t},\n\t\t\t\t\t{} as Record<string, string>,\n\t\t\t\t) || {};\n\n\t\t\t// If no labels, send null to clear the database\n\t\t\tconst labelsToSend =\n\t\t\t\tObject.keys(labelsObject).length > 0 ? labelsObject : null;\n\n\t\t\tawait mutateAsync({\n\t\t\t\tapplicationId: id || \"\",\n\t\t\t\tpostgresId: id || \"\",\n\t\t\t\tredisId: id || \"\",\n\t\t\t\tmysqlId: id || \"\",\n\t\t\t\tmariadbId: id || \"\",\n\t\t\t\tmongoId: id || \"\",\n\t\t\t\tlabelsSwarm: labelsToSend,\n\t\t\t});\n\n\t\t\ttoast.success(\"Labels updated successfully\");\n\t\t\trefetch();\n\t\t} catch {\n\t\t\ttoast.error(\"Error updating labels\");\n\t\t} finally {\n\t\t\tsetIsLoading(false);\n\t\t}\n\t};\n\n\treturn (\n\t\t<Form {...form}>\n\t\t\t<form onSubmit={form.handleSubmit(onSubmit)} className=\"space-y-4\">\n\t\t\t\t<div>\n\t\t\t\t\t<FormLabel>Labels</FormLabel>\n\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\tAdd key-value labels to your service\n\t\t\t\t\t</FormDescription>\n\t\t\t\t\t<div className=\"space-y-2 mt-2\">\n\t\t\t\t\t\t{fields.map((field, index) => (\n\t\t\t\t\t\t\t<div key={field.id} className=\"flex gap-2\">\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname={`labels.${index}.key`}\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem className=\"flex-1\">\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input {...field} placeholder=\"com.example.app.name\" />\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname={`labels.${index}.value`}\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem className=\"flex-1\">\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input {...field} placeholder=\"my-app\" />\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\tvariant=\"destructive\"\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\tonClick={() => remove(index)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tRemove\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t))}\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\tonClick={() => append({ key: \"\", value: \"\" })}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tAdd Label\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"flex justify-end gap-2\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tform.reset({ labels: [] });\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tClear\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button type=\"submit\" isLoading={isLoading}>\n\t\t\t\t\t\tSave Labels\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t</form>\n\t\t</Form>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/advanced/cluster/swarm-forms/mode-form.tsx",
    "content": "import { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { api } from \"@/utils/api\";\n\ninterface ModeFormProps {\n\tid: string;\n\ttype: \"postgres\" | \"mariadb\" | \"mongo\" | \"mysql\" | \"redis\" | \"application\";\n}\n\nexport const ModeForm = ({ id, type }: ModeFormProps) => {\n\tconst [isLoading, setIsLoading] = useState(false);\n\n\tconst queryMap = {\n\t\tpostgres: () =>\n\t\t\tapi.postgres.one.useQuery({ postgresId: id }, { enabled: !!id }),\n\t\tredis: () => api.redis.one.useQuery({ redisId: id }, { enabled: !!id }),\n\t\tmysql: () => api.mysql.one.useQuery({ mysqlId: id }, { enabled: !!id }),\n\t\tmariadb: () =>\n\t\t\tapi.mariadb.one.useQuery({ mariadbId: id }, { enabled: !!id }),\n\t\tapplication: () =>\n\t\t\tapi.application.one.useQuery({ applicationId: id }, { enabled: !!id }),\n\t\tmongo: () => api.mongo.one.useQuery({ mongoId: id }, { enabled: !!id }),\n\t};\n\tconst { data, refetch } = queryMap[type]\n\t\t? queryMap[type]()\n\t\t: api.mongo.one.useQuery({ mongoId: id }, { enabled: !!id });\n\n\tconst mutationMap = {\n\t\tpostgres: () => api.postgres.update.useMutation(),\n\t\tredis: () => api.redis.update.useMutation(),\n\t\tmysql: () => api.mysql.update.useMutation(),\n\t\tmariadb: () => api.mariadb.update.useMutation(),\n\t\tapplication: () => api.application.update.useMutation(),\n\t\tmongo: () => api.mongo.update.useMutation(),\n\t};\n\n\tconst { mutateAsync } = mutationMap[type]\n\t\t? mutationMap[type]()\n\t\t: api.mongo.update.useMutation();\n\n\tconst form = useForm<any>({\n\t\tdefaultValues: {\n\t\t\ttype: undefined,\n\t\t\tReplicas: undefined,\n\t\t},\n\t});\n\n\tconst modeType = form.watch(\"type\");\n\n\tuseEffect(() => {\n\t\tif (data?.modeSwarm) {\n\t\t\tconst mode = data.modeSwarm;\n\t\t\tif (mode.Replicated) {\n\t\t\t\tform.reset({\n\t\t\t\t\ttype: \"Replicated\",\n\t\t\t\t\tReplicas: mode.Replicated.Replicas,\n\t\t\t\t});\n\t\t\t} else if (mode.Global) {\n\t\t\t\tform.reset({\n\t\t\t\t\ttype: \"Global\",\n\t\t\t\t\tReplicas: undefined,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}, [data, form]);\n\n\tconst onSubmit = async (formData: any) => {\n\t\tsetIsLoading(true);\n\t\ttry {\n\t\t\t// If no type is selected, send null to clear the database\n\t\t\tif (!formData.type) {\n\t\t\t\tawait mutateAsync({\n\t\t\t\t\tapplicationId: id || \"\",\n\t\t\t\t\tpostgresId: id || \"\",\n\t\t\t\t\tredisId: id || \"\",\n\t\t\t\t\tmysqlId: id || \"\",\n\t\t\t\t\tmariadbId: id || \"\",\n\t\t\t\t\tmongoId: id || \"\",\n\t\t\t\t\tmodeSwarm: null,\n\t\t\t\t});\n\t\t\t\ttoast.success(\"Mode updated successfully\");\n\t\t\t\trefetch();\n\t\t\t\tsetIsLoading(false);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst modeData =\n\t\t\t\tformData.type === \"Replicated\"\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tReplicated: {\n\t\t\t\t\t\t\t\tReplicas:\n\t\t\t\t\t\t\t\t\tformData.Replicas !== undefined && formData.Replicas !== \"\"\n\t\t\t\t\t\t\t\t\t\t? Number(formData.Replicas)\n\t\t\t\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}\n\t\t\t\t\t: { Global: {} };\n\n\t\t\tawait mutateAsync({\n\t\t\t\tapplicationId: id || \"\",\n\t\t\t\tpostgresId: id || \"\",\n\t\t\t\tredisId: id || \"\",\n\t\t\t\tmysqlId: id || \"\",\n\t\t\t\tmariadbId: id || \"\",\n\t\t\t\tmongoId: id || \"\",\n\t\t\t\tmodeSwarm: modeData,\n\t\t\t});\n\n\t\t\ttoast.success(\"Mode updated successfully\");\n\t\t\trefetch();\n\t\t} catch {\n\t\t\ttoast.error(\"Error updating mode\");\n\t\t} finally {\n\t\t\tsetIsLoading(false);\n\t\t}\n\t};\n\n\treturn (\n\t\t<Form {...form}>\n\t\t\t<form onSubmit={form.handleSubmit(onSubmit)} className=\"space-y-4\">\n\t\t\t\t<FormField\n\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\tname=\"type\"\n\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t<FormLabel>Mode Type</FormLabel>\n\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\tChoose between replicated or global service mode\n\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t<Select onValueChange={field.onChange} value={field.value}>\n\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select mode type\" />\n\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t<SelectItem value=\"Replicated\">Replicated</SelectItem>\n\t\t\t\t\t\t\t\t\t<SelectItem value=\"Global\">Global</SelectItem>\n\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t)}\n\t\t\t\t/>\n\n\t\t\t\t{modeType === \"Replicated\" && (\n\t\t\t\t\t<FormField\n\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\tname=\"Replicas\"\n\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t<FormLabel>Replicas</FormLabel>\n\t\t\t\t\t\t\t\t<FormDescription>Number of replicas to run</FormDescription>\n\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t<Input type=\"number\" placeholder=\"1\" {...field} />\n\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t)}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\n\t\t\t\t<div className=\"flex justify-end gap-2\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tform.reset({\n\t\t\t\t\t\t\t\ttype: undefined,\n\t\t\t\t\t\t\t\tReplicas: undefined,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tClear\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button type=\"submit\" isLoading={isLoading}>\n\t\t\t\t\t\tSave Mode\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t</form>\n\t\t</Form>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/advanced/cluster/swarm-forms/network-form.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { useEffect, useState } from \"react\";\nimport { useFieldArray, useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { api } from \"@/utils/api\";\n\nconst driverOptEntrySchema = z.object({\n\tkey: z.string(),\n\tvalue: z.string(),\n});\n\nexport const networkFormSchema = z.object({\n\tnetworks: z\n\t\t.array(\n\t\t\tz.object({\n\t\t\t\tTarget: z.string().optional(),\n\t\t\t\tAliases: z.string().optional(),\n\t\t\t\tDriverOptsEntries: z.array(driverOptEntrySchema).optional(),\n\t\t\t}),\n\t\t)\n\t\t.optional(),\n});\n\ninterface NetworkFormProps {\n\tid: string;\n\ttype: \"postgres\" | \"mariadb\" | \"mongo\" | \"mysql\" | \"redis\" | \"application\";\n}\n\nexport const NetworkForm = ({ id, type }: NetworkFormProps) => {\n\tconst [isLoading, setIsLoading] = useState(false);\n\n\tconst queryMap = {\n\t\tpostgres: () =>\n\t\t\tapi.postgres.one.useQuery({ postgresId: id }, { enabled: !!id }),\n\t\tredis: () => api.redis.one.useQuery({ redisId: id }, { enabled: !!id }),\n\t\tmysql: () => api.mysql.one.useQuery({ mysqlId: id }, { enabled: !!id }),\n\t\tmariadb: () =>\n\t\t\tapi.mariadb.one.useQuery({ mariadbId: id }, { enabled: !!id }),\n\t\tapplication: () =>\n\t\t\tapi.application.one.useQuery({ applicationId: id }, { enabled: !!id }),\n\t\tmongo: () => api.mongo.one.useQuery({ mongoId: id }, { enabled: !!id }),\n\t};\n\tconst { data, refetch } = queryMap[type]\n\t\t? queryMap[type]()\n\t\t: api.mongo.one.useQuery({ mongoId: id }, { enabled: !!id });\n\n\tconst mutationMap = {\n\t\tpostgres: () => api.postgres.update.useMutation(),\n\t\tredis: () => api.redis.update.useMutation(),\n\t\tmysql: () => api.mysql.update.useMutation(),\n\t\tmariadb: () => api.mariadb.update.useMutation(),\n\t\tapplication: () => api.application.update.useMutation(),\n\t\tmongo: () => api.mongo.update.useMutation(),\n\t};\n\n\tconst { mutateAsync } = mutationMap[type]\n\t\t? mutationMap[type]()\n\t\t: api.mongo.update.useMutation();\n\n\tconst form = useForm<z.infer<typeof networkFormSchema>>({\n\t\tresolver: zodResolver(networkFormSchema),\n\t\tdefaultValues: {\n\t\t\tnetworks: [],\n\t\t},\n\t});\n\n\tconst { fields, append, remove } = useFieldArray({\n\t\tcontrol: form.control,\n\t\tname: \"networks\",\n\t});\n\n\tuseEffect(() => {\n\t\tif (data?.networkSwarm && Array.isArray(data.networkSwarm)) {\n\t\t\tconst networkEntries = data.networkSwarm.map((network) => ({\n\t\t\t\tTarget: network.Target || \"\",\n\t\t\t\tAliases: network.Aliases?.join(\", \") || \"\",\n\t\t\t\tDriverOptsEntries: network.DriverOpts\n\t\t\t\t\t? Object.entries(network.DriverOpts).map(([key, value]) => ({\n\t\t\t\t\t\t\tkey,\n\t\t\t\t\t\t\tvalue: value ?? \"\",\n\t\t\t\t\t\t}))\n\t\t\t\t\t: [],\n\t\t\t}));\n\t\t\tform.reset({ networks: networkEntries });\n\t\t}\n\t}, [data, form]);\n\n\tconst onSubmit = async (formData: z.infer<typeof networkFormSchema>) => {\n\t\tsetIsLoading(true);\n\t\ttry {\n\t\t\tconst networksArray =\n\t\t\t\tformData.networks\n\t\t\t\t\t?.filter((network) => network.Target)\n\t\t\t\t\t.map((network) => {\n\t\t\t\t\t\tconst entries = (network.DriverOptsEntries ?? []).filter(\n\t\t\t\t\t\t\t(e) => e.key.trim() !== \"\",\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst driverOpts =\n\t\t\t\t\t\t\tentries.length > 0\n\t\t\t\t\t\t\t\t? Object.fromEntries(\n\t\t\t\t\t\t\t\t\t\tentries.map((e) => [e.key.trim(), e.value]),\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tTarget: network.Target,\n\t\t\t\t\t\t\tAliases: network.Aliases\n\t\t\t\t\t\t\t\t? network.Aliases.split(\",\").map((alias) => alias.trim())\n\t\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t\t\tDriverOpts: driverOpts,\n\t\t\t\t\t\t};\n\t\t\t\t\t}) || [];\n\n\t\t\t// If no networks, send null to clear the database\n\t\t\tconst networksToSend = networksArray.length > 0 ? networksArray : null;\n\n\t\t\tawait mutateAsync({\n\t\t\t\tapplicationId: id || \"\",\n\t\t\t\tpostgresId: id || \"\",\n\t\t\t\tredisId: id || \"\",\n\t\t\t\tmysqlId: id || \"\",\n\t\t\t\tmariadbId: id || \"\",\n\t\t\t\tmongoId: id || \"\",\n\t\t\t\tnetworkSwarm: networksToSend,\n\t\t\t});\n\n\t\t\ttoast.success(\"Network configuration updated successfully\");\n\t\t\trefetch();\n\t\t} catch {\n\t\t\ttoast.error(\"Error updating network configuration\");\n\t\t} finally {\n\t\t\tsetIsLoading(false);\n\t\t}\n\t};\n\n\treturn (\n\t\t<Form {...form}>\n\t\t\t<form onSubmit={form.handleSubmit(onSubmit)} className=\"space-y-4\">\n\t\t\t\t<div>\n\t\t\t\t\t<FormLabel>Networks</FormLabel>\n\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\tConfigure network attachments for your service\n\t\t\t\t\t</FormDescription>\n\t\t\t\t\t<div className=\"space-y-2 mt-2\">\n\t\t\t\t\t\t{fields.map((field, index) => (\n\t\t\t\t\t\t\t<div key={field.id} className=\"space-y-2 p-3 border rounded\">\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname={`networks.${index}.Target`}\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Network Name</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input {...field} placeholder=\"my-network\" />\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\tThe name of the network to attach to\n\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname={`networks.${index}.Aliases`}\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Aliases (optional)</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"alias1, alias2, alias3\"\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\tComma-separated list of network aliases\n\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<div className=\"space-y-2\">\n\t\t\t\t\t\t\t\t\t<FormLabel>Driver options (optional)</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\te.g. com.docker.network.driver.mtu,\n\t\t\t\t\t\t\t\t\t\tcom.docker.network.driver.host_binding\n\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t{(\n\t\t\t\t\t\t\t\t\t\tform.watch(`networks.${index}.DriverOptsEntries`) ?? []\n\t\t\t\t\t\t\t\t\t).map((_, optIndex) => (\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tkey={optIndex}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex gap-2 items-end flex-wrap\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\t\tname={`networks.${index}.DriverOptsEntries.${optIndex}.key`}\n\t\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem className=\"flex-1 min-w-[140px]\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"com.docker.network.driver.mtu\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\t\tname={`networks.${index}.DriverOptsEntries.${optIndex}.value`}\n\t\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem className=\"flex-1 min-w-[100px]\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input {...field} placeholder=\"1500\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst entries =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.getValues(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t`networks.${index}.DriverOptsEntries`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t) ?? [];\n\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t`networks.${index}.DriverOptsEntries`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tentries.filter((_, i) => i !== optIndex),\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\tRemove\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\tconst entries =\n\t\t\t\t\t\t\t\t\t\t\t\tform.getValues(`networks.${index}.DriverOptsEntries`) ??\n\t\t\t\t\t\t\t\t\t\t\t\t[];\n\t\t\t\t\t\t\t\t\t\t\tform.setValue(`networks.${index}.DriverOptsEntries`, [\n\t\t\t\t\t\t\t\t\t\t\t\t...entries,\n\t\t\t\t\t\t\t\t\t\t\t\t{ key: \"\", value: \"\" },\n\t\t\t\t\t\t\t\t\t\t\t]);\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tAdd driver option\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\tvariant=\"destructive\"\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\tonClick={() => remove(index)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tRemove Network\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t))}\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\tappend({\n\t\t\t\t\t\t\t\t\tTarget: \"\",\n\t\t\t\t\t\t\t\t\tAliases: \"\",\n\t\t\t\t\t\t\t\t\tDriverOptsEntries: [],\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tAdd Network\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"flex justify-end gap-2\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tform.reset({ networks: [] });\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tClear\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button type=\"submit\" isLoading={isLoading}>\n\t\t\t\t\t\tSave Networks\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t</form>\n\t\t</Form>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/advanced/cluster/swarm-forms/placement-form.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { api } from \"@/utils/api\";\n\nconst PreferenceSchema = z.object({\n\tSpreadDescriptor: z.string(),\n});\n\nconst PlatformSchema = z.object({\n\tArchitecture: z.string(),\n\tOS: z.string(),\n});\n\nexport const placementFormSchema = z.object({\n\tConstraints: z.array(z.string()).optional(),\n\tPreferences: z.array(PreferenceSchema).optional(),\n\tMaxReplicas: z.coerce.number().optional(),\n\tPlatforms: z.array(PlatformSchema).optional(),\n});\n\ninterface PlacementFormProps {\n\tid: string;\n\ttype: \"postgres\" | \"mariadb\" | \"mongo\" | \"mysql\" | \"redis\" | \"application\";\n}\n\nexport const PlacementForm = ({ id, type }: PlacementFormProps) => {\n\tconst [isLoading, setIsLoading] = useState(false);\n\n\tconst queryMap = {\n\t\tpostgres: () =>\n\t\t\tapi.postgres.one.useQuery({ postgresId: id }, { enabled: !!id }),\n\t\tredis: () => api.redis.one.useQuery({ redisId: id }, { enabled: !!id }),\n\t\tmysql: () => api.mysql.one.useQuery({ mysqlId: id }, { enabled: !!id }),\n\t\tmariadb: () =>\n\t\t\tapi.mariadb.one.useQuery({ mariadbId: id }, { enabled: !!id }),\n\t\tapplication: () =>\n\t\t\tapi.application.one.useQuery({ applicationId: id }, { enabled: !!id }),\n\t\tmongo: () => api.mongo.one.useQuery({ mongoId: id }, { enabled: !!id }),\n\t};\n\tconst { data, refetch } = queryMap[type]\n\t\t? queryMap[type]()\n\t\t: api.mongo.one.useQuery({ mongoId: id }, { enabled: !!id });\n\n\tconst mutationMap = {\n\t\tpostgres: () => api.postgres.update.useMutation(),\n\t\tredis: () => api.redis.update.useMutation(),\n\t\tmysql: () => api.mysql.update.useMutation(),\n\t\tmariadb: () => api.mariadb.update.useMutation(),\n\t\tapplication: () => api.application.update.useMutation(),\n\t\tmongo: () => api.mongo.update.useMutation(),\n\t};\n\n\tconst { mutateAsync } = mutationMap[type]\n\t\t? mutationMap[type]()\n\t\t: api.mongo.update.useMutation();\n\n\tconst form = useForm<any>({\n\t\tresolver: zodResolver(placementFormSchema),\n\t\tdefaultValues: {\n\t\t\tConstraints: [],\n\t\t\tPreferences: [],\n\t\t\tMaxReplicas: undefined,\n\t\t\tPlatforms: [],\n\t\t},\n\t});\n\n\tconst constraints = form.watch(\"Constraints\") || [];\n\tconst preferences = form.watch(\"Preferences\") || [];\n\tconst platforms = form.watch(\"Platforms\") || [];\n\n\tuseEffect(() => {\n\t\tif (data?.placementSwarm) {\n\t\t\tconst placement = data.placementSwarm;\n\t\t\tform.reset({\n\t\t\t\tConstraints: placement.Constraints || [],\n\t\t\t\tPreferences:\n\t\t\t\t\tplacement.Preferences?.map((p: any) => ({\n\t\t\t\t\t\tSpreadDescriptor: p.Spread?.SpreadDescriptor || \"\",\n\t\t\t\t\t})) || [],\n\t\t\t\tMaxReplicas: placement.MaxReplicas,\n\t\t\t\tPlatforms: placement.Platforms || [],\n\t\t\t});\n\t\t}\n\t}, [data, form]);\n\n\tconst onSubmit = async (formData: z.infer<typeof placementFormSchema>) => {\n\t\tsetIsLoading(true);\n\t\ttry {\n\t\t\t// Check if all values are empty, if so, send null to clear the database\n\t\t\tconst hasAnyValue =\n\t\t\t\t(formData.Constraints && formData.Constraints.length > 0) ||\n\t\t\t\t(formData.Preferences && formData.Preferences.length > 0) ||\n\t\t\t\t(formData.Platforms && formData.Platforms.length > 0) ||\n\t\t\t\tformData.MaxReplicas !== undefined;\n\n\t\t\tawait mutateAsync({\n\t\t\t\tapplicationId: id || \"\",\n\t\t\t\tpostgresId: id || \"\",\n\t\t\t\tredisId: id || \"\",\n\t\t\t\tmysqlId: id || \"\",\n\t\t\t\tmariadbId: id || \"\",\n\t\t\t\tmongoId: id || \"\",\n\t\t\t\tplacementSwarm: hasAnyValue\n\t\t\t\t\t? {\n\t\t\t\t\t\t\t...formData,\n\t\t\t\t\t\t\tPreferences: formData.Preferences?.map((p) => ({\n\t\t\t\t\t\t\t\tSpread: { SpreadDescriptor: p.SpreadDescriptor },\n\t\t\t\t\t\t\t})),\n\t\t\t\t\t\t}\n\t\t\t\t\t: null,\n\t\t\t});\n\n\t\t\ttoast.success(\"Placement updated successfully\");\n\t\t\trefetch();\n\t\t} catch {\n\t\t\ttoast.error(\"Error updating placement\");\n\t\t} finally {\n\t\t\tsetIsLoading(false);\n\t\t}\n\t};\n\n\tconst addConstraint = () => {\n\t\tform.setValue(\"Constraints\", [...constraints, \"\"]);\n\t};\n\n\tconst updateConstraint = (index: number, value: string) => {\n\t\tconst newConstraints = [...constraints];\n\t\tnewConstraints[index] = value;\n\t\tform.setValue(\"Constraints\", newConstraints);\n\t};\n\n\tconst removeConstraint = (index: number) => {\n\t\tform.setValue(\n\t\t\t\"Constraints\",\n\t\t\tconstraints.filter((_: string, i: number) => i !== index),\n\t\t);\n\t};\n\n\tconst addPreference = () => {\n\t\tform.setValue(\"Preferences\", [...preferences, { SpreadDescriptor: \"\" }]);\n\t};\n\n\tconst updatePreference = (index: number, value: string) => {\n\t\tconst newPreferences = [...preferences];\n\t\tif (newPreferences[index]) {\n\t\t\tnewPreferences[index].SpreadDescriptor = value;\n\t\t\tform.setValue(\"Preferences\", newPreferences);\n\t\t}\n\t};\n\n\tconst removePreference = (index: number) => {\n\t\tform.setValue(\n\t\t\t\"Preferences\",\n\t\t\tpreferences.filter((_: any, i: number) => i !== index),\n\t\t);\n\t};\n\n\tconst addPlatform = () => {\n\t\tform.setValue(\"Platforms\", [...platforms, { Architecture: \"\", OS: \"\" }]);\n\t};\n\n\tconst updatePlatform = (\n\t\tindex: number,\n\t\tfield: \"Architecture\" | \"OS\",\n\t\tvalue: string,\n\t) => {\n\t\tconst newPlatforms = [...platforms];\n\t\tif (newPlatforms[index]) {\n\t\t\tnewPlatforms[index][field] = value;\n\t\t\tform.setValue(\"Platforms\", newPlatforms);\n\t\t}\n\t};\n\n\tconst removePlatform = (index: number) => {\n\t\tform.setValue(\n\t\t\t\"Platforms\",\n\t\t\tplatforms.filter((_: any, i: number) => i !== index),\n\t\t);\n\t};\n\n\treturn (\n\t\t<Form {...form}>\n\t\t\t<form onSubmit={form.handleSubmit(onSubmit)} className=\"space-y-4\">\n\t\t\t\t<div>\n\t\t\t\t\t<FormLabel>Constraints</FormLabel>\n\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\tPlacement constraints (e.g., \"node.role==manager\")\n\t\t\t\t\t</FormDescription>\n\t\t\t\t\t<div className=\"space-y-2 mt-2\">\n\t\t\t\t\t\t{constraints.map((constraint: string, index: number) => (\n\t\t\t\t\t\t\t<div key={index} className=\"flex gap-2\">\n\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\tvalue={constraint}\n\t\t\t\t\t\t\t\t\tonChange={(e) => updateConstraint(index, e.target.value)}\n\t\t\t\t\t\t\t\t\tplaceholder=\"node.role==manager\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\tvariant=\"destructive\"\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\tonClick={() => removeConstraint(index)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tRemove\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t))}\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\tonClick={addConstraint}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tAdd Constraint\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<div>\n\t\t\t\t\t<FormLabel>Preferences</FormLabel>\n\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\tSpread preferences for task distribution (e.g.,\n\t\t\t\t\t\t\"node.labels.region\")\n\t\t\t\t\t</FormDescription>\n\t\t\t\t\t<div className=\"space-y-2 mt-2\">\n\t\t\t\t\t\t{preferences.map((pref: any, index: number) => (\n\t\t\t\t\t\t\t<div key={index} className=\"flex gap-2\">\n\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\tvalue={pref.SpreadDescriptor}\n\t\t\t\t\t\t\t\t\tonChange={(e) => updatePreference(index, e.target.value)}\n\t\t\t\t\t\t\t\t\tplaceholder=\"node.labels.region\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\tvariant=\"destructive\"\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\tonClick={() => removePreference(index)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tRemove\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t))}\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\tonClick={addPreference}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tAdd Preference\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<FormField\n\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\tname=\"MaxReplicas\"\n\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t<FormLabel>Max Replicas</FormLabel>\n\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\tMaximum number of replicas per node\n\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t<Input type=\"number\" placeholder=\"10\" {...field} />\n\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t)}\n\t\t\t\t/>\n\n\t\t\t\t<div>\n\t\t\t\t\t<FormLabel>Platforms</FormLabel>\n\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\tTarget platforms for task scheduling\n\t\t\t\t\t</FormDescription>\n\t\t\t\t\t<div className=\"space-y-2 mt-2\">\n\t\t\t\t\t\t{platforms.map((platform: any, index: number) => (\n\t\t\t\t\t\t\t<div key={index} className=\"flex gap-2\">\n\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\tvalue={platform.Architecture}\n\t\t\t\t\t\t\t\t\tonChange={(e) =>\n\t\t\t\t\t\t\t\t\t\tupdatePlatform(index, \"Architecture\", e.target.value)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tplaceholder=\"amd64\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\tvalue={platform.OS}\n\t\t\t\t\t\t\t\t\tonChange={(e) => updatePlatform(index, \"OS\", e.target.value)}\n\t\t\t\t\t\t\t\t\tplaceholder=\"linux\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\tvariant=\"destructive\"\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\tonClick={() => removePlatform(index)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tRemove\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t))}\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\tonClick={addPlatform}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tAdd Platform\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"flex justify-end gap-2\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tform.reset({\n\t\t\t\t\t\t\t\tConstraints: [],\n\t\t\t\t\t\t\t\tPreferences: [],\n\t\t\t\t\t\t\t\tMaxReplicas: undefined,\n\t\t\t\t\t\t\t\tPlatforms: [],\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tClear\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button type=\"submit\" isLoading={isLoading}>\n\t\t\t\t\t\tSave Placement\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t</form>\n\t\t</Form>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/advanced/cluster/swarm-forms/restart-policy-form.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { api } from \"@/utils/api\";\n\nexport const restartPolicyFormSchema = z.object({\n\tCondition: z.string().optional(),\n\tDelay: z.coerce.number().optional(),\n\tMaxAttempts: z.coerce.number().optional(),\n\tWindow: z.coerce.number().optional(),\n});\n\ninterface RestartPolicyFormProps {\n\tid: string;\n\ttype: \"postgres\" | \"mariadb\" | \"mongo\" | \"mysql\" | \"redis\" | \"application\";\n}\n\nexport const RestartPolicyForm = ({ id, type }: RestartPolicyFormProps) => {\n\tconst [isLoading, setIsLoading] = useState(false);\n\n\tconst queryMap = {\n\t\tpostgres: () =>\n\t\t\tapi.postgres.one.useQuery({ postgresId: id }, { enabled: !!id }),\n\t\tredis: () => api.redis.one.useQuery({ redisId: id }, { enabled: !!id }),\n\t\tmysql: () => api.mysql.one.useQuery({ mysqlId: id }, { enabled: !!id }),\n\t\tmariadb: () =>\n\t\t\tapi.mariadb.one.useQuery({ mariadbId: id }, { enabled: !!id }),\n\t\tapplication: () =>\n\t\t\tapi.application.one.useQuery({ applicationId: id }, { enabled: !!id }),\n\t\tmongo: () => api.mongo.one.useQuery({ mongoId: id }, { enabled: !!id }),\n\t};\n\tconst { data, refetch } = queryMap[type]\n\t\t? queryMap[type]()\n\t\t: api.mongo.one.useQuery({ mongoId: id }, { enabled: !!id });\n\n\tconst mutationMap = {\n\t\tpostgres: () => api.postgres.update.useMutation(),\n\t\tredis: () => api.redis.update.useMutation(),\n\t\tmysql: () => api.mysql.update.useMutation(),\n\t\tmariadb: () => api.mariadb.update.useMutation(),\n\t\tapplication: () => api.application.update.useMutation(),\n\t\tmongo: () => api.mongo.update.useMutation(),\n\t};\n\n\tconst { mutateAsync } = mutationMap[type]\n\t\t? mutationMap[type]()\n\t\t: api.mongo.update.useMutation();\n\n\tconst form = useForm<any>({\n\t\tresolver: zodResolver(restartPolicyFormSchema),\n\t\tdefaultValues: {\n\t\t\tCondition: undefined,\n\t\t\tDelay: undefined,\n\t\t\tMaxAttempts: undefined,\n\t\t\tWindow: undefined,\n\t\t},\n\t});\n\n\tuseEffect(() => {\n\t\tif (data?.restartPolicySwarm) {\n\t\t\tform.reset({\n\t\t\t\tCondition: data.restartPolicySwarm.Condition,\n\t\t\t\tDelay: data.restartPolicySwarm.Delay,\n\t\t\t\tMaxAttempts: data.restartPolicySwarm.MaxAttempts,\n\t\t\t\tWindow: data.restartPolicySwarm.Window,\n\t\t\t});\n\t\t}\n\t}, [data, form]);\n\n\tconst onSubmit = async (\n\t\tformData: z.infer<typeof restartPolicyFormSchema>,\n\t) => {\n\t\tsetIsLoading(true);\n\t\ttry {\n\t\t\t// Check if all values are empty, if so, send null to clear the database\n\t\t\tconst hasAnyValue = Object.values(formData).some(\n\t\t\t\t(value) => value !== undefined && value !== null && value !== \"\",\n\t\t\t);\n\n\t\t\tawait mutateAsync({\n\t\t\t\tapplicationId: id || \"\",\n\t\t\t\tpostgresId: id || \"\",\n\t\t\t\tredisId: id || \"\",\n\t\t\t\tmysqlId: id || \"\",\n\t\t\t\tmariadbId: id || \"\",\n\t\t\t\tmongoId: id || \"\",\n\t\t\t\trestartPolicySwarm: hasAnyValue ? formData : null,\n\t\t\t});\n\n\t\t\ttoast.success(\"Restart policy updated successfully\");\n\t\t\trefetch();\n\t\t} catch {\n\t\t\ttoast.error(\"Error updating restart policy\");\n\t\t} finally {\n\t\t\tsetIsLoading(false);\n\t\t}\n\t};\n\n\treturn (\n\t\t<Form {...form}>\n\t\t\t<form onSubmit={form.handleSubmit(onSubmit)} className=\"space-y-4\">\n\t\t\t\t<FormField\n\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\tname=\"Condition\"\n\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t<FormLabel>Condition</FormLabel>\n\t\t\t\t\t\t\t<FormDescription>When to restart the container</FormDescription>\n\t\t\t\t\t\t\t<Select onValueChange={field.onChange} value={field.value}>\n\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select restart condition\" />\n\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t<SelectItem value=\"none\">None</SelectItem>\n\t\t\t\t\t\t\t\t\t<SelectItem value=\"on-failure\">On Failure</SelectItem>\n\t\t\t\t\t\t\t\t\t<SelectItem value=\"any\">Any</SelectItem>\n\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t)}\n\t\t\t\t/>\n\n\t\t\t\t<FormField\n\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\tname=\"Delay\"\n\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t<FormLabel>Delay (nanoseconds)</FormLabel>\n\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\tWait time between restart attempts\n\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t<Input type=\"number\" placeholder=\"10000000000\" {...field} />\n\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t)}\n\t\t\t\t/>\n\n\t\t\t\t<FormField\n\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\tname=\"MaxAttempts\"\n\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t<FormLabel>Max Attempts</FormLabel>\n\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\tMaximum number of restart attempts\n\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t<Input type=\"number\" placeholder=\"3\" {...field} />\n\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t)}\n\t\t\t\t/>\n\n\t\t\t\t<FormField\n\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\tname=\"Window\"\n\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t<FormLabel>Window (nanoseconds)</FormLabel>\n\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\tTime window to evaluate restart policy\n\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t<Input type=\"number\" placeholder=\"10000000000\" {...field} />\n\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t)}\n\t\t\t\t/>\n\n\t\t\t\t<div className=\"flex justify-end gap-2\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tform.reset({\n\t\t\t\t\t\t\t\tCondition: undefined,\n\t\t\t\t\t\t\t\tDelay: undefined,\n\t\t\t\t\t\t\t\tMaxAttempts: undefined,\n\t\t\t\t\t\t\t\tWindow: undefined,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tClear\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button type=\"submit\" isLoading={isLoading}>\n\t\t\t\t\t\tSave Restart Policy\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t</form>\n\t\t</Form>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/advanced/cluster/swarm-forms/rollback-config-form.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { api } from \"@/utils/api\";\n\nexport const rollbackConfigFormSchema = z.object({\n\tParallelism: z.coerce.number().optional(),\n\tDelay: z.coerce.number().optional(),\n\tFailureAction: z.string().optional(),\n\tMonitor: z.coerce.number().optional(),\n\tMaxFailureRatio: z.coerce.number().optional(),\n\tOrder: z.string().optional(),\n});\n\ninterface RollbackConfigFormProps {\n\tid: string;\n\ttype: \"postgres\" | \"mariadb\" | \"mongo\" | \"mysql\" | \"redis\" | \"application\";\n}\n\nexport const RollbackConfigForm = ({ id, type }: RollbackConfigFormProps) => {\n\tconst [isLoading, setIsLoading] = useState(false);\n\n\tconst queryMap = {\n\t\tpostgres: () =>\n\t\t\tapi.postgres.one.useQuery({ postgresId: id }, { enabled: !!id }),\n\t\tredis: () => api.redis.one.useQuery({ redisId: id }, { enabled: !!id }),\n\t\tmysql: () => api.mysql.one.useQuery({ mysqlId: id }, { enabled: !!id }),\n\t\tmariadb: () =>\n\t\t\tapi.mariadb.one.useQuery({ mariadbId: id }, { enabled: !!id }),\n\t\tapplication: () =>\n\t\t\tapi.application.one.useQuery({ applicationId: id }, { enabled: !!id }),\n\t\tmongo: () => api.mongo.one.useQuery({ mongoId: id }, { enabled: !!id }),\n\t};\n\tconst { data, refetch } = queryMap[type]\n\t\t? queryMap[type]()\n\t\t: api.mongo.one.useQuery({ mongoId: id }, { enabled: !!id });\n\n\tconst mutationMap = {\n\t\tpostgres: () => api.postgres.update.useMutation(),\n\t\tredis: () => api.redis.update.useMutation(),\n\t\tmysql: () => api.mysql.update.useMutation(),\n\t\tmariadb: () => api.mariadb.update.useMutation(),\n\t\tapplication: () => api.application.update.useMutation(),\n\t\tmongo: () => api.mongo.update.useMutation(),\n\t};\n\n\tconst { mutateAsync } = mutationMap[type]\n\t\t? mutationMap[type]()\n\t\t: api.mongo.update.useMutation();\n\n\tconst form = useForm<any>({\n\t\tresolver: zodResolver(rollbackConfigFormSchema),\n\t\tdefaultValues: {\n\t\t\tParallelism: undefined,\n\t\t\tDelay: undefined,\n\t\t\tFailureAction: undefined,\n\t\t\tMonitor: undefined,\n\t\t\tMaxFailureRatio: undefined,\n\t\t\tOrder: undefined,\n\t\t},\n\t});\n\n\tuseEffect(() => {\n\t\tif (data?.rollbackConfigSwarm) {\n\t\t\tform.reset(data.rollbackConfigSwarm);\n\t\t}\n\t}, [data, form]);\n\n\tconst onSubmit = async (\n\t\tformData: z.infer<typeof rollbackConfigFormSchema>,\n\t) => {\n\t\tsetIsLoading(true);\n\t\ttry {\n\t\t\t// Check if all values are empty, if so, send null to clear the database\n\t\t\tconst hasAnyValue = Object.values(formData).some(\n\t\t\t\t(value) => value !== undefined && value !== null && value !== \"\",\n\t\t\t);\n\n\t\t\tawait mutateAsync({\n\t\t\t\tapplicationId: id || \"\",\n\t\t\t\tpostgresId: id || \"\",\n\t\t\t\tredisId: id || \"\",\n\t\t\t\tmysqlId: id || \"\",\n\t\t\t\tmariadbId: id || \"\",\n\t\t\t\tmongoId: id || \"\",\n\t\t\t\trollbackConfigSwarm: (hasAnyValue ? formData : null) as any,\n\t\t\t});\n\n\t\t\ttoast.success(\"Rollback config updated successfully\");\n\t\t\trefetch();\n\t\t} catch {\n\t\t\ttoast.error(\"Error updating rollback config\");\n\t\t} finally {\n\t\t\tsetIsLoading(false);\n\t\t}\n\t};\n\n\treturn (\n\t\t<Form {...form}>\n\t\t\t<form onSubmit={form.handleSubmit(onSubmit)} className=\"space-y-4\">\n\t\t\t\t<FormField\n\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\tname=\"Parallelism\"\n\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t<FormLabel>Parallelism</FormLabel>\n\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\tNumber of tasks to rollback simultaneously\n\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t<Input type=\"number\" placeholder=\"1\" {...field} />\n\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t)}\n\t\t\t\t/>\n\n\t\t\t\t<FormField\n\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\tname=\"Delay\"\n\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t<FormLabel>Delay (nanoseconds)</FormLabel>\n\t\t\t\t\t\t\t<FormDescription>Delay between task rollbacks</FormDescription>\n\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t<Input type=\"number\" placeholder=\"10000000000\" {...field} />\n\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t)}\n\t\t\t\t/>\n\n\t\t\t\t<FormField\n\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\tname=\"FailureAction\"\n\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t<FormLabel>Failure Action</FormLabel>\n\t\t\t\t\t\t\t<FormDescription>Action on rollback failure</FormDescription>\n\t\t\t\t\t\t\t<Select onValueChange={field.onChange} value={field.value}>\n\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select failure action\" />\n\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t<SelectItem value=\"pause\">Pause</SelectItem>\n\t\t\t\t\t\t\t\t\t<SelectItem value=\"continue\">Continue</SelectItem>\n\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t)}\n\t\t\t\t/>\n\n\t\t\t\t<FormField\n\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\tname=\"Monitor\"\n\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t<FormLabel>Monitor (nanoseconds)</FormLabel>\n\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\tDuration to monitor for failure after rollback\n\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t<Input type=\"number\" placeholder=\"10000000000\" {...field} />\n\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t)}\n\t\t\t\t/>\n\n\t\t\t\t<FormField\n\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\tname=\"MaxFailureRatio\"\n\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t<FormLabel>Max Failure Ratio</FormLabel>\n\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\tMaximum failure ratio tolerated (0-1)\n\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t<Input type=\"number\" step=\"0.01\" placeholder=\"0.1\" {...field} />\n\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t)}\n\t\t\t\t/>\n\n\t\t\t\t<FormField\n\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\tname=\"Order\"\n\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t<FormLabel>Order</FormLabel>\n\t\t\t\t\t\t\t<FormDescription>Rollback order strategy</FormDescription>\n\t\t\t\t\t\t\t<Select onValueChange={field.onChange} value={field.value}>\n\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select order\" />\n\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t<SelectItem value=\"stop-first\">Stop First</SelectItem>\n\t\t\t\t\t\t\t\t\t<SelectItem value=\"start-first\">Start First</SelectItem>\n\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t)}\n\t\t\t\t/>\n\n\t\t\t\t<div className=\"flex justify-end gap-2\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tform.reset({\n\t\t\t\t\t\t\t\tParallelism: undefined,\n\t\t\t\t\t\t\t\tDelay: undefined,\n\t\t\t\t\t\t\t\tFailureAction: undefined,\n\t\t\t\t\t\t\t\tMonitor: undefined,\n\t\t\t\t\t\t\t\tMaxFailureRatio: undefined,\n\t\t\t\t\t\t\t\tOrder: undefined,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tClear\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button type=\"submit\" isLoading={isLoading}>\n\t\t\t\t\t\tSave Rollback Config\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t</form>\n\t\t</Form>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/advanced/cluster/swarm-forms/stop-grace-period-form.tsx",
    "content": "import { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { api } from \"@/utils/api\";\n\nconst hasStopGracePeriodSwarm = (\n\tvalue: unknown,\n): value is { stopGracePeriodSwarm: bigint | number | string | null } =>\n\ttypeof value === \"object\" &&\n\tvalue !== null &&\n\t\"stopGracePeriodSwarm\" in value;\n\ninterface StopGracePeriodFormProps {\n\tid: string;\n\ttype: \"postgres\" | \"mariadb\" | \"mongo\" | \"mysql\" | \"redis\" | \"application\";\n}\n\nexport const StopGracePeriodForm = ({ id, type }: StopGracePeriodFormProps) => {\n\tconst [isLoading, setIsLoading] = useState(false);\n\n\tconst queryMap = {\n\t\tpostgres: () =>\n\t\t\tapi.postgres.one.useQuery({ postgresId: id }, { enabled: !!id }),\n\t\tredis: () => api.redis.one.useQuery({ redisId: id }, { enabled: !!id }),\n\t\tmysql: () => api.mysql.one.useQuery({ mysqlId: id }, { enabled: !!id }),\n\t\tmariadb: () =>\n\t\t\tapi.mariadb.one.useQuery({ mariadbId: id }, { enabled: !!id }),\n\t\tapplication: () =>\n\t\t\tapi.application.one.useQuery({ applicationId: id }, { enabled: !!id }),\n\t\tmongo: () => api.mongo.one.useQuery({ mongoId: id }, { enabled: !!id }),\n\t};\n\tconst { data, refetch } = queryMap[type]\n\t\t? queryMap[type]()\n\t\t: api.mongo.one.useQuery({ mongoId: id }, { enabled: !!id });\n\n\tconst mutationMap = {\n\t\tpostgres: () => api.postgres.update.useMutation(),\n\t\tredis: () => api.redis.update.useMutation(),\n\t\tmysql: () => api.mysql.update.useMutation(),\n\t\tmariadb: () => api.mariadb.update.useMutation(),\n\t\tapplication: () => api.application.update.useMutation(),\n\t\tmongo: () => api.mongo.update.useMutation(),\n\t};\n\n\tconst { mutateAsync } = mutationMap[type]\n\t\t? mutationMap[type]()\n\t\t: api.mongo.update.useMutation();\n\n\tconst form = useForm<any>({\n\t\tdefaultValues: {\n\t\t\tvalue: null as bigint | null,\n\t\t},\n\t});\n\n\tuseEffect(() => {\n\t\tif (hasStopGracePeriodSwarm(data)) {\n\t\t\tconst value = data.stopGracePeriodSwarm;\n\t\t\tconst normalizedValue =\n\t\t\t\tvalue === null || value === undefined\n\t\t\t\t\t? null\n\t\t\t\t\t: typeof value === \"bigint\"\n\t\t\t\t\t\t? value\n\t\t\t\t\t\t: BigInt(value);\n\t\t\tform.reset({\n\t\t\t\tvalue: normalizedValue,\n\t\t\t});\n\t\t}\n\t}, [data, form]);\n\n\tconst onSubmit = async (formData: any) => {\n\t\tsetIsLoading(true);\n\t\ttry {\n\t\t\tawait mutateAsync({\n\t\t\t\tapplicationId: id || \"\",\n\t\t\t\tpostgresId: id || \"\",\n\t\t\t\tredisId: id || \"\",\n\t\t\t\tmysqlId: id || \"\",\n\t\t\t\tmariadbId: id || \"\",\n\t\t\t\tmongoId: id || \"\",\n\t\t\t\tstopGracePeriodSwarm: formData.value,\n\t\t\t});\n\n\t\t\ttoast.success(\"Stop grace period updated successfully\");\n\t\t\trefetch();\n\t\t} catch {\n\t\t\ttoast.error(\"Error updating stop grace period\");\n\t\t} finally {\n\t\t\tsetIsLoading(false);\n\t\t}\n\t};\n\n\treturn (\n\t\t<Form {...form}>\n\t\t\t<form onSubmit={form.handleSubmit(onSubmit)} className=\"space-y-4\">\n\t\t\t\t<FormField\n\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\tname=\"value\"\n\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t<FormLabel>Stop Grace Period (nanoseconds)</FormLabel>\n\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\tTime to wait before forcefully killing the container\n\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\tExamples: 30000000000 (30s), 120000000000 (2m)\n\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\t\t\t\tplaceholder=\"30000000000\"\n\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t\t\t\tfield?.value !== null && field?.value !== undefined\n\t\t\t\t\t\t\t\t\t\t\t? field.value.toString()\n\t\t\t\t\t\t\t\t\t\t\t: \"\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tonChange={(e) =>\n\t\t\t\t\t\t\t\t\t\tfield.onChange(\n\t\t\t\t\t\t\t\t\t\t\te.target.value ? BigInt(e.target.value) : null,\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t)}\n\t\t\t\t/>\n\n\t\t\t\t<div className=\"flex justify-end gap-2\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tform.reset({\n\t\t\t\t\t\t\t\tvalue: null,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tClear\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button type=\"submit\" isLoading={isLoading}>\n\t\t\t\t\t\tSave Stop Grace Period\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t</form>\n\t\t</Form>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/advanced/cluster/swarm-forms/update-config-form.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { api } from \"@/utils/api\";\n\nexport const updateConfigFormSchema = z.object({\n\tParallelism: z.coerce.number().optional(),\n\tDelay: z.coerce.number().optional(),\n\tFailureAction: z.string().optional(),\n\tMonitor: z.coerce.number().optional(),\n\tMaxFailureRatio: z.coerce.number().optional(),\n\tOrder: z.string().optional(),\n});\n\ninterface UpdateConfigFormProps {\n\tid: string;\n\ttype: \"postgres\" | \"mariadb\" | \"mongo\" | \"mysql\" | \"redis\" | \"application\";\n}\n\nexport const UpdateConfigForm = ({ id, type }: UpdateConfigFormProps) => {\n\tconst [isLoading, setIsLoading] = useState(false);\n\n\tconst queryMap = {\n\t\tpostgres: () =>\n\t\t\tapi.postgres.one.useQuery({ postgresId: id }, { enabled: !!id }),\n\t\tredis: () => api.redis.one.useQuery({ redisId: id }, { enabled: !!id }),\n\t\tmysql: () => api.mysql.one.useQuery({ mysqlId: id }, { enabled: !!id }),\n\t\tmariadb: () =>\n\t\t\tapi.mariadb.one.useQuery({ mariadbId: id }, { enabled: !!id }),\n\t\tapplication: () =>\n\t\t\tapi.application.one.useQuery({ applicationId: id }, { enabled: !!id }),\n\t\tmongo: () => api.mongo.one.useQuery({ mongoId: id }, { enabled: !!id }),\n\t};\n\tconst { data, refetch } = queryMap[type]\n\t\t? queryMap[type]()\n\t\t: api.mongo.one.useQuery({ mongoId: id }, { enabled: !!id });\n\n\tconst mutationMap = {\n\t\tpostgres: () => api.postgres.update.useMutation(),\n\t\tredis: () => api.redis.update.useMutation(),\n\t\tmysql: () => api.mysql.update.useMutation(),\n\t\tmariadb: () => api.mariadb.update.useMutation(),\n\t\tapplication: () => api.application.update.useMutation(),\n\t\tmongo: () => api.mongo.update.useMutation(),\n\t};\n\n\tconst { mutateAsync } = mutationMap[type]\n\t\t? mutationMap[type]()\n\t\t: api.mongo.update.useMutation();\n\n\tconst form = useForm<any>({\n\t\tresolver: zodResolver(updateConfigFormSchema),\n\t\tdefaultValues: {\n\t\t\tParallelism: undefined,\n\t\t\tDelay: undefined,\n\t\t\tFailureAction: undefined,\n\t\t\tMonitor: undefined,\n\t\t\tMaxFailureRatio: undefined,\n\t\t\tOrder: undefined,\n\t\t},\n\t});\n\n\tuseEffect(() => {\n\t\tif (data?.updateConfigSwarm) {\n\t\t\tconst config = data.updateConfigSwarm;\n\t\t\tform.reset({\n\t\t\t\tParallelism: config.Parallelism,\n\t\t\t\tDelay: config.Delay,\n\t\t\t\tFailureAction: config.FailureAction,\n\t\t\t\tMonitor: config.Monitor,\n\t\t\t\tMaxFailureRatio: config.MaxFailureRatio,\n\t\t\t\tOrder: config.Order,\n\t\t\t});\n\t\t}\n\t}, [data, form]);\n\n\tconst onSubmit = async (formData: z.infer<typeof updateConfigFormSchema>) => {\n\t\tsetIsLoading(true);\n\t\ttry {\n\t\t\t// Check if all values are empty, if so, send null to clear the database\n\t\t\tconst hasAnyValue = Object.values(formData).some(\n\t\t\t\t(value) => value !== undefined && value !== null && value !== \"\",\n\t\t\t);\n\n\t\t\tawait mutateAsync({\n\t\t\t\tapplicationId: id || \"\",\n\t\t\t\tpostgresId: id || \"\",\n\t\t\t\tredisId: id || \"\",\n\t\t\t\tmysqlId: id || \"\",\n\t\t\t\tmariadbId: id || \"\",\n\t\t\t\tmongoId: id || \"\",\n\t\t\t\tupdateConfigSwarm: (hasAnyValue ? formData : null) as any,\n\t\t\t});\n\n\t\t\ttoast.success(\"Update config updated successfully\");\n\t\t\trefetch();\n\t\t} catch {\n\t\t\ttoast.error(\"Error updating update config\");\n\t\t} finally {\n\t\t\tsetIsLoading(false);\n\t\t}\n\t};\n\n\treturn (\n\t\t<Form {...form}>\n\t\t\t<form onSubmit={form.handleSubmit(onSubmit)} className=\"space-y-4\">\n\t\t\t\t<FormField\n\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\tname=\"Parallelism\"\n\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t<FormLabel>Parallelism</FormLabel>\n\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\tNumber of tasks to update simultaneously\n\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t<Input type=\"number\" placeholder=\"1\" {...field} />\n\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t)}\n\t\t\t\t/>\n\n\t\t\t\t<FormField\n\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\tname=\"Delay\"\n\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t<FormLabel>Delay (nanoseconds)</FormLabel>\n\t\t\t\t\t\t\t<FormDescription>Delay between task updates</FormDescription>\n\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t<Input type=\"number\" placeholder=\"10000000000\" {...field} />\n\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t)}\n\t\t\t\t/>\n\n\t\t\t\t<FormField\n\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\tname=\"FailureAction\"\n\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t<FormLabel>Failure Action</FormLabel>\n\t\t\t\t\t\t\t<FormDescription>Action on update failure</FormDescription>\n\t\t\t\t\t\t\t<Select onValueChange={field.onChange} value={field.value}>\n\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select failure action\" />\n\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t<SelectItem value=\"pause\">Pause</SelectItem>\n\t\t\t\t\t\t\t\t\t<SelectItem value=\"continue\">Continue</SelectItem>\n\t\t\t\t\t\t\t\t\t<SelectItem value=\"rollback\">Rollback</SelectItem>\n\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t)}\n\t\t\t\t/>\n\n\t\t\t\t<FormField\n\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\tname=\"Monitor\"\n\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t<FormLabel>Monitor (nanoseconds)</FormLabel>\n\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\tDuration to monitor for failure after update\n\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t<Input type=\"number\" placeholder=\"10000000000\" {...field} />\n\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t)}\n\t\t\t\t/>\n\n\t\t\t\t<FormField\n\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\tname=\"MaxFailureRatio\"\n\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t<FormLabel>Max Failure Ratio</FormLabel>\n\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\tMaximum failure ratio tolerated (0-1)\n\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t<Input type=\"number\" step=\"0.01\" placeholder=\"0.1\" {...field} />\n\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t)}\n\t\t\t\t/>\n\n\t\t\t\t<FormField\n\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\tname=\"Order\"\n\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t<FormLabel>Order</FormLabel>\n\t\t\t\t\t\t\t<FormDescription>Update order strategy</FormDescription>\n\t\t\t\t\t\t\t<Select onValueChange={field.onChange} value={field.value}>\n\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select order\" />\n\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t<SelectItem value=\"stop-first\">Stop First</SelectItem>\n\t\t\t\t\t\t\t\t\t<SelectItem value=\"start-first\">Start First</SelectItem>\n\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t)}\n\t\t\t\t/>\n\n\t\t\t\t<div className=\"flex justify-end gap-2\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tform.reset({\n\t\t\t\t\t\t\t\tParallelism: undefined,\n\t\t\t\t\t\t\t\tDelay: undefined,\n\t\t\t\t\t\t\t\tFailureAction: undefined,\n\t\t\t\t\t\t\t\tMonitor: undefined,\n\t\t\t\t\t\t\t\tMaxFailureRatio: undefined,\n\t\t\t\t\t\t\t\tOrder: undefined,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tClear\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button type=\"submit\" isLoading={isLoading}>\n\t\t\t\t\t\tSave Update Config\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t</form>\n\t\t</Form>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/advanced/cluster/swarm-forms/utils.ts",
    "content": "/**\n * Filters out undefined, null, and empty string values from form data\n * Only returns fields that have actual values\n */\nexport const filterEmptyValues = (\n\tformData: Record<string, any>,\n): Record<string, any> => {\n\treturn Object.entries(formData).reduce(\n\t\t(acc, [key, value]) => {\n\t\t\t// Keep arrays even if empty (they might be intentionally cleared)\n\t\t\tif (Array.isArray(value)) {\n\t\t\t\tif (value.length > 0) {\n\t\t\t\t\tacc[key] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// For other values, filter out undefined, null, and empty strings\n\t\t\telse if (value !== undefined && value !== null && value !== \"\") {\n\t\t\t\tacc[key] = value;\n\t\t\t}\n\t\t\treturn acc;\n\t\t},\n\t\t{} as Record<string, any>,\n\t);\n};\n\n/**\n * Checks if filtered data has any values to save\n */\nexport const hasValues = (data: Record<string, any>): boolean => {\n\treturn Object.keys(data).length > 0;\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/advanced/general/add-command.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { Plus, Trash2 } from \"lucide-react\";\nimport { useEffect } from \"react\";\nimport { useFieldArray, useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { api } from \"@/utils/api\";\n\ninterface Props {\n\tapplicationId: string;\n}\n\nconst AddRedirectSchema = z.object({\n\tcommand: z.string(),\n\targs: z\n\t\t.array(\n\t\t\tz.object({\n\t\t\t\tvalue: z.string().min(1, \"Argument cannot be empty\"),\n\t\t\t}),\n\t\t)\n\t\t.optional(),\n});\n\ntype AddCommand = z.infer<typeof AddRedirectSchema>;\n\nexport const AddCommand = ({ applicationId }: Props) => {\n\tconst { data } = api.application.one.useQuery(\n\t\t{\n\t\t\tapplicationId,\n\t\t},\n\t\t{ enabled: !!applicationId },\n\t);\n\n\tconst utils = api.useUtils();\n\n\tconst { mutateAsync, isPending } = api.application.update.useMutation();\n\n\tconst form = useForm<AddCommand>({\n\t\tdefaultValues: {\n\t\t\tcommand: \"\",\n\t\t\targs: [],\n\t\t},\n\t\tresolver: zodResolver(AddRedirectSchema),\n\t});\n\n\tconst { fields, append, remove } = useFieldArray({\n\t\tcontrol: form.control,\n\t\tname: \"args\",\n\t});\n\n\tuseEffect(() => {\n\t\tif (data) {\n\t\t\tform.reset({\n\t\t\t\tcommand: data?.command || \"\",\n\t\t\t\targs: data?.args?.map((arg) => ({ value: arg })) || [],\n\t\t\t});\n\t\t}\n\t}, [data, form]);\n\n\tconst onSubmit = async (data: AddCommand) => {\n\t\tawait mutateAsync({\n\t\t\tapplicationId,\n\t\t\tcommand: data?.command,\n\t\t\targs: data?.args?.map((arg) => arg.value).filter(Boolean),\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(\"Command Updated\");\n\t\t\t\tawait utils.application.one.invalidate({\n\t\t\t\t\tapplicationId,\n\t\t\t\t});\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error updating the command\");\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<Card className=\"bg-background\">\n\t\t\t<CardHeader className=\"flex flex-row justify-between\">\n\t\t\t\t<div>\n\t\t\t\t\t<CardTitle className=\"text-xl\">Run Command</CardTitle>\n\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\tRun a custom command in the container after the application\n\t\t\t\t\t\tinitialized\n\t\t\t\t\t</CardDescription>\n\t\t\t\t</div>\n\t\t\t</CardHeader>\n\t\t\t<CardContent className=\"flex flex-col gap-4\">\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\tclassName=\"grid w-full gap-4\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"command\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Command</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"/bin/sh\" {...field} />\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t<div className=\"space-y-2\">\n\t\t\t\t\t\t\t\t<div className=\"flex items-center justify-between\">\n\t\t\t\t\t\t\t\t\t<FormLabel>Arguments (Args)</FormLabel>\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\tonClick={() => append({ value: \"\" })}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Plus className=\"h-4 w-4 mr-1\" />\n\t\t\t\t\t\t\t\t\t\tAdd Argument\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t{fields.length === 0 && (\n\t\t\t\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\tNo arguments added yet. Click \"Add Argument\" to add one.\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{fields.map((field, index) => (\n\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\tkey={field.id}\n\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\tname={`args.${index}.value`}\n\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tindex === 0 ? \"-c\" : \"echo Hello World\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"destructive\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => remove(index)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Trash2 className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"flex justify-end\">\n\t\t\t\t\t\t\t<Button isLoading={isPending} type=\"submit\" className=\"w-fit\">\n\t\t\t\t\t\t\t\tSave\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</form>\n\t\t\t\t</Form>\n\t\t\t</CardContent>\n\t\t</Card>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/advanced/import/show-import.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { Code2, Globe2, HardDrive } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { CodeEditor } from \"@/components/shared/code-editor\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogHeader,\n\tDialogTitle,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { ScrollArea } from \"@/components/ui/scroll-area\";\nimport { Separator } from \"@/components/ui/separator\";\nimport { Textarea } from \"@/components/ui/textarea\";\nimport { api } from \"@/utils/api\";\n\nconst ImportSchema = z.object({\n\tbase64: z.string(),\n});\n\ntype ImportType = z.infer<typeof ImportSchema>;\n\ninterface Props {\n\tcomposeId: string;\n}\n\nexport const ShowImport = ({ composeId }: Props) => {\n\tconst [showModal, setShowModal] = useState(false);\n\tconst [showMountContent, setShowMountContent] = useState(false);\n\tconst [selectedMount, setSelectedMount] = useState<{\n\t\tfilePath: string;\n\t\tcontent: string;\n\t} | null>(null);\n\tconst [templateInfo, setTemplateInfo] = useState<{\n\t\tcompose: string;\n\t\ttemplate: {\n\t\t\tdomains: Array<{\n\t\t\t\tserviceName: string;\n\t\t\t\tport: number;\n\t\t\t\tpath?: string;\n\t\t\t\thost?: string;\n\t\t\t}>;\n\t\t\tenvs: string[];\n\t\t\tmounts: Array<{\n\t\t\t\tfilePath: string;\n\t\t\t\tcontent: string;\n\t\t\t}>;\n\t\t};\n\t} | null>(null);\n\n\tconst utils = api.useUtils();\n\tconst { mutateAsync: processTemplate, isPending: isLoadingTemplate } =\n\t\tapi.compose.processTemplate.useMutation();\n\tconst {\n\t\tmutateAsync: importTemplate,\n\t\tisPending: isImporting,\n\t\tisSuccess: isImportSuccess,\n\t} = api.compose.import.useMutation();\n\n\tconst form = useForm<ImportType>({\n\t\tdefaultValues: {\n\t\t\tbase64: \"\",\n\t\t},\n\t\tresolver: zodResolver(ImportSchema),\n\t});\n\n\tuseEffect(() => {\n\t\tform.reset({\n\t\t\tbase64: \"\",\n\t\t});\n\t}, [isImportSuccess]);\n\n\tconst onSubmit = async () => {\n\t\tconst base64 = form.getValues(\"base64\");\n\t\tif (!base64) {\n\t\t\ttoast.error(\"Please enter a base64 template\");\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tawait importTemplate({\n\t\t\t\tcomposeId,\n\t\t\t\tbase64,\n\t\t\t});\n\t\t\ttoast.success(\"Template imported successfully\");\n\t\t\tawait utils.compose.one.invalidate({\n\t\t\t\tcomposeId,\n\t\t\t});\n\t\t\tsetShowModal(false);\n\t\t} catch {\n\t\t\ttoast.error(\"Error importing template\");\n\t\t}\n\t};\n\n\tconst handleLoadTemplate = async () => {\n\t\tconst base64 = form.getValues(\"base64\");\n\t\tif (!base64) {\n\t\t\ttoast.error(\"Please enter a base64 template\");\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tconst result = await processTemplate({\n\t\t\t\tcomposeId,\n\t\t\t\tbase64,\n\t\t\t});\n\t\t\tsetTemplateInfo(result);\n\t\t\tsetShowModal(true);\n\t\t} catch {\n\t\t\ttoast.error(\"Error processing template\");\n\t\t}\n\t};\n\n\tconst handleShowMountContent = (mount: {\n\t\tfilePath: string;\n\t\tcontent: string;\n\t}) => {\n\t\tsetSelectedMount(mount);\n\t\tsetShowMountContent(true);\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<Card className=\"bg-background\">\n\t\t\t\t<CardHeader>\n\t\t\t\t\t<CardTitle className=\"text-xl\">Import</CardTitle>\n\t\t\t\t\t<CardDescription>Import your Template configuration</CardDescription>\n\t\t\t\t</CardHeader>\n\t\t\t\t<CardContent className=\"flex flex-col gap-4\">\n\t\t\t\t\t<AlertBlock type=\"warning\">\n\t\t\t\t\t\tWarning: Importing a template will remove all existing environment\n\t\t\t\t\t\tvariables, mounts, and domains from this service.\n\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t<Form {...form}>\n\t\t\t\t\t\t<form\n\t\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\t\tclassName=\"grid w-full gap-4\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"base64\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Configuration (Base64)</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Textarea\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Enter your Base64 configuration here...\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"font-mono min-h-[200px]\"\n\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<div className=\"flex justify-end gap-2\">\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\tclassName=\"w-fit\"\n\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\tisLoading={isLoadingTemplate}\n\t\t\t\t\t\t\t\t\tonClick={handleLoadTemplate}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tLoad\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<Dialog open={showModal} onOpenChange={setShowModal}>\n\t\t\t\t\t\t\t\t<DialogContent className=\"max-w-[50vw]\">\n\t\t\t\t\t\t\t\t\t<DialogHeader>\n\t\t\t\t\t\t\t\t\t\t<DialogTitle className=\"text-2xl font-bold\">\n\t\t\t\t\t\t\t\t\t\t\tTemplate Information\n\t\t\t\t\t\t\t\t\t\t</DialogTitle>\n\t\t\t\t\t\t\t\t\t\t<DialogDescription className=\"space-y-2\">\n\t\t\t\t\t\t\t\t\t\t\t<p>Review the template information before importing</p>\n\t\t\t\t\t\t\t\t\t\t\t<AlertBlock type=\"warning\">\n\t\t\t\t\t\t\t\t\t\t\t\tWarning: This will remove all existing environment\n\t\t\t\t\t\t\t\t\t\t\t\tvariables, mounts, and domains from this service.\n\t\t\t\t\t\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t\t\t\t\t\t</DialogDescription>\n\t\t\t\t\t\t\t\t\t</DialogHeader>\n\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-6\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-4\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t<Code2 className=\"h-5 w-5 text-primary\" />\n\t\t\t\t\t\t\t\t\t\t\t\t<h3 className=\"text-lg font-semibold\">\n\t\t\t\t\t\t\t\t\t\t\t\t\tDocker Compose\n\t\t\t\t\t\t\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<CodeEditor\n\t\t\t\t\t\t\t\t\t\t\t\tlanguage=\"yaml\"\n\t\t\t\t\t\t\t\t\t\t\t\tvalue={templateInfo?.compose || \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"font-mono\"\n\t\t\t\t\t\t\t\t\t\t\t\treadOnly\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t<Separator />\n\n\t\t\t\t\t\t\t\t\t\t{templateInfo?.template.domains &&\n\t\t\t\t\t\t\t\t\t\t\ttemplateInfo.template.domains.length > 0 && (\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-4\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Globe2 className=\"h-5 w-5 text-primary\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h3 className=\"text-lg font-semibold\">Domains</h3>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"grid grid-cols-1 gap-3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{templateInfo.template.domains.map(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(domain, index) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={index}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"rounded-lg border bg-card p-3 text-card-foreground shadow-sm\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"font-medium\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{domain.serviceName}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"text-sm text-muted-foreground space-y-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div>Port: {domain.port}</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{domain.host && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div>Host: {domain.host}</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{domain.path && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div>Path: {domain.path}</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t\t{templateInfo?.template.envs &&\n\t\t\t\t\t\t\t\t\t\t\ttemplateInfo.template.envs.length > 0 && (\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-4\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Code2 className=\"h-5 w-5 text-primary\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h3 className=\"text-lg font-semibold\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tEnvironment Variables\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"grid grid-cols-1 gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{templateInfo.template.envs.map((env, index) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={index}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"rounded-lg truncate border bg-card p-2 font-mono text-sm\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{env}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t\t{templateInfo?.template.mounts &&\n\t\t\t\t\t\t\t\t\t\t\ttemplateInfo.template.mounts.length > 0 && (\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-4\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<HardDrive className=\"h-5 w-5 text-primary\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h3 className=\"text-lg font-semibold\">Mounts</h3>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"grid grid-cols-1 gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{templateInfo.template.mounts.map(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(mount, index) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={index}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"rounded-lg border bg-card p-2 font-mono text-sm hover:bg-accent cursor-pointer transition-colors\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => handleShowMountContent(mount)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{mount.filePath}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t<div className=\"flex justify-end gap-2 pt-4\">\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={() => setShowModal(false)}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\tCancel\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tisLoading={isImporting}\n\t\t\t\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-fit\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\tImport\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</DialogContent>\n\t\t\t\t\t\t\t</Dialog>\n\t\t\t\t\t\t</form>\n\t\t\t\t\t</Form>\n\t\t\t\t</CardContent>\n\t\t\t</Card>\n\n\t\t\t<Dialog open={showMountContent} onOpenChange={setShowMountContent}>\n\t\t\t\t<DialogContent className=\"max-w-[50vw]\">\n\t\t\t\t\t<DialogHeader>\n\t\t\t\t\t\t<DialogTitle className=\"text-xl font-bold\">\n\t\t\t\t\t\t\t{selectedMount?.filePath}\n\t\t\t\t\t\t</DialogTitle>\n\t\t\t\t\t\t<DialogDescription>Mount File Content</DialogDescription>\n\t\t\t\t\t</DialogHeader>\n\n\t\t\t\t\t<ScrollArea className=\"h-[45vh] pr-4\">\n\t\t\t\t\t\t<CodeEditor\n\t\t\t\t\t\t\tlanguage=\"yaml\"\n\t\t\t\t\t\t\tvalue={selectedMount?.content || \"\"}\n\t\t\t\t\t\t\tclassName=\"font-mono\"\n\t\t\t\t\t\t\treadOnly\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ScrollArea>\n\n\t\t\t\t\t<div className=\"flex justify-end gap-2 pt-4\">\n\t\t\t\t\t\t<Button onClick={() => setShowMountContent(false)}>Close</Button>\n\t\t\t\t\t</div>\n\t\t\t\t</DialogContent>\n\t\t\t</Dialog>\n\t\t</>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/advanced/ports/handle-ports.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { PenBoxIcon, PlusIcon } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { useForm, useWatch } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { api } from \"@/utils/api\";\n\nconst AddPortSchema = z.object({\n\tpublishedPort: z.number().int().min(1).max(65535),\n\tpublishMode: z.enum([\"ingress\", \"host\"]),\n\ttargetPort: z.number().int().min(1).max(65535),\n\tprotocol: z.enum([\"tcp\", \"udp\"]),\n});\n\ntype AddPort = z.infer<typeof AddPortSchema>;\n\ninterface Props {\n\tapplicationId: string;\n\tportId?: string;\n\tchildren?: React.ReactNode;\n}\n\nexport const HandlePorts = ({\n\tapplicationId,\n\tportId,\n\tchildren = <PlusIcon className=\"h-4 w-4\" />,\n}: Props) => {\n\tconst [isOpen, setIsOpen] = useState(false);\n\tconst utils = api.useUtils();\n\n\tconst { data } = api.port.one.useQuery(\n\t\t{\n\t\t\tportId: portId ?? \"\",\n\t\t},\n\t\t{\n\t\t\tenabled: !!portId,\n\t\t},\n\t);\n\tconst { mutateAsync, isPending, error, isError } = portId\n\t\t? api.port.update.useMutation()\n\t\t: api.port.create.useMutation();\n\n\tconst form = useForm<AddPort>({\n\t\tdefaultValues: {\n\t\t\tpublishedPort: 0,\n\t\t\ttargetPort: 0,\n\t\t},\n\t\tresolver: zodResolver(AddPortSchema),\n\t});\n\n\tconst publishMode = useWatch({\n\t\tcontrol: form.control,\n\t\tname: \"publishMode\",\n\t});\n\n\tuseEffect(() => {\n\t\tform.reset({\n\t\t\tpublishedPort: data?.publishedPort ?? 0,\n\t\t\tpublishMode: data?.publishMode ?? \"ingress\",\n\t\t\ttargetPort: data?.targetPort ?? 0,\n\t\t\tprotocol: data?.protocol ?? \"tcp\",\n\t\t});\n\t}, [form, form.reset, form.formState.isSubmitSuccessful, data]);\n\n\tconst onSubmit = async (data: AddPort) => {\n\t\tawait mutateAsync({\n\t\t\tapplicationId,\n\t\t\t...data,\n\t\t\tportId: portId || \"\",\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(portId ? \"Port Updated\" : \"Port Created\");\n\t\t\t\tawait utils.application.one.invalidate({\n\t\t\t\t\tapplicationId,\n\t\t\t\t});\n\t\t\t\tsetIsOpen(false);\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\n\t\t\t\t\tportId ? \"Error updating the port\" : \"Error creating the port\",\n\t\t\t\t);\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t{portId ? (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\tclassName=\"group hover:bg-blue-500/10 \"\n\t\t\t\t\t>\n\t\t\t\t\t\t<PenBoxIcon className=\"size-3.5  text-primary group-hover:text-blue-500\" />\n\t\t\t\t\t</Button>\n\t\t\t\t) : (\n\t\t\t\t\t<Button>{children}</Button>\n\t\t\t\t)}\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-lg\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Ports</DialogTitle>\n\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\tPorts are used to expose your application to the internet.\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t{isError && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tid=\"hook-form-add-port\"\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\tclassName=\"grid w-full gap-4\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"publishedPort\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Published Port</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"1-65535\"\n\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value?.toString() || \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst value = e.target.value;\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (value === \"\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst number = Number.parseInt(value, 10);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!Number.isNaN(number)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(number);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"publishMode\"\n\t\t\t\t\t\t\t\trender={({ field }) => {\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<FormItem className=\"md:col-span-2\">\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Published Port Mode</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\t\t\tonValueChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a publish mode for the port\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value={\"ingress\"}>Ingress</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value={\"host\"}>Host</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"targetPort\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Target Port</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"1-65535\"\n\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value?.toString() || \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst value = e.target.value;\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (value === \"\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst number = Number.parseInt(value, 10);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!Number.isNaN(number)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(number);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"protocol\"\n\t\t\t\t\t\t\t\trender={({ field }) => {\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<FormItem className=\"md:col-span-2\">\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Protocol</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\t\t\tonValueChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a protocol\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value={\"tcp\"}>TCP</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value={\"udp\"}>UDP</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</form>\n\n\t\t\t\t\t{publishMode === \"host\" && (\n\t\t\t\t\t\t<AlertBlock type=\"warning\" className=\"mt-4\">\n\t\t\t\t\t\t\t<strong>Host Mode Limitation:</strong> When using Host publish\n\t\t\t\t\t\t\tmode, Docker Swarm has limitations that prevent proper container\n\t\t\t\t\t\t\tupdates during deployments. Old containers may not be replaced\n\t\t\t\t\t\t\tautomatically. Consider using Ingress mode instead, or be prepared\n\t\t\t\t\t\t\tto manually stop/start the application after deployments.\n\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t)}\n\n\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tisLoading={isPending}\n\t\t\t\t\t\t\tform=\"hook-form-add-port\"\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{portId ? \"Update\" : \"Create\"}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</DialogFooter>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/advanced/ports/show-port.tsx",
    "content": "import { Rss, Trash2 } from \"lucide-react\";\nimport { toast } from \"sonner\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { DialogAction } from \"@/components/shared/dialog-action\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport { api } from \"@/utils/api\";\nimport { HandlePorts } from \"./handle-ports\";\n\ninterface Props {\n\tapplicationId: string;\n}\n\nexport const ShowPorts = ({ applicationId }: Props) => {\n\tconst { data, refetch } = api.application.one.useQuery(\n\t\t{\n\t\t\tapplicationId,\n\t\t},\n\t\t{ enabled: !!applicationId },\n\t);\n\n\tconst { mutateAsync: deletePort, isPending: isRemoving } =\n\t\tapi.port.delete.useMutation();\n\n\treturn (\n\t\t<Card className=\"bg-background\">\n\t\t\t<CardHeader className=\"flex flex-row justify-between flex-wrap gap-4\">\n\t\t\t\t<div>\n\t\t\t\t\t<CardTitle className=\"text-xl\">Ports</CardTitle>\n\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\tthe ports allows you to expose your application to the internet\n\t\t\t\t\t</CardDescription>\n\t\t\t\t</div>\n\n\t\t\t\t{data && data?.ports.length > 0 && (\n\t\t\t\t\t<HandlePorts applicationId={applicationId}>Add Port</HandlePorts>\n\t\t\t\t)}\n\t\t\t</CardHeader>\n\t\t\t<CardContent className=\"flex flex-col gap-4\">\n\t\t\t\t{data?.ports.length === 0 ? (\n\t\t\t\t\t<div className=\"flex w-full flex-col items-center justify-center gap-3 pt-10\">\n\t\t\t\t\t\t<Rss className=\"size-8 text-muted-foreground\" />\n\t\t\t\t\t\t<span className=\"text-base text-muted-foreground\">\n\t\t\t\t\t\t\tNo ports configured\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<HandlePorts applicationId={applicationId}>Add Port</HandlePorts>\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<div className=\"flex flex-col pt-2 gap-4\">\n\t\t\t\t\t\t<AlertBlock type=\"info\">\n\t\t\t\t\t\t\tPlease remember to click Redeploy after adding, editing, or\n\t\t\t\t\t\t\tdeleting the ports to apply the changes.\n\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t\t<div className=\"flex flex-col gap-6\">\n\t\t\t\t\t\t\t{data?.ports.map((port) => (\n\t\t\t\t\t\t\t\t<div key={port.portId}>\n\t\t\t\t\t\t\t\t\t<div className=\"flex w-full flex-col sm:flex-row sm:items-center justify-between gap-4 sm:gap-10 border rounded-lg p-4\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 flex-col gap-4 sm:gap-8\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-medium\">Published Port</span>\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{port.publishedPort}\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-medium\">Published Port Mode</span>\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{port?.publishMode?.toUpperCase()}\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-medium\">Target Port</span>\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{port.targetPort}\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-medium\">Protocol</span>\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{port.protocol.toUpperCase()}\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-4\">\n\t\t\t\t\t\t\t\t\t\t\t<HandlePorts\n\t\t\t\t\t\t\t\t\t\t\t\tapplicationId={applicationId}\n\t\t\t\t\t\t\t\t\t\t\t\tportId={port.portId}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"Delete Port\"\n\t\t\t\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to delete this port?\"\n\t\t\t\t\t\t\t\t\t\t\t\ttype=\"destructive\"\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tawait deletePort({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tportId: port.portId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Port deleted successfully\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error deleting port\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"group hover:bg-red-500/10 \"\n\t\t\t\t\t\t\t\t\t\t\t\t\tisLoading={isRemoving}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Trash2 className=\"size-4 text-primary group-hover:text-red-500\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</CardContent>\n\t\t</Card>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/advanced/redirects/handle-redirect.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { PenBoxIcon, PlusIcon } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { Label } from \"@/components/ui/label\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { Separator } from \"@/components/ui/separator\";\nimport { Switch } from \"@/components/ui/switch\";\nimport { api } from \"@/utils/api\";\n\nconst AddRedirectchema = z.object({\n\tregex: z.string().min(1, \"Regex required\"),\n\tpermanent: z.boolean().default(false),\n\treplacement: z.string().min(1, \"Replacement required\"),\n});\n\ntype AddRedirect = z.infer<typeof AddRedirectchema>;\n\n// Default presets\nconst redirectPresets = [\n\t// {\n\t// \tlabel: \"Allow www & non-www.\",\n\t// \tredirect: {\n\t// \t\tregex: \"\",\n\t// \t\tpermanent: false,\n\t// \t\treplacement: \"\",\n\t// \t},\n\t// },\n\t{\n\t\tid: \"to-www\",\n\t\tlabel: \"Redirect to www\",\n\t\tredirect: {\n\t\t\tregex: \"^https?://(?:www.)?(.+)\",\n\t\t\tpermanent: true,\n\t\t\treplacement: \"https://www.${1}\",\n\t\t},\n\t},\n\t{\n\t\tid: \"to-non-www\",\n\t\tlabel: \"Redirect to non-www\",\n\t\tredirect: {\n\t\t\tregex: \"^https?://www.(.+)\",\n\t\t\tpermanent: true,\n\t\t\treplacement: \"https://${1}\",\n\t\t},\n\t},\n];\n\ninterface Props {\n\tapplicationId: string;\n\tredirectId?: string;\n\tchildren?: React.ReactNode;\n}\n\nexport const HandleRedirect = ({\n\tapplicationId,\n\tredirectId,\n\tchildren = <PlusIcon className=\"w-4 h-4\" />,\n}: Props) => {\n\tconst [isOpen, setIsOpen] = useState(false);\n\tconst [presetSelected, setPresetSelected] = useState(\"\");\n\n\tconst { data, refetch } = api.redirects.one.useQuery(\n\t\t{\n\t\t\tredirectId: redirectId || \"\",\n\t\t},\n\t\t{\n\t\t\tenabled: !!redirectId,\n\t\t},\n\t);\n\n\tconst utils = api.useUtils();\n\n\tconst { mutateAsync, isPending, error, isError } = redirectId\n\t\t? api.redirects.update.useMutation()\n\t\t: api.redirects.create.useMutation();\n\n\tconst form = useForm({\n\t\tdefaultValues: {\n\t\t\tpermanent: false,\n\t\t\tregex: \"\",\n\t\t\treplacement: \"\",\n\t\t},\n\t\tresolver: zodResolver(AddRedirectchema),\n\t});\n\n\tuseEffect(() => {\n\t\tform.reset({\n\t\t\tpermanent: data?.permanent || false,\n\t\t\tregex: data?.regex || \"\",\n\t\t\treplacement: data?.replacement || \"\",\n\t\t});\n\t}, [form, form.reset, form.formState.isSubmitSuccessful, data]);\n\n\tconst onSubmit = async (data: AddRedirect) => {\n\t\tawait mutateAsync({\n\t\t\tapplicationId,\n\t\t\t...data,\n\t\t\tredirectId: redirectId || \"\",\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(redirectId ? \"Redirect Updated\" : \"Redirect Created\");\n\t\t\t\tawait utils.application.one.invalidate({\n\t\t\t\t\tapplicationId,\n\t\t\t\t});\n\t\t\t\trefetch();\n\t\t\t\tawait utils.application.readTraefikConfig.invalidate({\n\t\t\t\t\tapplicationId,\n\t\t\t\t});\n\t\t\t\tonDialogToggle(false);\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\n\t\t\t\t\tredirectId\n\t\t\t\t\t\t? \"Error updating the redirect\"\n\t\t\t\t\t\t: \"Error creating the redirect\",\n\t\t\t\t);\n\t\t\t});\n\t};\n\n\tconst onDialogToggle = (open: boolean) => {\n\t\tsetIsOpen(open);\n\t\t// commented for the moment because not reseting the form if accidentally closed the dialog can be considered as a feature instead of a bug\n\t\t// setPresetSelected(\"\");\n\t\t// form.reset();\n\t};\n\n\tconst onPresetSelect = (presetId: string) => {\n\t\tconst redirectPreset = redirectPresets.find(\n\t\t\t(preset) => preset.id === presetId,\n\t\t)?.redirect;\n\t\tif (!redirectPreset) return;\n\t\tconst { regex, permanent, replacement } = redirectPreset;\n\t\tform.reset({ regex, permanent, replacement }, { keepDefaultValues: true });\n\t\tsetPresetSelected(presetId);\n\t};\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={onDialogToggle}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t{redirectId ? (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\tclassName=\"group hover:bg-blue-500/10 \"\n\t\t\t\t\t>\n\t\t\t\t\t\t<PenBoxIcon className=\"size-3.5  text-primary group-hover:text-blue-500\" />\n\t\t\t\t\t</Button>\n\t\t\t\t) : (\n\t\t\t\t\t<Button>{children}</Button>\n\t\t\t\t)}\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-lg\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Redirects</DialogTitle>\n\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\tRedirects are used to redirect requests to another url.\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t{isError && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\n\t\t\t\t<div className=\"md:col-span-2\">\n\t\t\t\t\t<Label>Presets</Label>\n\t\t\t\t\t<Select onValueChange={onPresetSelect} value={presetSelected}>\n\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t<SelectValue placeholder=\"No preset selected\" />\n\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t{redirectPresets.map((preset) => (\n\t\t\t\t\t\t\t\t<SelectItem key={preset.label} value={preset.id}>\n\t\t\t\t\t\t\t\t\t{preset.label}\n\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t</Select>\n\t\t\t\t</div>\n\n\t\t\t\t<Separator />\n\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tid=\"hook-form-add-redirect\"\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\tclassName=\"grid w-full gap-4\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"regex\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Regex</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"^http://localhost/(.*)\" {...field} />\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"replacement\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Replacement</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"http://mydomain/$${1}\" {...field} />\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"permanent\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem className=\"flex flex-row items-center justify-between p-3 mt-4 border rounded-lg shadow-sm\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Permanent</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\tSet the permanent option to true to apply a permanent\n\t\t\t\t\t\t\t\t\t\t\t\tredirection.\n\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</form>\n\n\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tisLoading={isPending}\n\t\t\t\t\t\t\tform=\"hook-form-add-redirect\"\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{redirectId ? \"Update\" : \"Create\"}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</DialogFooter>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/advanced/redirects/show-redirects.tsx",
    "content": "import { Split, Trash2 } from \"lucide-react\";\nimport { toast } from \"sonner\";\nimport { DialogAction } from \"@/components/shared/dialog-action\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport { api } from \"@/utils/api\";\nimport { HandleRedirect } from \"./handle-redirect\";\n\ninterface Props {\n\tapplicationId: string;\n}\n\nexport const ShowRedirects = ({ applicationId }: Props) => {\n\tconst { data, refetch } = api.application.one.useQuery(\n\t\t{\n\t\t\tapplicationId,\n\t\t},\n\t\t{ enabled: !!applicationId },\n\t);\n\n\tconst { mutateAsync: deleteRedirect, isPending: isRemoving } =\n\t\tapi.redirects.delete.useMutation();\n\n\tconst utils = api.useUtils();\n\n\treturn (\n\t\t<Card className=\"bg-background\">\n\t\t\t<CardHeader className=\"flex flex-row justify-between flex-wrap gap-4\">\n\t\t\t\t<div>\n\t\t\t\t\t<CardTitle className=\"text-xl\">Redirects</CardTitle>\n\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\tIf you want to redirect requests to this application use the\n\t\t\t\t\t\tfollowing config to setup the redirects\n\t\t\t\t\t</CardDescription>\n\t\t\t\t</div>\n\n\t\t\t\t{data && data?.redirects.length > 0 && (\n\t\t\t\t\t<HandleRedirect applicationId={applicationId}>\n\t\t\t\t\t\tAdd Redirect\n\t\t\t\t\t</HandleRedirect>\n\t\t\t\t)}\n\t\t\t</CardHeader>\n\t\t\t<CardContent className=\"flex flex-col gap-4\">\n\t\t\t\t{data?.redirects.length === 0 ? (\n\t\t\t\t\t<div className=\"flex w-full flex-col items-center justify-center gap-3 pt-10\">\n\t\t\t\t\t\t<Split className=\"size-8 text-muted-foreground\" />\n\t\t\t\t\t\t<span className=\"text-base text-muted-foreground\">\n\t\t\t\t\t\t\tNo redirects configured\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<HandleRedirect applicationId={applicationId}>\n\t\t\t\t\t\t\tAdd Redirect\n\t\t\t\t\t\t</HandleRedirect>\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<div className=\"flex flex-col pt-2\">\n\t\t\t\t\t\t<div className=\"flex flex-col gap-6\">\n\t\t\t\t\t\t\t{data?.redirects.map((redirect) => (\n\t\t\t\t\t\t\t\t<div key={redirect.redirectId}>\n\t\t\t\t\t\t\t\t\t<div className=\"flex w-full flex-col sm:flex-row sm:items-center justify-between gap-4 sm:gap-10 border rounded-lg p-4\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 flex-col gap-4 sm:gap-8\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-medium\">Regex</span>\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{redirect.regex}\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-medium\">Replacement</span>\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{redirect.replacement}\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-medium\">Permanent</span>\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{redirect.permanent ? \"Yes\" : \"No\"}\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-4\">\n\t\t\t\t\t\t\t\t\t\t\t<HandleRedirect\n\t\t\t\t\t\t\t\t\t\t\t\tredirectId={redirect.redirectId}\n\t\t\t\t\t\t\t\t\t\t\t\tapplicationId={applicationId}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"Delete Redirect\"\n\t\t\t\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to delete this redirect?\"\n\t\t\t\t\t\t\t\t\t\t\t\ttype=\"destructive\"\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tawait deleteRedirect({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tredirectId: redirect.redirectId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tutils.application.readTraefikConfig.invalidate({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tapplicationId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Redirect deleted successfully\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error deleting redirect\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"group hover:bg-red-500/10\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tisLoading={isRemoving}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Trash2 className=\"size-4 text-primary group-hover:text-red-500\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</CardContent>\n\t\t</Card>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/advanced/security/handle-security.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { PenBoxIcon, PlusIcon } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { api } from \"@/utils/api\";\n\nconst AddSecuritychema = z.object({\n\tusername: z.string().min(1, \"Username is required\"),\n\tpassword: z.string().min(1, \"Password is required\"),\n});\n\ntype AddSecurity = z.infer<typeof AddSecuritychema>;\n\ninterface Props {\n\tapplicationId: string;\n\tsecurityId?: string;\n\tchildren?: React.ReactNode;\n}\n\nexport const HandleSecurity = ({\n\tapplicationId,\n\tsecurityId,\n\tchildren = <PlusIcon className=\"h-4 w-4\" />,\n}: Props) => {\n\tconst utils = api.useUtils();\n\tconst [isOpen, setIsOpen] = useState(false);\n\tconst { data, refetch } = api.security.one.useQuery(\n\t\t{\n\t\t\tsecurityId: securityId ?? \"\",\n\t\t},\n\t\t{\n\t\t\tenabled: !!securityId,\n\t\t},\n\t);\n\n\tconst { mutateAsync, isPending, error, isError } = securityId\n\t\t? api.security.update.useMutation()\n\t\t: api.security.create.useMutation();\n\n\tconst form = useForm<AddSecurity>({\n\t\tdefaultValues: {\n\t\t\tusername: \"\",\n\t\t\tpassword: \"\",\n\t\t},\n\t\tresolver: zodResolver(AddSecuritychema),\n\t});\n\n\tuseEffect(() => {\n\t\tform.reset({\n\t\t\tusername: data?.username || \"\",\n\t\t\tpassword: data?.password || \"\",\n\t\t});\n\t}, [form, form.reset, form.formState.isSubmitSuccessful, data]);\n\n\tconst onSubmit = async (data: AddSecurity) => {\n\t\tawait mutateAsync({\n\t\t\tapplicationId,\n\t\t\t...data,\n\t\t\tsecurityId: securityId || \"\",\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(securityId ? \"Security Updated\" : \"Security Created\");\n\t\t\t\tawait utils.application.one.invalidate({\n\t\t\t\t\tapplicationId,\n\t\t\t\t});\n\t\t\t\tawait utils.application.readTraefikConfig.invalidate({\n\t\t\t\t\tapplicationId,\n\t\t\t\t});\n\t\t\t\tawait refetch();\n\t\t\t\tsetIsOpen(false);\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\n\t\t\t\t\tsecurityId\n\t\t\t\t\t\t? \"Error updating the security\"\n\t\t\t\t\t\t: \"Error creating security\",\n\t\t\t\t);\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t{securityId ? (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\tclassName=\"group hover:bg-blue-500/10 \"\n\t\t\t\t\t>\n\t\t\t\t\t\t<PenBoxIcon className=\"size-3.5  text-primary group-hover:text-blue-500\" />\n\t\t\t\t\t</Button>\n\t\t\t\t) : (\n\t\t\t\t\t<Button>{children}</Button>\n\t\t\t\t)}\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-lg\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Security</DialogTitle>\n\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\t{securityId ? \"Update\" : \"Add\"} security to your application\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t{isError && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tid=\"hook-form-add-security\"\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\tclassName=\"grid w-full gap-4\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"username\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Username</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"test1\" {...field} />\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"password\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Password</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"test\" type=\"password\" {...field} />\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</form>\n\n\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tisLoading={isPending}\n\t\t\t\t\t\t\tform=\"hook-form-add-security\"\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{securityId ? \"Update\" : \"Create\"}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</DialogFooter>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/advanced/security/show-security.tsx",
    "content": "import { LockKeyhole, Trash2 } from \"lucide-react\";\nimport { toast } from \"sonner\";\nimport { DialogAction } from \"@/components/shared/dialog-action\";\nimport { ToggleVisibilityInput } from \"@/components/shared/toggle-visibility-input\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport { Input } from \"@/components/ui/input\";\nimport { Label } from \"@/components/ui/label\";\nimport { api } from \"@/utils/api\";\nimport { HandleSecurity } from \"./handle-security\";\n\ninterface Props {\n\tapplicationId: string;\n}\n\nexport const ShowSecurity = ({ applicationId }: Props) => {\n\tconst { data, refetch } = api.application.one.useQuery(\n\t\t{\n\t\t\tapplicationId,\n\t\t},\n\t\t{ enabled: !!applicationId },\n\t);\n\n\tconst { mutateAsync: deleteSecurity, isPending: isRemoving } =\n\t\tapi.security.delete.useMutation();\n\n\tconst utils = api.useUtils();\n\treturn (\n\t\t<Card className=\"bg-background\">\n\t\t\t<CardHeader className=\"flex flex-row justify-between flex-wrap gap-4\">\n\t\t\t\t<div>\n\t\t\t\t\t<CardTitle className=\"text-xl\">Security</CardTitle>\n\t\t\t\t\t<CardDescription>Add basic auth to your application</CardDescription>\n\t\t\t\t</div>\n\n\t\t\t\t{data && data?.security.length > 0 && (\n\t\t\t\t\t<HandleSecurity applicationId={applicationId}>\n\t\t\t\t\t\tAdd Security\n\t\t\t\t\t</HandleSecurity>\n\t\t\t\t)}\n\t\t\t</CardHeader>\n\t\t\t<CardContent className=\"flex flex-col gap-4\">\n\t\t\t\t{data?.security.length === 0 ? (\n\t\t\t\t\t<div className=\"flex w-full flex-col items-center justify-center gap-3 pt-10\">\n\t\t\t\t\t\t<LockKeyhole className=\"size-8 text-muted-foreground\" />\n\t\t\t\t\t\t<span className=\"text-base text-muted-foreground\">\n\t\t\t\t\t\t\tNo security configured\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<HandleSecurity applicationId={applicationId}>\n\t\t\t\t\t\t\tAdd Security\n\t\t\t\t\t\t</HandleSecurity>\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<div className=\"flex flex-col pt-2\">\n\t\t\t\t\t\t<div className=\"flex flex-col gap-6 \">\n\t\t\t\t\t\t\t{data?.security.map((security) => (\n\t\t\t\t\t\t\t\t<div key={security.securityId}>\n\t\t\t\t\t\t\t\t\t<div className=\"flex w-full flex-col md:flex-row justify-between md:items-center gap-4 md:gap-10 border rounded-lg p-4\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"grid grid-cols-1 md:grid-cols-2 flex-col gap-4 md:gap-8\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t<Label>Username</Label>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input disabled value={security.username} />\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t<Label>Password</Label>\n\t\t\t\t\t\t\t\t\t\t\t\t<ToggleVisibilityInput\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={security.password}\n\t\t\t\t\t\t\t\t\t\t\t\t\tdisabled\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t<HandleSecurity\n\t\t\t\t\t\t\t\t\t\t\t\tsecurityId={security.securityId}\n\t\t\t\t\t\t\t\t\t\t\t\tapplicationId={applicationId}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"Delete Security\"\n\t\t\t\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to delete this security?\"\n\t\t\t\t\t\t\t\t\t\t\t\ttype=\"destructive\"\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tawait deleteSecurity({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsecurityId: security.securityId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tutils.application.readTraefikConfig.invalidate({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tapplicationId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Security deleted successfully\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error deleting security\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"group hover:bg-red-500/10\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tisLoading={isRemoving}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Trash2 className=\"size-4 text-primary group-hover:text-red-500\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</CardContent>\n\t\t</Card>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/advanced/show-build-server.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { Server } from \"lucide-react\";\nimport Link from \"next/link\";\nimport { useEffect } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectGroup,\n\tSelectItem,\n\tSelectLabel,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { api } from \"@/utils/api\";\n\ninterface Props {\n\tapplicationId: string;\n}\n\nconst schema = z\n\t.object({\n\t\tbuildServerId: z.string().optional(),\n\t\tbuildRegistryId: z.string().optional(),\n\t})\n\t.refine(\n\t\t(data) => {\n\t\t\t// Both empty/none is valid\n\t\t\tconst buildServerIsNone =\n\t\t\t\t!data.buildServerId || data.buildServerId === \"none\";\n\t\t\tconst buildRegistryIsNone =\n\t\t\t\t!data.buildRegistryId || data.buildRegistryId === \"none\";\n\n\t\t\t// Both should be either filled or empty\n\t\t\tif (buildServerIsNone && buildRegistryIsNone) return true;\n\t\t\tif (!buildServerIsNone && !buildRegistryIsNone) return true;\n\n\t\t\treturn false;\n\t\t},\n\t\t{\n\t\t\tmessage:\n\t\t\t\t\"Both Build Server and Build Registry must be selected together, or both set to None\",\n\t\t\tpath: [\"buildServerId\"], // Show error on buildServerId field\n\t\t},\n\t);\n\ntype Schema = z.infer<typeof schema>;\n\nexport const ShowBuildServer = ({ applicationId }: Props) => {\n\tconst { data, refetch } = api.application.one.useQuery(\n\t\t{ applicationId },\n\t\t{ enabled: !!applicationId },\n\t);\n\tconst { data: buildServers } = api.server.buildServers.useQuery();\n\tconst { data: registries } = api.registry.all.useQuery();\n\n\tconst { mutateAsync, isPending } = api.application.update.useMutation();\n\n\tconst form = useForm<Schema>({\n\t\tdefaultValues: {\n\t\t\tbuildServerId: data?.buildServerId || \"\",\n\t\t\tbuildRegistryId: data?.buildRegistryId || \"\",\n\t\t},\n\t\tresolver: zodResolver(schema),\n\t});\n\n\tuseEffect(() => {\n\t\tif (data) {\n\t\t\tform.reset({\n\t\t\t\tbuildServerId: data?.buildServerId || \"\",\n\t\t\t\tbuildRegistryId: data?.buildRegistryId || \"\",\n\t\t\t});\n\t\t}\n\t}, [form, form.reset, data]);\n\n\tconst onSubmit = async (formData: Schema) => {\n\t\tawait mutateAsync({\n\t\t\tapplicationId,\n\t\t\tbuildServerId:\n\t\t\t\tformData?.buildServerId === \"none\" || !formData?.buildServerId\n\t\t\t\t\t? null\n\t\t\t\t\t: formData?.buildServerId,\n\t\t\tbuildRegistryId:\n\t\t\t\tformData?.buildRegistryId === \"none\" || !formData?.buildRegistryId\n\t\t\t\t\t? null\n\t\t\t\t\t: formData?.buildRegistryId,\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(\"Build Server Settings Updated\");\n\t\t\t\tawait refetch();\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error updating build server settings\");\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<Card className=\"bg-background\">\n\t\t\t<CardHeader>\n\t\t\t\t<div className=\"flex flex-row items-center gap-2\">\n\t\t\t\t\t<Server className=\"size-6 text-muted-foreground\" />\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<CardTitle className=\"text-xl\">Build Server</CardTitle>\n\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\tConfigure a dedicated server for building your application.\n\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</CardHeader>\n\t\t\t<CardContent className=\"flex flex-col gap-4\">\n\t\t\t\t<AlertBlock type=\"info\">\n\t\t\t\t\tBuild servers offload the build process from your deployment servers.\n\t\t\t\t\tSelect a build server and registry to use for building your\n\t\t\t\t\tapplication.\n\t\t\t\t</AlertBlock>\n\n\t\t\t\t<AlertBlock type=\"info\">\n\t\t\t\t\t📊 <strong>Important:</strong> Once the build finishes, you'll need to\n\t\t\t\t\twait a few seconds for the deployment server to download the image.\n\t\t\t\t\tThese download logs will <strong>NOT</strong> appear in the build\n\t\t\t\t\tdeployment logs. Check the <strong>Logs</strong> tab to see when the\n\t\t\t\t\tcontainer starts running.\n\t\t\t\t</AlertBlock>\n\n\t\t\t\t<AlertBlock type=\"info\">\n\t\t\t\t\t<strong>Note:</strong> Build Server and Build Registry must be\n\t\t\t\t\tconfigured together. You can either select both or set both to None.\n\t\t\t\t</AlertBlock>\n\n\t\t\t\t{!registries || registries.length === 0 ? (\n\t\t\t\t\t<AlertBlock type=\"warning\">\n\t\t\t\t\t\tYou need to add at least one registry to use build servers. Please\n\t\t\t\t\t\tgo to{\" \"}\n\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\thref=\"/dashboard/settings/registry\"\n\t\t\t\t\t\t\tclassName=\"text-primary underline\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tSettings\n\t\t\t\t\t\t</Link>{\" \"}\n\t\t\t\t\t\tto add a registry.\n\t\t\t\t\t</AlertBlock>\n\t\t\t\t) : null}\n\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\tclassName=\"grid w-full gap-4\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"buildServerId\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Build Server</FormLabel>\n\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\tonValueChange={(value) => {\n\t\t\t\t\t\t\t\t\t\t\tfield.onChange(value);\n\t\t\t\t\t\t\t\t\t\t\t// If setting to \"none\", also reset build registry to \"none\"\n\t\t\t\t\t\t\t\t\t\t\tif (value === \"none\") {\n\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"buildRegistryId\", \"none\");\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tvalue={field.value || \"none\"}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a build server\" />\n\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t<SelectGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"none\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>None</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t{buildServers?.map((server) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={server.serverId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={server.serverId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-2 justify-between w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>{server.name}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground text-xs\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{server.ipAddress}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\tBuild Servers ({buildServers?.length || 0})\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectLabel>\n\t\t\t\t\t\t\t\t\t\t\t</SelectGroup>\n\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\tSelect a build server to handle the build process for this\n\t\t\t\t\t\t\t\t\t\tapplication.\n\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"buildRegistryId\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Build Registry</FormLabel>\n\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\tonValueChange={(value) => {\n\t\t\t\t\t\t\t\t\t\t\tfield.onChange(value);\n\t\t\t\t\t\t\t\t\t\t\t// If setting to \"none\", also reset build server to \"none\"\n\t\t\t\t\t\t\t\t\t\t\tif (value === \"none\") {\n\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"buildServerId\", \"none\");\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tvalue={field.value || \"none\"}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a registry\" />\n\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t<SelectGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"none\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>None</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t{registries?.map((registry) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={registry.registryId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={registry.registryId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{registry.registryName}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\tRegistries ({registries?.length || 0})\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectLabel>\n\t\t\t\t\t\t\t\t\t\t\t</SelectGroup>\n\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\tSelect a registry to store the built images from the build\n\t\t\t\t\t\t\t\t\t\tserver.\n\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<div className=\"flex w-full justify-end\">\n\t\t\t\t\t\t\t<Button isLoading={isPending} type=\"submit\">\n\t\t\t\t\t\t\t\tSave\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</form>\n\t\t\t\t</Form>\n\t\t\t</CardContent>\n\t\t</Card>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/advanced/show-resources.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { InfoIcon, Plus, Trash2 } from \"lucide-react\";\nimport { useEffect } from \"react\";\nimport { useFieldArray, useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport {\n\tcreateConverter,\n\tNumberInputWithSteps,\n} from \"@/components/ui/number-input\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { api } from \"@/utils/api\";\n\nconst CPU_STEP = 0.25;\nconst MEMORY_STEP_MB = 256;\n\nconst formatNumber = (value: number, decimals = 2): string =>\n\tNumber.isInteger(value) ? String(value) : value.toFixed(decimals);\n\nconst cpuConverter = createConverter(1_000_000_000, (cpu) =>\n\tcpu <= 0 ? \"\" : `${formatNumber(cpu)} CPU`,\n);\n\nconst memoryConverter = createConverter(1024 * 1024, (mb) => {\n\tif (mb <= 0) return \"\";\n\treturn mb >= 1024\n\t\t? `${formatNumber(mb / 1024)} GB`\n\t\t: `${formatNumber(mb)} MB`;\n});\n\nconst ulimitSchema = z.object({\n\tName: z.string().min(1, \"Name is required\"),\n\tSoft: z.coerce.number().int().min(-1, \"Must be >= -1\"),\n\tHard: z.coerce.number().int().min(-1, \"Must be >= -1\"),\n});\n\nconst addResourcesSchema = z.object({\n\tmemoryReservation: z.string().optional(),\n\tcpuLimit: z.string().optional(),\n\tmemoryLimit: z.string().optional(),\n\tcpuReservation: z.string().optional(),\n\tulimitsSwarm: z.array(ulimitSchema).optional(),\n});\n\nconst ULIMIT_PRESETS = [\n\t{ value: \"nofile\", label: \"nofile (Open Files)\" },\n\t{ value: \"nproc\", label: \"nproc (Processes)\" },\n\t{ value: \"memlock\", label: \"memlock (Locked Memory)\" },\n\t{ value: \"stack\", label: \"stack (Stack Size)\" },\n\t{ value: \"core\", label: \"core (Core File Size)\" },\n\t{ value: \"cpu\", label: \"cpu (CPU Time)\" },\n\t{ value: \"data\", label: \"data (Data Segment)\" },\n\t{ value: \"fsize\", label: \"fsize (File Size)\" },\n\t{ value: \"locks\", label: \"locks (File Locks)\" },\n\t{ value: \"msgqueue\", label: \"msgqueue (Message Queues)\" },\n\t{ value: \"nice\", label: \"nice (Nice Priority)\" },\n\t{ value: \"rtprio\", label: \"rtprio (Real-time Priority)\" },\n\t{ value: \"sigpending\", label: \"sigpending (Pending Signals)\" },\n];\n\nexport type ServiceType =\n\t| \"postgres\"\n\t| \"mongo\"\n\t| \"redis\"\n\t| \"mysql\"\n\t| \"mariadb\"\n\t| \"application\";\n\ninterface Props {\n\tid: string;\n\ttype: ServiceType | \"application\";\n}\n\ntype AddResources = z.infer<typeof addResourcesSchema>;\n\nexport const ShowResources = ({ id, type }: Props) => {\n\tconst queryMap = {\n\t\tpostgres: () =>\n\t\t\tapi.postgres.one.useQuery({ postgresId: id }, { enabled: !!id }),\n\t\tredis: () => api.redis.one.useQuery({ redisId: id }, { enabled: !!id }),\n\t\tmysql: () => api.mysql.one.useQuery({ mysqlId: id }, { enabled: !!id }),\n\t\tmariadb: () =>\n\t\t\tapi.mariadb.one.useQuery({ mariadbId: id }, { enabled: !!id }),\n\t\tapplication: () =>\n\t\t\tapi.application.one.useQuery({ applicationId: id }, { enabled: !!id }),\n\t\tmongo: () => api.mongo.one.useQuery({ mongoId: id }, { enabled: !!id }),\n\t};\n\tconst { data, refetch } = queryMap[type]\n\t\t? queryMap[type]()\n\t\t: api.mongo.one.useQuery({ mongoId: id }, { enabled: !!id });\n\n\tconst mutationMap = {\n\t\tpostgres: () => api.postgres.update.useMutation(),\n\t\tredis: () => api.redis.update.useMutation(),\n\t\tmysql: () => api.mysql.update.useMutation(),\n\t\tmariadb: () => api.mariadb.update.useMutation(),\n\t\tapplication: () => api.application.update.useMutation(),\n\t\tmongo: () => api.mongo.update.useMutation(),\n\t};\n\n\tconst { mutateAsync, isPending } = mutationMap[type]\n\t\t? mutationMap[type]()\n\t\t: api.mongo.update.useMutation();\n\n\tconst form = useForm({\n\t\tdefaultValues: {\n\t\t\tcpuLimit: \"\",\n\t\t\tcpuReservation: \"\",\n\t\t\tmemoryLimit: \"\",\n\t\t\tmemoryReservation: \"\",\n\t\t\tulimitsSwarm: [],\n\t\t},\n\t\tresolver: zodResolver(addResourcesSchema),\n\t});\n\n\tconst { fields, append, remove } = useFieldArray({\n\t\tcontrol: form.control,\n\t\tname: \"ulimitsSwarm\",\n\t});\n\n\tuseEffect(() => {\n\t\tif (data) {\n\t\t\tform.reset({\n\t\t\t\tcpuLimit: data?.cpuLimit || undefined,\n\t\t\t\tcpuReservation: data?.cpuReservation || undefined,\n\t\t\t\tmemoryLimit: data?.memoryLimit || undefined,\n\t\t\t\tmemoryReservation: data?.memoryReservation || undefined,\n\t\t\t\tulimitsSwarm: data?.ulimitsSwarm || [],\n\t\t\t});\n\t\t}\n\t}, [data, form, form.reset]);\n\n\tconst onSubmit = async (formData: AddResources) => {\n\t\tawait mutateAsync({\n\t\t\tmongoId: id || \"\",\n\t\t\tpostgresId: id || \"\",\n\t\t\tredisId: id || \"\",\n\t\t\tmysqlId: id || \"\",\n\t\t\tmariadbId: id || \"\",\n\t\t\tapplicationId: id || \"\",\n\t\t\tcpuLimit: formData.cpuLimit || null,\n\t\t\tcpuReservation: formData.cpuReservation || null,\n\t\t\tmemoryLimit: formData.memoryLimit || null,\n\t\t\tmemoryReservation: formData.memoryReservation || null,\n\t\t\tulimitsSwarm:\n\t\t\t\tformData.ulimitsSwarm && formData.ulimitsSwarm.length > 0\n\t\t\t\t\t? formData.ulimitsSwarm\n\t\t\t\t\t: null,\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(\"Resources Updated\");\n\t\t\t\tawait refetch();\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error updating the resources\");\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<Card className=\"bg-background\">\n\t\t\t<CardHeader>\n\t\t\t\t<CardTitle className=\"text-xl\">Resources</CardTitle>\n\t\t\t\t<CardDescription>\n\t\t\t\t\tIf you want to decrease or increase the resources to a specific.\n\t\t\t\t\tapplication or database\n\t\t\t\t</CardDescription>\n\t\t\t</CardHeader>\n\t\t\t<CardContent className=\"flex flex-col gap-4\">\n\t\t\t\t<AlertBlock type=\"info\">\n\t\t\t\t\tPlease remember to click Redeploy after modify the resources to apply\n\t\t\t\t\tthe changes.\n\t\t\t\t</AlertBlock>\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tid=\"hook-form\"\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\tclassName=\"grid w-full gap-8 \"\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"grid w-full md:grid-cols-2 gap-4\">\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"memoryLimit\"\n\t\t\t\t\t\t\t\trender={({ field }) => {\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-2\"\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={(e) => e.preventDefault()}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Memory Limit</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Tooltip delayDuration={0}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<InfoIcon className=\"h-4 w-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMemory hard limit in bytes. Example: 1GB =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t1073741824 bytes. Use +/- buttons to adjust by\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t256 MB.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<NumberInputWithSteps\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"1073741824 (1GB in bytes)\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tstep={MEMORY_STEP_MB}\n\t\t\t\t\t\t\t\t\t\t\t\t\tconverter={memoryConverter}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"memoryReservation\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-2\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={(e) => e.preventDefault()}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Memory Reservation</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t\t<Tooltip delayDuration={0}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<InfoIcon className=\"h-4 w-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMemory soft limit in bytes. Example: 256MB =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t268435456 bytes. Use +/- buttons to adjust by 256\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMB.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<NumberInputWithSteps\n\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\tonChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"268435456 (256MB in bytes)\"\n\t\t\t\t\t\t\t\t\t\t\t\tstep={MEMORY_STEP_MB}\n\t\t\t\t\t\t\t\t\t\t\t\tconverter={memoryConverter}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"cpuLimit\"\n\t\t\t\t\t\t\t\trender={({ field }) => {\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-2\"\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={(e) => e.preventDefault()}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>CPU Limit</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Tooltip delayDuration={0}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<InfoIcon className=\"h-4 w-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCPU quota in units of 10^-9 CPUs. Example: 2\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCPUs = 2000000000. Use +/- buttons to adjust by\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t0.25 CPU.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<NumberInputWithSteps\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"2000000000 (2 CPUs)\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tstep={CPU_STEP}\n\t\t\t\t\t\t\t\t\t\t\t\t\tconverter={cpuConverter}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"cpuReservation\"\n\t\t\t\t\t\t\t\trender={({ field }) => {\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-2\"\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={(e) => e.preventDefault()}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>CPU Reservation</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Tooltip delayDuration={0}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<InfoIcon className=\"h-4 w-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCPU shares (relative weight). Example: 1 CPU =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t1000000000. Use +/- buttons to adjust by 0.25\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCPU.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<NumberInputWithSteps\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"1000000000 (1 CPU)\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tstep={CPU_STEP}\n\t\t\t\t\t\t\t\t\t\t\t\t\tconverter={cpuConverter}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t{/* Ulimits Section */}\n\t\t\t\t\t\t<div className=\"space-y-4\">\n\t\t\t\t\t\t\t<div className=\"flex items-center justify-between\">\n\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t<FormLabel className=\"text-base\">Ulimits</FormLabel>\n\t\t\t\t\t\t\t\t\t<TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t<Tooltip delayDuration={0}>\n\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<InfoIcon className=\"h-4 w-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t<TooltipContent className=\"max-w-xs\">\n\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\tSet resource limits for the container. Each ulimit has\n\t\t\t\t\t\t\t\t\t\t\t\t\ta soft limit (warning threshold) and hard limit\n\t\t\t\t\t\t\t\t\t\t\t\t\t(maximum allowed). Use -1 for unlimited.\n\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\t\t\tappend({ Name: \"nofile\", Soft: 65535, Hard: 65535 })\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Plus className=\"h-4 w-4 mr-1\" />\n\t\t\t\t\t\t\t\t\tAdd Ulimit\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t{fields.length > 0 && (\n\t\t\t\t\t\t\t\t<div className=\"space-y-3\">\n\t\t\t\t\t\t\t\t\t{fields.map((field, index) => (\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tkey={field.id}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-start gap-3 p-3 border rounded-lg bg-muted/30\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\t\tname={`ulimitsSwarm.${index}.Name`}\n\t\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem className=\"flex-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel className=\"text-xs\">Type</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonValueChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select ulimit\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ULIMIT_PRESETS.map((preset) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={preset.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={preset.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{preset.label}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\t\tname={`ulimitsSwarm.${index}.Soft`}\n\t\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem className=\"w-32\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel className=\"text-xs\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSoft Limit\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmin={-1}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"65535\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttypeof field.value === \"number\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? field.value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(Number(e.target.value))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\t\tname={`ulimitsSwarm.${index}.Hard`}\n\t\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem className=\"w-32\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel className=\"text-xs\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tHard Limit\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmin={-1}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"65535\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttypeof field.value === \"number\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? field.value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(Number(e.target.value))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"mt-6 text-destructive hover:text-destructive\"\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => remove(index)}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<Trash2 className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t{fields.length === 0 && (\n\t\t\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\tNo ulimits configured. Click &quot;Add Ulimit&quot; to set\n\t\t\t\t\t\t\t\t\tresource limits.\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div className=\"flex w-full justify-end\">\n\t\t\t\t\t\t\t<Button isLoading={isPending} type=\"submit\">\n\t\t\t\t\t\t\t\tSave\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</form>\n\t\t\t\t</Form>\n\t\t\t</CardContent>\n\t\t</Card>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/advanced/traefik/show-traefik-config.tsx",
    "content": "import { File, Loader2 } from \"lucide-react\";\nimport { CodeEditor } from \"@/components/shared/code-editor\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport { api } from \"@/utils/api\";\nimport { UpdateTraefikConfig } from \"./update-traefik-config\";\n\ninterface Props {\n\tapplicationId: string;\n}\n\nexport const ShowTraefikConfig = ({ applicationId }: Props) => {\n\tconst { data: permissions } = api.user.getPermissions.useQuery();\n\tconst canRead = permissions?.traefikFiles.read ?? false;\n\tconst { data, isPending } = api.application.readTraefikConfig.useQuery(\n\t\t{\n\t\t\tapplicationId,\n\t\t},\n\t\t{ enabled: !!applicationId && canRead },\n\t);\n\n\tif (!canRead) return null;\n\n\treturn (\n\t\t<Card className=\"bg-background\">\n\t\t\t<CardHeader className=\"flex flex-row justify-between\">\n\t\t\t\t<div>\n\t\t\t\t\t<CardTitle className=\"text-xl\">Traefik</CardTitle>\n\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\tModify the traefik config, in rare cases you may need to add\n\t\t\t\t\t\tspecific config, be careful because modifying incorrectly can break\n\t\t\t\t\t\ttraefik and your application\n\t\t\t\t\t</CardDescription>\n\t\t\t\t</div>\n\t\t\t</CardHeader>\n\t\t\t<CardContent className=\"flex flex-col gap-4\">\n\t\t\t\t{isPending ? (\n\t\t\t\t\t<span className=\"text-base text-muted-foreground flex flex-row gap-3 items-center justify-center min-h-[10vh]\">\n\t\t\t\t\t\tLoading...\n\t\t\t\t\t\t<Loader2 className=\"animate-spin\" />\n\t\t\t\t\t</span>\n\t\t\t\t) : !data ? (\n\t\t\t\t\t<div className=\"flex w-full flex-col items-center justify-center gap-3 pt-10\">\n\t\t\t\t\t\t<File className=\"size-8 text-muted-foreground\" />\n\t\t\t\t\t\t<span className=\"text-base text-muted-foreground\">\n\t\t\t\t\t\t\tNo traefik config detected\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<div className=\"flex flex-col pt-2 relative\">\n\t\t\t\t\t\t<div className=\"flex flex-col gap-6 max-h-[35rem] min-h-[10rem] overflow-y-auto\">\n\t\t\t\t\t\t\t<CodeEditor\n\t\t\t\t\t\t\t\tlineWrapping\n\t\t\t\t\t\t\t\tvalue={data || \"Empty\"}\n\t\t\t\t\t\t\t\tdisabled\n\t\t\t\t\t\t\t\tclassName=\"font-mono\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<div className=\"flex justify-end absolute z-50 right-6 top-6\">\n\t\t\t\t\t\t\t\t<UpdateTraefikConfig applicationId={applicationId} />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</CardContent>\n\t\t</Card>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/advanced/traefik/update-traefik-config.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { parse, stringify, YAMLParseError } from \"yaml\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { CodeEditor } from \"@/components/shared/code-editor\";\nimport { Button } from \"@/components/ui/button\";\nimport { Checkbox } from \"@/components/ui/checkbox\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Label } from \"@/components/ui/label\";\nimport { api } from \"@/utils/api\";\n\nconst UpdateTraefikConfigSchema = z.object({\n\ttraefikConfig: z.string(),\n});\n\ntype UpdateTraefikConfig = z.infer<typeof UpdateTraefikConfigSchema>;\n\ninterface Props {\n\tapplicationId: string;\n}\n\nexport const validateAndFormatYAML = (yamlText: string) => {\n\ttry {\n\t\tconst obj = parse(yamlText);\n\t\tconst formattedYaml = stringify(obj, { indent: 4 });\n\t\treturn { valid: true, formattedYaml, error: null };\n\t} catch (error) {\n\t\tif (error instanceof YAMLParseError) {\n\t\t\treturn {\n\t\t\t\tvalid: false,\n\t\t\t\tformattedYaml: yamlText,\n\t\t\t\terror: error.message,\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\tvalid: false,\n\t\t\tformattedYaml: yamlText,\n\t\t\terror: \"An unexpected error occurred while processing the YAML.\",\n\t\t};\n\t}\n};\n\nexport const UpdateTraefikConfig = ({ applicationId }: Props) => {\n\tconst { data: permissions } = api.user.getPermissions.useQuery();\n\tconst canWrite = permissions?.traefikFiles.write ?? false;\n\tconst [open, setOpen] = useState(false);\n\tconst [skipYamlValidation, setSkipYamlValidation] = useState(false);\n\tconst { data, refetch } = api.application.readTraefikConfig.useQuery(\n\t\t{\n\t\t\tapplicationId,\n\t\t},\n\t\t{ enabled: !!applicationId },\n\t);\n\n\tconst { mutateAsync, isPending, error, isError } =\n\t\tapi.application.updateTraefikConfig.useMutation();\n\n\tconst form = useForm<UpdateTraefikConfig>({\n\t\tdefaultValues: {\n\t\t\ttraefikConfig: \"\",\n\t\t},\n\t\tresolver: zodResolver(UpdateTraefikConfigSchema),\n\t});\n\n\tuseEffect(() => {\n\t\tif (data) {\n\t\t\tform.reset({\n\t\t\t\ttraefikConfig: data || \"\",\n\t\t\t});\n\t\t}\n\t}, [data]);\n\n\tconst onSubmit = async (data: UpdateTraefikConfig) => {\n\t\tif (!skipYamlValidation) {\n\t\t\tconst { valid, error } = validateAndFormatYAML(data.traefikConfig);\n\t\t\tif (!valid) {\n\t\t\t\tform.setError(\"traefikConfig\", {\n\t\t\t\t\ttype: \"manual\",\n\t\t\t\t\tmessage: (error as string) || \"Invalid YAML\",\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tform.clearErrors(\"traefikConfig\");\n\t\tawait mutateAsync({\n\t\t\tapplicationId,\n\t\t\ttraefikConfig: data.traefikConfig,\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(\"Traefik config Updated\");\n\t\t\t\trefetch();\n\t\t\t\tsetOpen(false);\n\t\t\t\tform.reset();\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error updating the Traefik config\");\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<Dialog\n\t\t\topen={open}\n\t\t\tonOpenChange={(open) => {\n\t\t\t\tsetOpen(open);\n\t\t\t\tif (!open) {\n\t\t\t\t\tform.reset();\n\t\t\t\t\tsetSkipYamlValidation(false);\n\t\t\t\t}\n\t\t\t}}\n\t\t>\n\t\t\t{canWrite && (\n\t\t\t\t<DialogTrigger asChild>\n\t\t\t\t\t<Button isLoading={isPending}>Modify</Button>\n\t\t\t\t</DialogTrigger>\n\t\t\t)}\n\t\t\t<DialogContent className=\"sm:max-w-4xl\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Update traefik config</DialogTitle>\n\t\t\t\t\t<DialogDescription>Update the traefik config</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t{isError && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tid=\"hook-form-update-traefik-config\"\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\tclassName=\"w-full space-y-4 overflow-auto\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"flex flex-col\">\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"traefikConfig\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Traefik config</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<CodeEditor\n\t\t\t\t\t\t\t\t\t\t\t\tlineWrapping\n\t\t\t\t\t\t\t\t\t\t\t\twrapperClassName=\"h-[35rem] font-mono\"\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder={`http:\nrouters:\n    router-name:\n        rule: Host('domain.com')\n        service: container-name\n        entryPoints:\n            - web\n        tls: false\n        middlewares: []\n                                                    `}\n\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t<pre>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</pre>\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</form>\n\n\t\t\t\t\t<DialogFooter className=\"flex-col sm:flex-row gap-4\">\n\t\t\t\t\t\t<div className=\"flex flex-col gap-1 w-full sm:w-auto sm:mr-auto\">\n\t\t\t\t\t\t\t<div className=\"flex items-center space-x-2\">\n\t\t\t\t\t\t\t\t<Checkbox\n\t\t\t\t\t\t\t\t\tid=\"skip-yaml-validation-app\"\n\t\t\t\t\t\t\t\t\tchecked={skipYamlValidation}\n\t\t\t\t\t\t\t\t\tonCheckedChange={(checked) =>\n\t\t\t\t\t\t\t\t\t\tsetSkipYamlValidation(checked === true)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<Label\n\t\t\t\t\t\t\t\t\thtmlFor=\"skip-yaml-validation-app\"\n\t\t\t\t\t\t\t\t\tclassName=\"text-sm font-normal cursor-pointer\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tSkip YAML validation (for Go templating)\n\t\t\t\t\t\t\t\t</Label>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\tCheck to save configs with Go templating (e.g.{\" \"}\n\t\t\t\t\t\t\t\t<code className=\"text-xs\">{\"{{range}}\"}</code>).\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tisLoading={isPending}\n\t\t\t\t\t\t\tform=\"hook-form-update-traefik-config\"\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tUpdate\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</DialogFooter>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/advanced/volumes/add-volumes.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { PlusIcon } from \"lucide-react\";\nimport type React from \"react\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { CodeEditor } from \"@/components/shared/code-editor\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { Label } from \"@/components/ui/label\";\nimport { RadioGroup, RadioGroupItem } from \"@/components/ui/radio-group\";\nimport { cn } from \"@/lib/utils\";\nimport { api } from \"@/utils/api\";\n\ninterface Props {\n\tserviceId: string;\n\tserviceType:\n\t\t| \"application\"\n\t\t| \"postgres\"\n\t\t| \"redis\"\n\t\t| \"mongo\"\n\t\t| \"redis\"\n\t\t| \"mysql\"\n\t\t| \"mariadb\"\n\t\t| \"compose\";\n\trefetch: () => void;\n\tchildren?: React.ReactNode;\n}\n\nconst mountSchema = z.object({\n\tmountPath: z.string().min(1, \"Mount path required\"),\n});\n\nconst mySchema = z.discriminatedUnion(\"type\", [\n\tz\n\t\t.object({\n\t\t\ttype: z.literal(\"bind\"),\n\t\t\thostPath: z.string().min(1, \"Host path required\"),\n\t\t})\n\t\t.merge(mountSchema),\n\tz\n\t\t.object({\n\t\t\ttype: z.literal(\"volume\"),\n\t\t\tvolumeName: z\n\t\t\t\t.string()\n\t\t\t\t.min(1, \"Volume name required\")\n\t\t\t\t.regex(\n\t\t\t\t\t/^[a-zA-Z0-9][a-zA-Z0-9_.-]*$/,\n\t\t\t\t\t\"Invalid volume name. Use letters, numbers, '._-' and start with a letter/number.\",\n\t\t\t\t),\n\t\t})\n\t\t.merge(mountSchema),\n\tz\n\t\t.object({\n\t\t\ttype: z.literal(\"file\"),\n\t\t\tfilePath: z.string().min(1, \"File path required\"),\n\t\t\tcontent: z.string().optional(),\n\t\t})\n\t\t.merge(mountSchema),\n]);\n\ntype AddMount = z.infer<typeof mySchema>;\n\nexport const AddVolumes = ({\n\tserviceId,\n\tserviceType,\n\trefetch,\n\tchildren = <PlusIcon className=\"h-4 w-4\" />,\n}: Props) => {\n\tconst [isOpen, setIsOpen] = useState(false);\n\tconst { mutateAsync } = api.mounts.create.useMutation();\n\tconst form = useForm<AddMount>({\n\t\tdefaultValues: {\n\t\t\ttype: serviceType === \"compose\" ? \"file\" : \"bind\",\n\t\t\thostPath: \"\",\n\t\t\tmountPath: serviceType === \"compose\" ? \"/\" : \"\",\n\t\t},\n\t\tresolver: zodResolver(mySchema),\n\t});\n\tconst type = form.watch(\"type\");\n\n\tuseEffect(() => {\n\t\tform.reset();\n\t}, [form, form.reset, form.formState.isSubmitSuccessful]);\n\n\tconst onSubmit = async (data: AddMount) => {\n\t\tif (data.type === \"bind\") {\n\t\t\tawait mutateAsync({\n\t\t\t\tserviceId,\n\t\t\t\thostPath: data.hostPath,\n\t\t\t\tmountPath: data.mountPath,\n\t\t\t\ttype: data.type,\n\t\t\t\tserviceType,\n\t\t\t})\n\t\t\t\t.then(() => {\n\t\t\t\t\ttoast.success(\"Mount Created\");\n\t\t\t\t\tsetIsOpen(false);\n\t\t\t\t})\n\t\t\t\t.catch(() => {\n\t\t\t\t\ttoast.error(\"Error creating the Bind mount\");\n\t\t\t\t});\n\t\t} else if (data.type === \"volume\") {\n\t\t\tawait mutateAsync({\n\t\t\t\tserviceId,\n\t\t\t\tvolumeName: data.volumeName,\n\t\t\t\tmountPath: data.mountPath,\n\t\t\t\ttype: data.type,\n\t\t\t\tserviceType,\n\t\t\t})\n\t\t\t\t.then(() => {\n\t\t\t\t\ttoast.success(\"Mount Created\");\n\t\t\t\t\tsetIsOpen(false);\n\t\t\t\t})\n\t\t\t\t.catch(() => {\n\t\t\t\t\ttoast.error(\"Error creating the Volume mount\");\n\t\t\t\t});\n\t\t} else if (data.type === \"file\") {\n\t\t\tawait mutateAsync({\n\t\t\t\tserviceId,\n\t\t\t\tcontent: data.content,\n\t\t\t\tmountPath: data.mountPath,\n\t\t\t\tfilePath: data.filePath,\n\t\t\t\ttype: data.type,\n\t\t\t\tserviceType,\n\t\t\t})\n\t\t\t\t.then(() => {\n\t\t\t\t\ttoast.success(\"Mount Created\");\n\t\t\t\t\tsetIsOpen(false);\n\t\t\t\t})\n\t\t\t\t.catch(() => {\n\t\t\t\t\ttoast.error(\"Error creating the File mount\");\n\t\t\t\t});\n\t\t}\n\n\t\trefetch();\n\t};\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger className=\"\" asChild>\n\t\t\t\t<Button>{children}</Button>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-3xl\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Volumes / Mounts</DialogTitle>\n\t\t\t\t</DialogHeader>\n\t\t\t\t{/* {isError && (\n        <div className=\"flex items-center flex-row gap-4 rounded-lg bg-red-50 p-2 dark:bg-red-950\">\n          <AlertTriangle className=\"text-red-600 dark:text-red-400\" />\n          <span className=\"text-sm text-red-600 dark:text-red-400\">\n            {error?.message}\n          </span>\n        </div>\n      )} */}\n\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tid=\"hook-form-volume\"\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\tclassName=\"grid w-full gap-8 \"\n\t\t\t\t\t>\n\t\t\t\t\t\t{type === \"bind\" && (\n\t\t\t\t\t\t\t<AlertBlock>\n\t\t\t\t\t\t\t\t<div className=\"space-y-2\">\n\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\tMake sure the host path is a valid path and exists in the\n\t\t\t\t\t\t\t\t\t\thost machine.\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t<strong>Cluster Warning:</strong> If you're using cluster\n\t\t\t\t\t\t\t\t\t\tfeatures, bind mounts may cause deployment failures since\n\t\t\t\t\t\t\t\t\t\tthe path must exist on all worker/manager nodes. Consider\n\t\t\t\t\t\t\t\t\t\tusing external tools to distribute the folder across nodes\n\t\t\t\t\t\t\t\t\t\tor use named volumes instead.\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tdefaultValue={form.control._defaultValues.type}\n\t\t\t\t\t\t\tname=\"type\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"space-y-3\">\n\t\t\t\t\t\t\t\t\t<FormLabel className=\"text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\tSelect the Mount Type\n\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<RadioGroup\n\t\t\t\t\t\t\t\t\t\t\tonValueChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\tdefaultValue={field.value}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"grid w-full grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{serviceType !== \"compose\" && (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem className=\"flex items-center space-x-3 space-y-0\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl className=\"w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<RadioGroupItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"bind\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tid=\"bind\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"peer sr-only\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Label\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtmlFor=\"bind\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex flex-col items-center justify-between rounded-md border-2 border-muted bg-popover p-4 hover:bg-accent hover:text-accent-foreground peer-data-[state=checked]:border-primary [&:has([data-state=checked])]:border-primary cursor-pointer\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tBind Mount\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Label>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t\t\t{serviceType !== \"compose\" && (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem className=\"flex items-center space-x-3 space-y-0\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl className=\"w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<RadioGroupItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"volume\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tid=\"volume\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"peer sr-only\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Label\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtmlFor=\"volume\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex flex-col items-center justify-between rounded-md border-2 border-muted bg-popover p-4 hover:bg-accent hover:text-accent-foreground peer-data-[state=checked]:border-primary [&:has([data-state=checked])]:border-primary cursor-pointer\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tVolume Mount\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Label>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t\t\t<FormItem\n\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\tserviceType === \"compose\" && \"col-span-3\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"flex items-center space-x-3 space-y-0\",\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormControl className=\"w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<RadioGroupItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"file\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tid=\"file\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"peer sr-only\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Label\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtmlFor=\"file\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex flex-col items-center justify-between rounded-md border-2 border-muted bg-popover p-4 hover:bg-accent hover:text-accent-foreground peer-data-[state=checked]:border-primary [&:has([data-state=checked])]:border-primary cursor-pointer\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFile Mount\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Label>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t</RadioGroup>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t\t<FormLabel className=\"text-lg font-semibold leading-none tracking-tight\">\n\t\t\t\t\t\t\t\tFill the next fields.\n\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t{type === \"bind\" && (\n\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\tname=\"hostPath\"\n\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Host Path</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"Host Path\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{type === \"volume\" && (\n\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\tname=\"volumeName\"\n\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Volume Name</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Volume Name\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value || \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{type === \"file\" && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"content\"\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem className=\"max-w-full max-w-[45rem]\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Content</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CodeEditor\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlanguage=\"properties\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder={`NODE_ENV=production\nPORT=3000\n`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-96 font-mono \"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"filePath\"\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>File Path</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Name of the file\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{serviceType !== \"compose\" && (\n\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\tname=\"mountPath\"\n\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Mount Path (In the container)</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"Mount Path\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</form>\n\n\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tisLoading={form.formState.isSubmitting}\n\t\t\t\t\t\t\tform=\"hook-form-volume\"\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tCreate\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</DialogFooter>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/advanced/volumes/show-volumes.tsx",
    "content": "import { Package, Trash2 } from \"lucide-react\";\nimport { toast } from \"sonner\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { DialogAction } from \"@/components/shared/dialog-action\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport { api } from \"@/utils/api\";\nimport type { ServiceType } from \"../show-resources\";\nimport { AddVolumes } from \"./add-volumes\";\nimport { UpdateVolume } from \"./update-volume\";\n\ninterface Props {\n\tid: string;\n\ttype: ServiceType | \"compose\";\n}\n\nexport const ShowVolumes = ({ id, type }: Props) => {\n\tconst { data: permissions } = api.user.getPermissions.useQuery();\n\tconst canRead = permissions?.volume.read ?? false;\n\tconst canCreate = permissions?.volume.create ?? false;\n\tconst canDelete = permissions?.volume.delete ?? false;\n\n\tif (!canRead) return null;\n\n\tconst queryMap = {\n\t\tpostgres: () =>\n\t\t\tapi.postgres.one.useQuery({ postgresId: id }, { enabled: !!id }),\n\t\tredis: () => api.redis.one.useQuery({ redisId: id }, { enabled: !!id }),\n\t\tmysql: () => api.mysql.one.useQuery({ mysqlId: id }, { enabled: !!id }),\n\t\tmariadb: () =>\n\t\t\tapi.mariadb.one.useQuery({ mariadbId: id }, { enabled: !!id }),\n\t\tapplication: () =>\n\t\t\tapi.application.one.useQuery({ applicationId: id }, { enabled: !!id }),\n\t\tmongo: () => api.mongo.one.useQuery({ mongoId: id }, { enabled: !!id }),\n\t\tcompose: () =>\n\t\t\tapi.compose.one.useQuery({ composeId: id }, { enabled: !!id }),\n\t};\n\tconst { data, refetch } = queryMap[type]\n\t\t? queryMap[type]()\n\t\t: api.mongo.one.useQuery({ mongoId: id }, { enabled: !!id });\n\tconst { mutateAsync: deleteVolume, isPending: isRemoving } =\n\t\tapi.mounts.remove.useMutation();\n\treturn (\n\t\t<Card className=\"bg-background\">\n\t\t\t<CardHeader className=\"flex flex-row justify-between flex-wrap gap-4\">\n\t\t\t\t<div>\n\t\t\t\t\t<CardTitle className=\"text-xl\">Volumes</CardTitle>\n\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\tIf you want to persist data in this service use the following config\n\t\t\t\t\t\tto setup the volumes\n\t\t\t\t\t</CardDescription>\n\t\t\t\t</div>\n\n\t\t\t\t{canCreate && data && data?.mounts.length > 0 && (\n\t\t\t\t\t<AddVolumes serviceId={id} refetch={refetch} serviceType={type}>\n\t\t\t\t\t\tAdd Volume\n\t\t\t\t\t</AddVolumes>\n\t\t\t\t)}\n\t\t\t</CardHeader>\n\t\t\t<CardContent className=\"flex flex-col gap-4\">\n\t\t\t\t{data?.mounts.length === 0 ? (\n\t\t\t\t\t<div className=\"flex w-full flex-col items-center justify-center gap-3 pt-10\">\n\t\t\t\t\t\t<Package className=\"size-8 text-muted-foreground\" />\n\t\t\t\t\t\t<span className=\"text-base text-muted-foreground\">\n\t\t\t\t\t\t\tNo volumes/mounts configured\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t{canCreate && (\n\t\t\t\t\t\t\t<AddVolumes serviceId={id} refetch={refetch} serviceType={type}>\n\t\t\t\t\t\t\t\tAdd Volume\n\t\t\t\t\t\t\t</AddVolumes>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<div className=\"flex flex-col pt-2 gap-4\">\n\t\t\t\t\t\t<AlertBlock type=\"warning\">\n\t\t\t\t\t\t\tPlease remember to click Redeploy after adding, editing, or\n\t\t\t\t\t\t\tdeleting a mount to apply the changes.\n\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t\t<div className=\"flex flex-col gap-6\">\n\t\t\t\t\t\t\t{data?.mounts.map((mount) => (\n\t\t\t\t\t\t\t\t<div key={mount.mountId}>\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tkey={mount.mountId}\n\t\t\t\t\t\t\t\t\t\tclassName=\"flex w-full flex-col sm:flex-row sm:items-center justify-between gap-4 sm:gap-10 border rounded-lg p-4\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{/* <Package className=\"size-8 self-center text-muted-foreground\" /> */}\n\t\t\t\t\t\t\t\t\t\t<div className=\"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-4 flex-col gap-4 sm:gap-8\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-medium\">Mount Type</span>\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{mount.type.toUpperCase()}\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t{mount.type === \"volume\" && (\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-medium\">Volume Name</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{mount.volumeName}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t\t\t{mount.type === \"file\" && (\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-medium\">Content</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground line-clamp-[10] whitespace-break-spaces\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{mount.content}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t{mount.type === \"bind\" && (\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-medium\">Host Path</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{mount.hostPath}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t{mount.type === \"file\" && (\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-medium\">File Path</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{mount.filePath}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-medium\">Mount Path</span>\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{mount.mountPath}\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t{canCreate && (\n\t\t\t\t\t\t\t\t\t\t\t\t<UpdateVolume\n\t\t\t\t\t\t\t\t\t\t\t\t\tmountId={mount.mountId}\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype={mount.type}\n\t\t\t\t\t\t\t\t\t\t\t\t\trefetch={refetch}\n\t\t\t\t\t\t\t\t\t\t\t\t\tserviceType={type}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t{canDelete && (\n\t\t\t\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"Delete Volume\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to delete this volume?\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"destructive\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait deleteVolume({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmountId: mount.mountId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Volume deleted successfully\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error deleting volume\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"group hover:bg-red-500/10\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tisLoading={isRemoving}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Trash2 className=\"size-4 text-primary group-hover:text-red-500\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</CardContent>\n\t\t</Card>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/advanced/volumes/update-volume.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { PenBoxIcon } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { CodeEditor } from \"@/components/shared/code-editor\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { api } from \"@/utils/api\";\n\nconst mountSchema = z.object({\n\tmountPath: z.string().min(1, \"Mount path required\"),\n});\n\nconst mySchema = z.discriminatedUnion(\"type\", [\n\tz\n\t\t.object({\n\t\t\ttype: z.literal(\"bind\"),\n\t\t\thostPath: z.string().min(1, \"Host path required\"),\n\t\t})\n\t\t.merge(mountSchema),\n\tz\n\t\t.object({\n\t\t\ttype: z.literal(\"volume\"),\n\t\t\tvolumeName: z\n\t\t\t\t.string()\n\t\t\t\t.min(1, \"Volume name required\")\n\t\t\t\t.regex(\n\t\t\t\t\t/^[a-zA-Z0-9][a-zA-Z0-9_.-]*$/,\n\t\t\t\t\t\"Invalid volume name. Use letters, numbers, '._-' and start with a letter/number.\",\n\t\t\t\t),\n\t\t})\n\t\t.merge(mountSchema),\n\tz\n\t\t.object({\n\t\t\ttype: z.literal(\"file\"),\n\t\t\tcontent: z.string().optional(),\n\t\t\tfilePath: z.string().min(1, \"File path required\"),\n\t\t})\n\t\t.merge(mountSchema),\n]);\n\ntype UpdateMount = z.infer<typeof mySchema>;\n\ninterface Props {\n\tmountId: string;\n\ttype: \"bind\" | \"volume\" | \"file\";\n\trefetch: () => void;\n\tserviceType:\n\t\t| \"application\"\n\t\t| \"postgres\"\n\t\t| \"redis\"\n\t\t| \"mongo\"\n\t\t| \"redis\"\n\t\t| \"mysql\"\n\t\t| \"mariadb\"\n\t\t| \"compose\";\n}\n\nexport const UpdateVolume = ({\n\tmountId,\n\ttype,\n\trefetch,\n\tserviceType,\n}: Props) => {\n\tconst [isOpen, setIsOpen] = useState(false);\n\tconst _utils = api.useUtils();\n\tconst { data } = api.mounts.one.useQuery(\n\t\t{\n\t\t\tmountId,\n\t\t},\n\t\t{\n\t\t\tenabled: !!mountId,\n\t\t},\n\t);\n\n\tconst { mutateAsync, isPending, error, isError } =\n\t\tapi.mounts.update.useMutation();\n\n\tconst form = useForm<UpdateMount>({\n\t\tdefaultValues: {\n\t\t\ttype,\n\t\t\thostPath: \"\",\n\t\t\tmountPath: \"\",\n\t\t},\n\t\tresolver: zodResolver(mySchema),\n\t});\n\n\tconst typeForm = form.watch(\"type\");\n\n\tuseEffect(() => {\n\t\tif (data) {\n\t\t\tif (typeForm === \"bind\") {\n\t\t\t\tform.reset({\n\t\t\t\t\thostPath: data.hostPath || \"\",\n\t\t\t\t\tmountPath: data.mountPath,\n\t\t\t\t\ttype: \"bind\",\n\t\t\t\t});\n\t\t\t} else if (typeForm === \"volume\") {\n\t\t\t\tform.reset({\n\t\t\t\t\tvolumeName: data.volumeName || \"\",\n\t\t\t\t\tmountPath: data.mountPath,\n\t\t\t\t\ttype: \"volume\",\n\t\t\t\t});\n\t\t\t} else if (typeForm === \"file\") {\n\t\t\t\tform.reset({\n\t\t\t\t\tcontent: data.content || \"\",\n\t\t\t\t\tmountPath: serviceType === \"compose\" ? \"/\" : data.mountPath,\n\t\t\t\t\tfilePath: data.filePath || \"\",\n\t\t\t\t\ttype: \"file\",\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}, [form, form.reset, data]);\n\n\tconst onSubmit = async (data: UpdateMount) => {\n\t\tif (data.type === \"bind\") {\n\t\t\tawait mutateAsync({\n\t\t\t\thostPath: data.hostPath,\n\t\t\t\tmountPath: data.mountPath,\n\t\t\t\ttype: data.type,\n\t\t\t\tmountId,\n\t\t\t})\n\t\t\t\t.then(() => {\n\t\t\t\t\ttoast.success(\"Mount Update\");\n\t\t\t\t\tsetIsOpen(false);\n\t\t\t\t})\n\t\t\t\t.catch(() => {\n\t\t\t\t\ttoast.error(\"Error updating the Bind mount\");\n\t\t\t\t});\n\t\t} else if (data.type === \"volume\") {\n\t\t\tawait mutateAsync({\n\t\t\t\tvolumeName: data.volumeName,\n\t\t\t\tmountPath: data.mountPath,\n\t\t\t\ttype: data.type,\n\t\t\t\tmountId,\n\t\t\t})\n\t\t\t\t.then(() => {\n\t\t\t\t\ttoast.success(\"Mount Update\");\n\t\t\t\t\tsetIsOpen(false);\n\t\t\t\t})\n\t\t\t\t.catch(() => {\n\t\t\t\t\ttoast.error(\"Error updating the Volume mount\");\n\t\t\t\t});\n\t\t} else if (data.type === \"file\") {\n\t\t\tawait mutateAsync({\n\t\t\t\tcontent: data.content,\n\t\t\t\tmountPath: data.mountPath,\n\t\t\t\ttype: data.type,\n\t\t\t\tfilePath: data.filePath,\n\t\t\t\tmountId,\n\t\t\t})\n\t\t\t\t.then(() => {\n\t\t\t\t\ttoast.success(\"Mount Update\");\n\t\t\t\t\tsetIsOpen(false);\n\t\t\t\t})\n\t\t\t\t.catch(() => {\n\t\t\t\t\ttoast.error(\"Error updating the File mount\");\n\t\t\t\t});\n\t\t}\n\t\trefetch();\n\t};\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\tclassName=\"group hover:bg-blue-500/10 \"\n\t\t\t\t\tisLoading={isPending}\n\t\t\t\t>\n\t\t\t\t\t<PenBoxIcon className=\"size-3.5  text-primary group-hover:text-blue-500\" />\n\t\t\t\t</Button>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-3xl\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Update</DialogTitle>\n\t\t\t\t\t<DialogDescription>Update the mount</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t{isError && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\t\t\t\t{type === \"file\" && (\n\t\t\t\t\t<AlertBlock type=\"warning\">\n\t\t\t\t\t\tUpdating the mount will recreate the file or directory.\n\t\t\t\t\t</AlertBlock>\n\t\t\t\t)}\n\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tid=\"hook-form-update-volume\"\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\tclassName=\"grid w-full gap-4\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t\t{type === \"bind\" && (\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"hostPath\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Host Path</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"Host Path\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{type === \"volume\" && (\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"volumeName\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Volume Name</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Volume Name\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value || \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t{type === \"file\" && (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\tname=\"content\"\n\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t<FormItem className=\"max-w-full max-w-[45rem]\">\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Content</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CodeEditor\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlanguage=\"properties\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder={`NODE_ENV=production\nPORT=3000\n`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-96 font-mono w-full\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\tname=\"filePath\"\n\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>File Path</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisabled\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Name of the file\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{serviceType !== \"compose\" && (\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"mountPath\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Mount Path (In the container)</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"Mount Path\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tisLoading={isPending}\n\t\t\t\t\t\t\t\t// form=\"hook-form-update-volume\"\n\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tUpdate\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</DialogFooter>\n\t\t\t\t\t</form>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/build/show.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { Cog } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport { Card, CardContent, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport { Checkbox } from \"@/components/ui/checkbox\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { RadioGroup, RadioGroupItem } from \"@/components/ui/radio-group\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { api } from \"@/utils/api\";\n\n// Railpack versions from https://github.com/railwayapp/railpack/releases\nexport const RAILPACK_VERSIONS = [\n\t\"0.15.4\",\n\t\"0.15.3\",\n\t\"0.15.2\",\n\t\"0.15.1\",\n\t\"0.15.0\",\n\t\"0.14.0\",\n\t\"0.13.0\",\n\t\"0.12.0\",\n\t\"0.11.0\",\n\t\"0.10.0\",\n\t\"0.9.2\",\n\t\"0.9.1\",\n\t\"0.9.0\",\n\t\"0.8.0\",\n\t\"0.7.0\",\n\t\"0.6.0\",\n\t\"0.5.0\",\n\t\"0.4.0\",\n\t\"0.3.0\",\n\t\"0.2.2\",\n] as const;\n\nexport enum BuildType {\n\tdockerfile = \"dockerfile\",\n\theroku_buildpacks = \"heroku_buildpacks\",\n\tpaketo_buildpacks = \"paketo_buildpacks\",\n\tnixpacks = \"nixpacks\",\n\tstatic = \"static\",\n\trailpack = \"railpack\",\n}\n\nconst buildTypeDisplayMap: Record<BuildType, string> = {\n\t[BuildType.dockerfile]: \"Dockerfile\",\n\t[BuildType.railpack]: \"Railpack\",\n\t[BuildType.nixpacks]: \"Nixpacks\",\n\t[BuildType.heroku_buildpacks]: \"Heroku Buildpacks\",\n\t[BuildType.paketo_buildpacks]: \"Paketo Buildpacks\",\n\t[BuildType.static]: \"Static\",\n};\n\nconst mySchema = z.discriminatedUnion(\"buildType\", [\n\tz.object({\n\t\tbuildType: z.literal(BuildType.dockerfile),\n\t\tdockerfile: z.string().nullable().default(\"\"),\n\t\tdockerContextPath: z.string().nullable().default(\"\"),\n\t\tdockerBuildStage: z.string().nullable().default(\"\"),\n\t}),\n\tz.object({\n\t\tbuildType: z.literal(BuildType.heroku_buildpacks),\n\t\therokuVersion: z.string().nullable().default(\"\"),\n\t}),\n\tz.object({\n\t\tbuildType: z.literal(BuildType.paketo_buildpacks),\n\t}),\n\tz.object({\n\t\tbuildType: z.literal(BuildType.nixpacks),\n\t\tpublishDirectory: z.string().optional(),\n\t}),\n\tz.object({\n\t\tbuildType: z.literal(BuildType.railpack),\n\t\trailpackVersion: z.string().nullable().default(\"0.15.4\"),\n\t}),\n\tz.object({\n\t\tbuildType: z.literal(BuildType.static),\n\t\tisStaticSpa: z.boolean().default(false),\n\t}),\n]);\n\ntype AddTemplate = z.infer<typeof mySchema>;\n\ninterface Props {\n\tapplicationId: string;\n}\n\ninterface ApplicationData {\n\tbuildType: BuildType;\n\tdockerfile?: string | null;\n\tdockerContextPath?: string | null;\n\tdockerBuildStage?: string | null;\n\therokuVersion?: string | null;\n\tpublishDirectory?: string | null;\n\tisStaticSpa?: boolean | null;\n\trailpackVersion?: string | null | undefined;\n}\n\nfunction isValidBuildType(value: string): value is BuildType {\n\treturn Object.values(BuildType).includes(value as BuildType);\n}\n\nconst resetData = (data: ApplicationData): AddTemplate => {\n\tswitch (data.buildType) {\n\t\tcase BuildType.dockerfile:\n\t\t\treturn {\n\t\t\t\tbuildType: BuildType.dockerfile,\n\t\t\t\tdockerfile: data.dockerfile || \"\",\n\t\t\t\tdockerContextPath: data.dockerContextPath || \"\",\n\t\t\t\tdockerBuildStage: data.dockerBuildStage || \"\",\n\t\t\t};\n\t\tcase BuildType.heroku_buildpacks:\n\t\t\treturn {\n\t\t\t\tbuildType: BuildType.heroku_buildpacks,\n\t\t\t\therokuVersion: data.herokuVersion || \"\",\n\t\t\t};\n\t\tcase BuildType.nixpacks:\n\t\t\treturn {\n\t\t\t\tbuildType: BuildType.nixpacks,\n\t\t\t\tpublishDirectory: data.publishDirectory || undefined,\n\t\t\t};\n\t\tcase BuildType.paketo_buildpacks:\n\t\t\treturn {\n\t\t\t\tbuildType: BuildType.paketo_buildpacks,\n\t\t\t};\n\t\tcase BuildType.static:\n\t\t\treturn {\n\t\t\t\tbuildType: BuildType.static,\n\t\t\t\tisStaticSpa: data.isStaticSpa ?? false,\n\t\t\t};\n\t\tcase BuildType.railpack:\n\t\t\treturn {\n\t\t\t\tbuildType: BuildType.railpack,\n\t\t\t\trailpackVersion: data.railpackVersion || null,\n\t\t\t};\n\t\tdefault: {\n\t\t\tconst buildType = data.buildType as BuildType;\n\t\t\treturn {\n\t\t\t\tbuildType,\n\t\t\t} as AddTemplate;\n\t\t}\n\t}\n};\n\nexport const ShowBuildChooseForm = ({ applicationId }: Props) => {\n\tconst { mutateAsync, isPending } =\n\t\tapi.application.saveBuildType.useMutation();\n\tconst { data, refetch } = api.application.one.useQuery(\n\t\t{ applicationId },\n\t\t{ enabled: !!applicationId },\n\t);\n\n\tconst form = useForm({\n\t\tdefaultValues: {\n\t\t\tbuildType: BuildType.nixpacks,\n\t\t},\n\t\tresolver: zodResolver(mySchema),\n\t});\n\n\tconst buildType = form.watch(\"buildType\");\n\tconst railpackVersion = form.watch(\"railpackVersion\");\n\tconst [isManualRailpackVersion, setIsManualRailpackVersion] = useState(false);\n\n\tuseEffect(() => {\n\t\tif (data) {\n\t\t\tconst typedData: ApplicationData = {\n\t\t\t\t...data,\n\t\t\t\tbuildType: isValidBuildType(data.buildType)\n\t\t\t\t\t? (data.buildType as BuildType)\n\t\t\t\t\t: BuildType.nixpacks, // fallback\n\t\t\t};\n\n\t\t\tform.reset(resetData(typedData));\n\n\t\t\t// Check if railpack version is manual (not in the predefined list)\n\t\t\tif (\n\t\t\t\tdata.railpackVersion &&\n\t\t\t\t!RAILPACK_VERSIONS.includes(data.railpackVersion as any)\n\t\t\t) {\n\t\t\t\tsetIsManualRailpackVersion(true);\n\t\t\t}\n\t\t}\n\t}, [data, form]);\n\n\t// Hide builder section when Docker provider is selected\n\tif (data?.sourceType === \"docker\") {\n\t\treturn null;\n\t}\n\n\tconst onSubmit = async (data: AddTemplate) => {\n\t\tawait mutateAsync({\n\t\t\tapplicationId,\n\t\t\tbuildType: data.buildType,\n\t\t\tpublishDirectory:\n\t\t\t\tdata.buildType === BuildType.nixpacks ? data.publishDirectory : null,\n\t\t\tdockerfile:\n\t\t\t\tdata.buildType === BuildType.dockerfile ? data.dockerfile : null,\n\t\t\tdockerContextPath:\n\t\t\t\tdata.buildType === BuildType.dockerfile ? data.dockerContextPath : null,\n\t\t\tdockerBuildStage:\n\t\t\t\tdata.buildType === BuildType.dockerfile ? data.dockerBuildStage : null,\n\t\t\therokuVersion:\n\t\t\t\tdata.buildType === BuildType.heroku_buildpacks\n\t\t\t\t\t? data.herokuVersion\n\t\t\t\t\t: null,\n\t\t\tisStaticSpa:\n\t\t\t\tdata.buildType === BuildType.static ? data.isStaticSpa : null,\n\t\t\trailpackVersion:\n\t\t\t\tdata.buildType === BuildType.railpack\n\t\t\t\t\t? data.railpackVersion || \"0.15.4\"\n\t\t\t\t\t: null,\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(\"Build type saved\");\n\t\t\t\tawait refetch();\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error saving the build type\");\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<Card className=\"group relative w-full bg-transparent\">\n\t\t\t<CardHeader>\n\t\t\t\t<CardTitle className=\"flex items-start justify-between\">\n\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t<span className=\"flex flex-col space-y-0.5\">Build Type</span>\n\t\t\t\t\t\t<p className=\"flex items-center text-sm font-normal text-muted-foreground\">\n\t\t\t\t\t\t\tSelect the way of building your code\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"hidden space-y-1 text-sm font-normal md:block\">\n\t\t\t\t\t\t<Cog className=\"size-6 text-muted-foreground\" />\n\t\t\t\t\t</div>\n\t\t\t\t</CardTitle>\n\t\t\t</CardHeader>\n\t\t\t<CardContent>\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<AlertBlock>\n\t\t\t\t\t\tBuilders can consume significant memory and CPU resources\n\t\t\t\t\t\t(recommended: 4+ GB RAM and 2+ CPU cores). For production\n\t\t\t\t\t\tenvironments, please review our{\" \"}\n\t\t\t\t\t\t<a\n\t\t\t\t\t\t\thref=\"https://docs.dokploy.com/docs/core/applications/going-production\"\n\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\trel=\"noreferrer\"\n\t\t\t\t\t\t\tclassName=\"font-medium underline underline-offset-4\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tProduction Guide\n\t\t\t\t\t\t</a>{\" \"}\n\t\t\t\t\t\tfor best practices and optimization recommendations. Builders are\n\t\t\t\t\t\tsuitable for development and prototyping purposes when you have\n\t\t\t\t\t\tsufficient resources available.\n\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t<form\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\tclassName=\"grid w-full gap-4 p-2\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"buildType\"\n\t\t\t\t\t\t\tdefaultValue={form.control._defaultValues.buildType}\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"space-y-3\">\n\t\t\t\t\t\t\t\t\t<FormLabel>Build Type</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<RadioGroup\n\t\t\t\t\t\t\t\t\t\t\tonValueChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\tvalue={field.value}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex flex-col space-y-1\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{Object.entries(buildTypeDisplayMap).map(\n\t\t\t\t\t\t\t\t\t\t\t\t([value, label]) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={value}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center space-x-3 space-y-0\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<RadioGroupItem value={value} />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel className=\"font-normal\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{value === BuildType.railpack && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Badge className=\"ml-2 px-1 text-xs\">New</Badge>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t</RadioGroup>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{buildType === BuildType.heroku_buildpacks && (\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"herokuVersion\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Heroku Version (Optional)</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Heroku Version (Default: 24)\"\n\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value ?? \"\"}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{buildType === BuildType.dockerfile && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"dockerfile\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Docker File</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Path of your docker file (default: Dockerfile)\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value ?? \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"dockerContextPath\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Docker Context Path</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Path of your docker context (default: .)\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value ?? \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"dockerBuildStage\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Docker Build Stage</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\tAllows you to target a specific stage in a Multi-stage\n\t\t\t\t\t\t\t\t\t\t\t\t\tDockerfile. If empty, Docker defaults to build the\n\t\t\t\t\t\t\t\t\t\t\t\t\tlast defined stage.\n\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"E.g. production\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value ?? \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{buildType === BuildType.nixpacks && (\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"publishDirectory\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Publish Directory</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\tAllows you to serve a single directory via NGINX after\n\t\t\t\t\t\t\t\t\t\t\t\tthe build phase. Useful if the final build assets should\n\t\t\t\t\t\t\t\t\t\t\t\tbe served as a static site.\n\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Publish Directory\"\n\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value ?? \"\"}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{buildType === BuildType.static && (\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"isStaticSpa\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-x-2 p-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t<Checkbox\n\t\t\t\t\t\t\t\t\t\t\t\t\tid=\"checkboxIsStaticSpa\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={String(field.value)}\n\t\t\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel htmlFor=\"checkboxIsStaticSpa\">\n\t\t\t\t\t\t\t\t\t\t\t\t\tSingle Page Application (SPA)\n\t\t\t\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{buildType === BuildType.railpack && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"railpackVersion\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Railpack Version</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t{isManualRailpackVersion ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Enter custom version (e.g., 0.15.4)\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value ?? \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetIsManualRailpackVersion(false);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(\"0.15.4\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tUse predefined versions\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonValueChange={(value) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (value === \"manual\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetIsManualRailpackVersion(true);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(\"\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(value);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value ?? \"0.15.4\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select Railpack version\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"manual\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-medium\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t✏️ Manual (Custom Version)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{RAILPACK_VERSIONS.map((version) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem key={version} value={version}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tv{version}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{version === \"0.15.4\" && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"ml-2 px-1 text-xs\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLatest\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\tSelect a Railpack version or choose manual to enter a\n\t\t\t\t\t\t\t\t\t\t\t\tcustom version.{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\t\t\t\thref=\"https://github.com/railwayapp/railpack/releases\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\t\t\t\trel=\"noreferrer\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-primary underline underline-offset-4\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\tView releases\n\t\t\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<div className=\"flex w-full justify-end\">\n\t\t\t\t\t\t\t<Button isLoading={isPending} type=\"submit\">\n\t\t\t\t\t\t\t\tSave\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</form>\n\t\t\t\t</Form>\n\t\t\t</CardContent>\n\t\t</Card>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/deployments/cancel-queues.tsx",
    "content": "import { Ban } from \"lucide-react\";\nimport { toast } from \"sonner\";\nimport {\n\tAlertDialog,\n\tAlertDialogAction,\n\tAlertDialogCancel,\n\tAlertDialogContent,\n\tAlertDialogDescription,\n\tAlertDialogFooter,\n\tAlertDialogHeader,\n\tAlertDialogTitle,\n\tAlertDialogTrigger,\n} from \"@/components/ui/alert-dialog\";\nimport { Button } from \"@/components/ui/button\";\nimport { api } from \"@/utils/api\";\n\ninterface Props {\n\tid: string;\n\ttype: \"application\" | \"compose\";\n}\n\nexport const CancelQueues = ({ id, type }: Props) => {\n\tconst { mutateAsync, isPending } =\n\t\ttype === \"application\"\n\t\t\t? api.application.cleanQueues.useMutation()\n\t\t\t: api.compose.cleanQueues.useMutation();\n\tconst { data: isCloud } = api.settings.isCloud.useQuery();\n\n\tif (isCloud) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<AlertDialog>\n\t\t\t<AlertDialogTrigger asChild>\n\t\t\t\t<Button variant=\"destructive\" className=\"w-fit\" isLoading={isPending}>\n\t\t\t\t\tCancel Queues\n\t\t\t\t\t<Ban className=\"size-4\" />\n\t\t\t\t</Button>\n\t\t\t</AlertDialogTrigger>\n\t\t\t<AlertDialogContent>\n\t\t\t\t<AlertDialogHeader>\n\t\t\t\t\t<AlertDialogTitle>\n\t\t\t\t\t\tAre you sure to cancel the incoming deployments?\n\t\t\t\t\t</AlertDialogTitle>\n\t\t\t\t\t<AlertDialogDescription>\n\t\t\t\t\t\tThis will cancel all the incoming deployments\n\t\t\t\t\t</AlertDialogDescription>\n\t\t\t\t</AlertDialogHeader>\n\t\t\t\t<AlertDialogFooter>\n\t\t\t\t\t<AlertDialogCancel>Cancel</AlertDialogCancel>\n\t\t\t\t\t<AlertDialogAction\n\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\tawait mutateAsync({\n\t\t\t\t\t\t\t\tapplicationId: id || \"\",\n\t\t\t\t\t\t\t\tcomposeId: id || \"\",\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\ttoast.success(\"Queues are being cleaned\");\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.catch((err) => {\n\t\t\t\t\t\t\t\t\ttoast.error(err.message);\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tConfirm\n\t\t\t\t\t</AlertDialogAction>\n\t\t\t\t</AlertDialogFooter>\n\t\t\t</AlertDialogContent>\n\t\t</AlertDialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/deployments/clear-deployments.tsx",
    "content": "import { Paintbrush } from \"lucide-react\";\nimport { toast } from \"sonner\";\nimport {\n\tAlertDialog,\n\tAlertDialogAction,\n\tAlertDialogCancel,\n\tAlertDialogContent,\n\tAlertDialogDescription,\n\tAlertDialogFooter,\n\tAlertDialogHeader,\n\tAlertDialogTitle,\n\tAlertDialogTrigger,\n} from \"@/components/ui/alert-dialog\";\nimport { Button } from \"@/components/ui/button\";\nimport { api } from \"@/utils/api\";\n\ninterface Props {\n\tid: string;\n\ttype: \"application\" | \"compose\";\n}\n\nexport const ClearDeployments = ({ id, type }: Props) => {\n\tconst utils = api.useUtils();\n\tconst { mutateAsync, isPending } =\n\t\ttype === \"application\"\n\t\t\t? api.application.clearDeployments.useMutation()\n\t\t\t: api.compose.clearDeployments.useMutation();\n\n\treturn (\n\t\t<AlertDialog>\n\t\t\t<AlertDialogTrigger asChild>\n\t\t\t\t<Button variant=\"outline\" className=\"w-fit\" isLoading={isPending}>\n\t\t\t\t\tClear deployments\n\t\t\t\t\t<Paintbrush className=\"size-4\" />\n\t\t\t\t</Button>\n\t\t\t</AlertDialogTrigger>\n\t\t\t<AlertDialogContent>\n\t\t\t\t<AlertDialogHeader>\n\t\t\t\t\t<AlertDialogTitle>\n\t\t\t\t\t\tAre you sure you want to clear old deployments?\n\t\t\t\t\t</AlertDialogTitle>\n\t\t\t\t\t<AlertDialogDescription>\n\t\t\t\t\t\tThis will delete all old deployment records and logs, keeping only\n\t\t\t\t\t\tthe active deployment (the most recent successful one).\n\t\t\t\t\t</AlertDialogDescription>\n\t\t\t\t</AlertDialogHeader>\n\t\t\t\t<AlertDialogFooter>\n\t\t\t\t\t<AlertDialogCancel>Cancel</AlertDialogCancel>\n\t\t\t\t\t<AlertDialogAction\n\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\tawait mutateAsync({\n\t\t\t\t\t\t\t\tapplicationId: id || \"\",\n\t\t\t\t\t\t\t\tcomposeId: id || \"\",\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.then(async () => {\n\t\t\t\t\t\t\t\t\ttoast.success(\"Old deployments cleared successfully\");\n\t\t\t\t\t\t\t\t\tawait utils.deployment.allByType.invalidate({\n\t\t\t\t\t\t\t\t\t\tid,\n\t\t\t\t\t\t\t\t\t\ttype: type as \"application\" | \"compose\",\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.catch((err) => {\n\t\t\t\t\t\t\t\t\ttoast.error(err.message);\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tConfirm\n\t\t\t\t\t</AlertDialogAction>\n\t\t\t\t</AlertDialogFooter>\n\t\t\t</AlertDialogContent>\n\t\t</AlertDialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/deployments/kill-build.tsx",
    "content": "import { Scissors } from \"lucide-react\";\nimport { toast } from \"sonner\";\nimport {\n\tAlertDialog,\n\tAlertDialogAction,\n\tAlertDialogCancel,\n\tAlertDialogContent,\n\tAlertDialogDescription,\n\tAlertDialogFooter,\n\tAlertDialogHeader,\n\tAlertDialogTitle,\n\tAlertDialogTrigger,\n} from \"@/components/ui/alert-dialog\";\nimport { Button } from \"@/components/ui/button\";\nimport { api } from \"@/utils/api\";\n\ninterface Props {\n\tid: string;\n\ttype: \"application\" | \"compose\";\n}\n\nexport const KillBuild = ({ id, type }: Props) => {\n\tconst { mutateAsync, isPending } =\n\t\ttype === \"application\"\n\t\t\t? api.application.killBuild.useMutation()\n\t\t\t: api.compose.killBuild.useMutation();\n\n\treturn (\n\t\t<AlertDialog>\n\t\t\t<AlertDialogTrigger asChild>\n\t\t\t\t<Button variant=\"outline\" className=\"w-fit\" isLoading={isPending}>\n\t\t\t\t\tKill Build\n\t\t\t\t\t<Scissors className=\"size-4\" />\n\t\t\t\t</Button>\n\t\t\t</AlertDialogTrigger>\n\t\t\t<AlertDialogContent>\n\t\t\t\t<AlertDialogHeader>\n\t\t\t\t\t<AlertDialogTitle>Are you sure to kill the build?</AlertDialogTitle>\n\t\t\t\t\t<AlertDialogDescription>\n\t\t\t\t\t\tThis will kill the build process\n\t\t\t\t\t</AlertDialogDescription>\n\t\t\t\t</AlertDialogHeader>\n\t\t\t\t<AlertDialogFooter>\n\t\t\t\t\t<AlertDialogCancel>Cancel</AlertDialogCancel>\n\t\t\t\t\t<AlertDialogAction\n\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\tawait mutateAsync({\n\t\t\t\t\t\t\t\tapplicationId: id || \"\",\n\t\t\t\t\t\t\t\tcomposeId: id || \"\",\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\ttoast.success(\"Build killed successfully\");\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.catch((err) => {\n\t\t\t\t\t\t\t\t\ttoast.error(err.message);\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tConfirm\n\t\t\t\t\t</AlertDialogAction>\n\t\t\t\t</AlertDialogFooter>\n\t\t\t</AlertDialogContent>\n\t\t</AlertDialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/deployments/refresh-token.tsx",
    "content": "import { RefreshCcw } from \"lucide-react\";\nimport { toast } from \"sonner\";\nimport {\n\tAlertDialog,\n\tAlertDialogAction,\n\tAlertDialogCancel,\n\tAlertDialogContent,\n\tAlertDialogDescription,\n\tAlertDialogFooter,\n\tAlertDialogHeader,\n\tAlertDialogTitle,\n\tAlertDialogTrigger,\n} from \"@/components/ui/alert-dialog\";\nimport { api } from \"@/utils/api\";\n\ninterface Props {\n\tid: string;\n\ttype: \"application\" | \"compose\";\n}\nexport const RefreshToken = ({ id, type }: Props) => {\n\tconst { mutateAsync } =\n\t\ttype === \"application\"\n\t\t\t? api.application.refreshToken.useMutation()\n\t\t\t: api.compose.refreshToken.useMutation();\n\tconst utils = api.useUtils();\n\treturn (\n\t\t<AlertDialog>\n\t\t\t<AlertDialogTrigger>\n\t\t\t\t<RefreshCcw className=\"h-4 w-4 cursor-pointer text-muted-foreground\" />\n\t\t\t</AlertDialogTrigger>\n\t\t\t<AlertDialogContent>\n\t\t\t\t<AlertDialogHeader>\n\t\t\t\t\t<AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>\n\t\t\t\t\t<AlertDialogDescription>\n\t\t\t\t\t\tThis action cannot be undone. This will change the refresh token and\n\t\t\t\t\t\tother tokens will be invalidated.\n\t\t\t\t\t</AlertDialogDescription>\n\t\t\t\t</AlertDialogHeader>\n\t\t\t\t<AlertDialogFooter>\n\t\t\t\t\t<AlertDialogCancel>Cancel</AlertDialogCancel>\n\t\t\t\t\t<AlertDialogAction\n\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\tawait mutateAsync({\n\t\t\t\t\t\t\t\tapplicationId: id || \"\",\n\t\t\t\t\t\t\t\tcomposeId: id || \"\",\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\tif (type === \"application\") {\n\t\t\t\t\t\t\t\t\t\tutils.application.one.invalidate({\n\t\t\t\t\t\t\t\t\t\t\tapplicationId: id,\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tutils.compose.one.invalidate({\n\t\t\t\t\t\t\t\t\t\t\tcomposeId: id,\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\ttoast.success(\"Refresh updated\");\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\ttoast.error(\"Error updating the refresh token\");\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tConfirm\n\t\t\t\t\t</AlertDialogAction>\n\t\t\t\t</AlertDialogFooter>\n\t\t\t</AlertDialogContent>\n\t\t</AlertDialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/deployments/show-deployment.tsx",
    "content": "import copy from \"copy-to-clipboard\";\nimport { Check, Copy, Loader2 } from \"lucide-react\";\nimport { useEffect, useRef, useState } from \"react\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport { Checkbox } from \"@/components/ui/checkbox\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogHeader,\n\tDialogTitle,\n} from \"@/components/ui/dialog\";\nimport { TerminalLine } from \"../../docker/logs/terminal-line\";\nimport { type LogLine, parseLogs } from \"../../docker/logs/utils\";\n\ninterface Props {\n\tlogPath: string | null;\n\topen: boolean;\n\tonClose: () => void;\n\tserverId?: string;\n\terrorMessage?: string;\n}\nexport const ShowDeployment = ({\n\tlogPath,\n\topen,\n\tonClose,\n\tserverId,\n\terrorMessage,\n}: Props) => {\n\tconst [data, setData] = useState(\"\");\n\tconst [showExtraLogs, setShowExtraLogs] = useState(false);\n\tconst [filteredLogs, setFilteredLogs] = useState<LogLine[]>([]);\n\tconst wsRef = useRef<WebSocket | null>(null);\n\tconst [autoScroll, setAutoScroll] = useState(true);\n\tconst scrollRef = useRef<HTMLDivElement>(null);\n\tconst [copied, setCopied] = useState(false);\n\n\tconst scrollToBottom = () => {\n\t\tif (autoScroll && scrollRef.current) {\n\t\t\tscrollRef.current.scrollTop = scrollRef.current.scrollHeight;\n\t\t}\n\t};\n\n\tconst handleScroll = () => {\n\t\tif (!scrollRef.current) return;\n\n\t\tconst { scrollTop, scrollHeight, clientHeight } = scrollRef.current;\n\t\tconst isAtBottom = Math.abs(scrollHeight - scrollTop - clientHeight) < 10;\n\t\tsetAutoScroll(isAtBottom);\n\t};\n\n\tuseEffect(() => {\n\t\tif (!open || !logPath) return;\n\n\t\tsetData(\"\");\n\t\tconst protocol = window.location.protocol === \"https:\" ? \"wss:\" : \"ws:\";\n\n\t\tconst wsUrl = `${protocol}//${window.location.host}/listen-deployment?logPath=${logPath}${serverId ? `&serverId=${serverId}` : \"\"}`;\n\t\tconst ws = new WebSocket(wsUrl);\n\t\twsRef.current = ws; // Store WebSocket instance in ref\n\n\t\tws.onmessage = (e) => {\n\t\t\tsetData((currentData) => currentData + e.data);\n\t\t};\n\n\t\tws.onerror = (error) => {\n\t\t\tconsole.error(\"WebSocket error: \", error);\n\t\t};\n\n\t\tws.onclose = () => {\n\t\t\twsRef.current = null; // Clear reference on close\n\t\t};\n\n\t\treturn () => {\n\t\t\tif (wsRef.current?.readyState === WebSocket.OPEN) {\n\t\t\t\tws.close();\n\t\t\t\twsRef.current = null;\n\t\t\t}\n\t\t};\n\t}, [logPath, open]);\n\n\tuseEffect(() => {\n\t\tconst logs = parseLogs(data);\n\t\tlet filteredLogsResult = logs;\n\t\tif (serverId) {\n\t\t\tlet hideSubsequentLogs = false;\n\t\t\tfilteredLogsResult = logs.filter((log) => {\n\t\t\t\tif (\n\t\t\t\t\tlog.message.includes(\n\t\t\t\t\t\t\"===================================EXTRA LOGS============================================\",\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\thideSubsequentLogs = true;\n\t\t\t\t\treturn showExtraLogs;\n\t\t\t\t}\n\t\t\t\treturn showExtraLogs ? true : !hideSubsequentLogs;\n\t\t\t});\n\t\t}\n\n\t\tsetFilteredLogs(filteredLogsResult);\n\t}, [data, showExtraLogs]);\n\n\tuseEffect(() => {\n\t\tscrollToBottom();\n\n\t\tif (autoScroll && scrollRef.current) {\n\t\t\tscrollRef.current.scrollTop = scrollRef.current.scrollHeight;\n\t\t}\n\t}, [filteredLogs, autoScroll]);\n\n\tconst handleCopy = () => {\n\t\tconst logContent = filteredLogs\n\t\t\t.map(({ timestamp, message }: LogLine) =>\n\t\t\t\t`${timestamp?.toISOString() || \"\"} ${message}`.trim(),\n\t\t\t)\n\t\t\t.join(\"\\n\");\n\n\t\tconst success = copy(logContent);\n\t\tif (success) {\n\t\t\tsetCopied(true);\n\t\t\tsetTimeout(() => setCopied(false), 2000);\n\t\t}\n\t};\n\n\tconst optionalErrors = parseLogs(errorMessage || \"\");\n\n\treturn (\n\t\t<Dialog\n\t\t\topen={open}\n\t\t\tonOpenChange={(e) => {\n\t\t\t\tonClose();\n\t\t\t\tif (!e) {\n\t\t\t\t\tsetData(\"\");\n\t\t\t\t}\n\n\t\t\t\tif (wsRef.current) {\n\t\t\t\t\tif (wsRef.current.readyState === WebSocket.OPEN) {\n\t\t\t\t\t\twsRef.current.close();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}}\n\t\t>\n\t\t\t<DialogContent className={\"sm:max-w-5xl\"}>\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Deployment</DialogTitle>\n\t\t\t\t\t<DialogDescription className=\"flex items-center gap-2\">\n\t\t\t\t\t\t<span className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\tSee all the details of this deployment |{\" \"}\n\t\t\t\t\t\t\t<Badge variant=\"blank\" className=\"text-xs\">\n\t\t\t\t\t\t\t\t{filteredLogs.length} lines\n\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t</span>\n\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\tclassName=\"h-7\"\n\t\t\t\t\t\t\tonClick={handleCopy}\n\t\t\t\t\t\t\tdisabled={filteredLogs.length === 0}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{copied ? (\n\t\t\t\t\t\t\t\t<Check className=\"h-3.5 w-3.5\" />\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<Copy className=\"h-3.5 w-3.5\" />\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</Button>\n\n\t\t\t\t\t\t{serverId && (\n\t\t\t\t\t\t\t<div className=\"flex items-center space-x-2\">\n\t\t\t\t\t\t\t\t<Checkbox\n\t\t\t\t\t\t\t\t\tid=\"show-extra-logs\"\n\t\t\t\t\t\t\t\t\tchecked={showExtraLogs}\n\t\t\t\t\t\t\t\t\tonCheckedChange={(checked) =>\n\t\t\t\t\t\t\t\t\t\tsetShowExtraLogs(checked as boolean)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<label\n\t\t\t\t\t\t\t\t\thtmlFor=\"show-extra-logs\"\n\t\t\t\t\t\t\t\t\tclassName=\"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tShow Extra Logs\n\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\n\t\t\t\t<div\n\t\t\t\t\tref={scrollRef}\n\t\t\t\t\tonScroll={handleScroll}\n\t\t\t\t\tclassName=\"h-[720px] overflow-y-auto space-y-0 border p-4 bg-[#fafafa] dark:bg-[#050506] rounded custom-logs-scrollbar\"\n\t\t\t\t>\n\t\t\t\t\t{\" \"}\n\t\t\t\t\t{filteredLogs.length > 0 ? (\n\t\t\t\t\t\tfilteredLogs.map((log: LogLine, index: number) => (\n\t\t\t\t\t\t\t<TerminalLine\n\t\t\t\t\t\t\t\tkey={`${log.rawTimestamp ?? \"\"}-${index}`}\n\t\t\t\t\t\t\t\tlog={log}\n\t\t\t\t\t\t\t\tnoTimestamp\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t))\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{optionalErrors.length > 0 ? (\n\t\t\t\t\t\t\t\toptionalErrors.map((log: LogLine, index: number) => (\n\t\t\t\t\t\t\t\t\t<TerminalLine\n\t\t\t\t\t\t\t\t\t\tkey={`extra-${log.rawTimestamp ?? \"\"}-${index}`}\n\t\t\t\t\t\t\t\t\t\tlog={log}\n\t\t\t\t\t\t\t\t\t\tnoTimestamp\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t))\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<div className=\"flex justify-center items-center h-full text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t<Loader2 className=\"h-6 w-6 animate-spin\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/deployments/show-deployments-modal.tsx",
    "content": "import { useState } from \"react\";\nimport { Button } from \"@/components/ui/button\";\nimport { Dialog, DialogContent, DialogTrigger } from \"@/components/ui/dialog\";\nimport type { RouterOutputs } from \"@/utils/api\";\nimport { ShowDeployment } from \"../deployments/show-deployment\";\nimport { ShowDeployments } from \"./show-deployments\";\n\ninterface Props {\n\tid: string;\n\ttype:\n\t\t| \"application\"\n\t\t| \"compose\"\n\t\t| \"schedule\"\n\t\t| \"server\"\n\t\t| \"backup\"\n\t\t| \"previewDeployment\"\n\t\t| \"volumeBackup\";\n\tserverId?: string;\n\trefreshToken?: string;\n\tchildren?: React.ReactNode;\n}\n\nexport const formatDuration = (seconds: number) => {\n\tif (seconds < 60) return `${seconds}s`;\n\tconst minutes = Math.floor(seconds / 60);\n\tconst remainingSeconds = seconds % 60;\n\treturn `${minutes}m ${remainingSeconds}s`;\n};\n\nexport const ShowDeploymentsModal = ({\n\tid,\n\ttype,\n\tserverId,\n\trefreshToken,\n\tchildren,\n}: Props) => {\n\tconst [activeLog, setActiveLog] = useState<\n\t\tRouterOutputs[\"deployment\"][\"all\"][number] | null\n\t>(null);\n\tconst [isOpen, setIsOpen] = useState(false);\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t{children ? (\n\t\t\t\t\tchildren\n\t\t\t\t) : (\n\t\t\t\t\t<Button className=\"sm:w-auto w-full\" size=\"sm\" variant=\"outline\">\n\t\t\t\t\t\tView Logs\n\t\t\t\t\t</Button>\n\t\t\t\t)}\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-5xl p-0\">\n\t\t\t\t<ShowDeployments\n\t\t\t\t\tid={id}\n\t\t\t\t\ttype={type}\n\t\t\t\t\tserverId={serverId}\n\t\t\t\t\trefreshToken={refreshToken}\n\t\t\t\t/>\n\t\t\t</DialogContent>\n\t\t\t<ShowDeployment\n\t\t\t\tserverId={serverId || \"\"}\n\t\t\t\topen={Boolean(activeLog && activeLog.logPath !== null)}\n\t\t\t\tonClose={() => setActiveLog(null)}\n\t\t\t\tlogPath={activeLog?.logPath || \"\"}\n\t\t\t\terrorMessage={activeLog?.errorMessage || \"\"}\n\t\t\t/>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/deployments/show-deployments.tsx",
    "content": "import {\n\tChevronDown,\n\tChevronUp,\n\tClock,\n\tCopy,\n\tLoader2,\n\tRefreshCcw,\n\tRocketIcon,\n\tSettings,\n\tTrash2,\n} from \"lucide-react\";\nimport React, { useEffect, useMemo, useState } from \"react\";\nimport { toast } from \"sonner\";\nimport copy from \"copy-to-clipboard\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { DateTooltip } from \"@/components/shared/date-tooltip\";\nimport { DialogAction } from \"@/components/shared/dialog-action\";\nimport { StatusTooltip } from \"@/components/shared/status-tooltip\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport { api, type RouterOutputs } from \"@/utils/api\";\nimport { ShowRollbackSettings } from \"../rollbacks/show-rollback-settings\";\nimport { CancelQueues } from \"./cancel-queues\";\nimport { ClearDeployments } from \"./clear-deployments\";\nimport { KillBuild } from \"./kill-build\";\nimport { RefreshToken } from \"./refresh-token\";\nimport { ShowDeployment } from \"./show-deployment\";\n\ninterface Props {\n\tid: string;\n\ttype:\n\t\t| \"application\"\n\t\t| \"compose\"\n\t\t| \"schedule\"\n\t\t| \"server\"\n\t\t| \"backup\"\n\t\t| \"previewDeployment\"\n\t\t| \"volumeBackup\";\n\trefreshToken?: string;\n\tserverId?: string;\n}\n\nexport const formatDuration = (seconds: number) => {\n\tif (seconds < 60) return `${seconds}s`;\n\tconst minutes = Math.floor(seconds / 60);\n\tconst remainingSeconds = seconds % 60;\n\treturn `${minutes}m ${remainingSeconds}s`;\n};\n\nexport const ShowDeployments = ({\n\tid,\n\ttype,\n\trefreshToken,\n\tserverId,\n}: Props) => {\n\tconst [activeLog, setActiveLog] = useState<\n\t\tRouterOutputs[\"deployment\"][\"all\"][number] | null\n\t>(null);\n\tconst { data: deployments, isPending: isLoadingDeployments } =\n\t\tapi.deployment.allByType.useQuery(\n\t\t\t{\n\t\t\t\tid,\n\t\t\t\ttype,\n\t\t\t},\n\t\t\t{\n\t\t\t\tenabled: !!id,\n\t\t\t\trefetchInterval: 1000,\n\t\t\t},\n\t\t);\n\n\tconst { data: isCloud } = api.settings.isCloud.useQuery();\n\n\tconst { mutateAsync: rollback, isPending: isRollingBack } =\n\t\tapi.rollback.rollback.useMutation();\n\tconst { mutateAsync: killProcess, isPending: isKillingProcess } =\n\t\tapi.deployment.killProcess.useMutation();\n\tconst { mutateAsync: removeDeployment, isPending: isRemovingDeployment } =\n\t\tapi.deployment.removeDeployment.useMutation();\n\n\t// Cancel deployment mutations\n\tconst {\n\t\tmutateAsync: cancelApplicationDeployment,\n\t\tisPending: isCancellingApp,\n\t} = api.application.cancelDeployment.useMutation();\n\tconst {\n\t\tmutateAsync: cancelComposeDeployment,\n\t\tisPending: isCancellingCompose,\n\t} = api.compose.cancelDeployment.useMutation();\n\n\tconst [url, setUrl] = React.useState(\"\");\n\tconst [expandedDescriptions, setExpandedDescriptions] = useState<Set<string>>(\n\t\tnew Set(),\n\t);\n\n\tconst webhookUrl = useMemo(\n\t\t() =>\n\t\t\t`${url}/api/deploy${type === \"compose\" ? \"/compose\" : \"\"}/${refreshToken}`,\n\t\t[url, refreshToken, type],\n\t);\n\n\tconst MAX_DESCRIPTION_LENGTH = 200;\n\n\tconst truncateDescription = (description: string): string => {\n\t\tif (description.length <= MAX_DESCRIPTION_LENGTH) {\n\t\t\treturn description;\n\t\t}\n\t\tconst truncated = description.slice(0, MAX_DESCRIPTION_LENGTH);\n\t\tconst lastSpace = truncated.lastIndexOf(\" \");\n\t\tif (lastSpace > MAX_DESCRIPTION_LENGTH - 20 && lastSpace > 0) {\n\t\t\treturn `${truncated.slice(0, lastSpace)}...`;\n\t\t}\n\t\treturn `${truncated}...`;\n\t};\n\n\t// Check for stuck deployment (more than 9 minutes) - only for the most recent deployment\n\tconst stuckDeployment = useMemo(() => {\n\t\tif (!isCloud || !deployments || deployments.length === 0) return null;\n\n\t\tconst now = Date.now();\n\t\tconst NINE_MINUTES = 10 * 60 * 1000; // 9 minutes in milliseconds\n\n\t\t// Get the most recent deployment (first in the list since they're sorted by date)\n\t\tconst mostRecentDeployment = deployments[0];\n\n\t\tif (\n\t\t\t!mostRecentDeployment ||\n\t\t\tmostRecentDeployment.status !== \"running\" ||\n\t\t\t!mostRecentDeployment.startedAt\n\t\t) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst startTime = new Date(mostRecentDeployment.startedAt).getTime();\n\t\tconst elapsed = now - startTime;\n\n\t\treturn elapsed > NINE_MINUTES ? mostRecentDeployment : null;\n\t}, [isCloud, deployments]);\n\tuseEffect(() => {\n\t\tsetUrl(document.location.origin);\n\t}, []);\n\n\treturn (\n\t\t<Card className=\"bg-background border-none\">\n\t\t\t<CardHeader className=\"flex flex-row items-center justify-between flex-wrap gap-2\">\n\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t<CardTitle className=\"text-xl\">Deployments</CardTitle>\n\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\tSee the last 10 deployments for this {type}\n\t\t\t\t\t</CardDescription>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"flex flex-row items-center flex-wrap gap-2\">\n\t\t\t\t\t{(type === \"application\" || type === \"compose\") && (\n\t\t\t\t\t\t<ClearDeployments id={id} type={type} />\n\t\t\t\t\t)}\n\t\t\t\t\t{(type === \"application\" || type === \"compose\") && (\n\t\t\t\t\t\t<KillBuild id={id} type={type} />\n\t\t\t\t\t)}\n\t\t\t\t\t{(type === \"application\" || type === \"compose\") && (\n\t\t\t\t\t\t<CancelQueues id={id} type={type} />\n\t\t\t\t\t)}\n\t\t\t\t\t{type === \"application\" && (\n\t\t\t\t\t\t<ShowRollbackSettings applicationId={id}>\n\t\t\t\t\t\t\t<Button variant=\"outline\">\n\t\t\t\t\t\t\t\tConfigure Rollbacks <Settings className=\"size-4\" />\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</ShowRollbackSettings>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</CardHeader>\n\t\t\t<CardContent className=\"flex flex-col gap-4\">\n\t\t\t\t{stuckDeployment && (type === \"application\" || type === \"compose\") && (\n\t\t\t\t\t<AlertBlock\n\t\t\t\t\t\ttype=\"warning\"\n\t\t\t\t\t\tclassName=\"flex-col items-start w-full p-4\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"flex flex-col gap-3\">\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<div className=\"font-medium text-sm mb-1\">\n\t\t\t\t\t\t\t\t\tBuild appears to be stuck\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<p className=\"text-sm\">\n\t\t\t\t\t\t\t\t\tHey! Looks like the build has been running for more than 10\n\t\t\t\t\t\t\t\t\tminutes. Would you like to cancel this deployment?\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant=\"destructive\"\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\tclassName=\"w-fit\"\n\t\t\t\t\t\t\t\tisLoading={\n\t\t\t\t\t\t\t\t\ttype === \"application\" ? isCancellingApp : isCancellingCompose\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\tif (type === \"application\") {\n\t\t\t\t\t\t\t\t\t\t\tawait cancelApplicationDeployment({\n\t\t\t\t\t\t\t\t\t\t\t\tapplicationId: id,\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t} else if (type === \"compose\") {\n\t\t\t\t\t\t\t\t\t\t\tawait cancelComposeDeployment({\n\t\t\t\t\t\t\t\t\t\t\t\tcomposeId: id,\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\ttoast.success(\"Deployment cancellation requested\");\n\t\t\t\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\t\t\t\ttoast.error(\n\t\t\t\t\t\t\t\t\t\t\terror instanceof Error\n\t\t\t\t\t\t\t\t\t\t\t\t? error.message\n\t\t\t\t\t\t\t\t\t\t\t\t: \"Failed to cancel deployment\",\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tCancel Deployment\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</AlertBlock>\n\t\t\t\t)}\n\t\t\t\t{refreshToken && (\n\t\t\t\t\t<div className=\"flex flex-col gap-2 text-sm\">\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\tIf you want to re-deploy this application use this URL in the\n\t\t\t\t\t\t\tconfig of your git provider or docker\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<div className=\"flex flex-row items-center gap-2 flex-wrap\">\n\t\t\t\t\t\t\t<span>Webhook URL: </span>\n\t\t\t\t\t\t\t<div className=\"flex flex-row items-center gap-2\">\n\t\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\t\t\t\ttabIndex={0}\n\t\t\t\t\t\t\t\t\taria-label=\"Copy webhook URL to clipboard\"\n\t\t\t\t\t\t\t\t\tclassName=\"p-2 rounded-md ml-1 mr-1 hover:border-primary hover:text-primary-foreground hover:bg-primary hover:cursor-pointer whitespace-normal break-all\"\n\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\tonKeyDown={(event) => {\n\t\t\t\t\t\t\t\t\t\tif (event.key === \"Enter\" || event.key === \" \") {\n\t\t\t\t\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t\t\t\t\tcopy(webhookUrl);\n\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Copied to clipboard.\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\tcopy(webhookUrl);\n\t\t\t\t\t\t\t\t\t\ttoast.success(\"Copied to clipboard.\");\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{webhookUrl}\n\t\t\t\t\t\t\t\t\t<Copy className=\"h-4 w-4 ml-2\" />\n\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t{(type === \"application\" || type === \"compose\") && (\n\t\t\t\t\t\t\t\t\t<RefreshToken id={id} type={type} />\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t{isLoadingDeployments ? (\n\t\t\t\t\t<div className=\"flex w-full flex-row items-center justify-center gap-3 pt-10 min-h-[25vh]\">\n\t\t\t\t\t\t<Loader2 className=\"size-6 text-muted-foreground animate-spin\" />\n\t\t\t\t\t\t<span className=\"text-base text-muted-foreground\">\n\t\t\t\t\t\t\tLoading deployments...\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t) : deployments?.length === 0 ? (\n\t\t\t\t\t<div className=\"flex w-full flex-col items-center justify-center gap-3 pt-10 min-h-[25vh]\">\n\t\t\t\t\t\t<RocketIcon className=\"size-8 text-muted-foreground\" />\n\t\t\t\t\t\t<span className=\"text-base text-muted-foreground\">\n\t\t\t\t\t\t\tNo deployments found\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t{deployments?.map((deployment, index) => {\n\t\t\t\t\t\t\tconst titleText = deployment?.title?.trim() || \"\";\n\t\t\t\t\t\t\tconst needsTruncation = titleText.length > MAX_DESCRIPTION_LENGTH;\n\t\t\t\t\t\t\tconst isExpanded = expandedDescriptions.has(\n\t\t\t\t\t\t\t\tdeployment.deploymentId,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tconst canDelete =\n\t\t\t\t\t\t\t\tdeployment.status === \"done\" || deployment.status === \"error\";\n\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tkey={deployment.deploymentId}\n\t\t\t\t\t\t\t\t\tclassName=\"flex flex-col gap-4 rounded-lg border p-4 sm:flex-row sm:items-center sm:justify-between\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-1 flex-col min-w-0\">\n\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-4 font-medium capitalize text-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t{index + 1}. {deployment.status}\n\t\t\t\t\t\t\t\t\t\t\t<StatusTooltip\n\t\t\t\t\t\t\t\t\t\t\t\tstatus={deployment?.status}\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"size-2.5\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</span>\n\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"break-words text-sm text-muted-foreground whitespace-pre-wrap\">\n\t\t\t\t\t\t\t\t\t\t\t\t{isExpanded || !needsTruncation\n\t\t\t\t\t\t\t\t\t\t\t\t\t? titleText\n\t\t\t\t\t\t\t\t\t\t\t\t\t: truncateDescription(titleText)}\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t{needsTruncation && (\n\t\t\t\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst next = new Set(expandedDescriptions);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (next.has(deployment.deploymentId)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnext.delete(deployment.deploymentId);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnext.add(deployment.deploymentId);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetExpandedDescriptions(next);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors w-fit mt-1 cursor-pointer\"\n\t\t\t\t\t\t\t\t\t\t\t\t\taria-label={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tisExpanded\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Collapse commit message\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Expand commit message\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{isExpanded ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ChevronUp className=\"size-3\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShow less\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ChevronDown className=\"size-3\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShow more\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t{/* Hash (from description) - shown in compact form */}\n\t\t\t\t\t\t\t\t\t\t\t{deployment.description?.trim() && (\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-xs text-muted-foreground font-mono\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{deployment.description}\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div className=\"flex w-full flex-col items-start gap-2 sm:w-auto sm:max-w-[300px] sm:items-end sm:justify-start\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"text-sm capitalize text-muted-foreground flex flex-wrap items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t<DateTooltip date={deployment.createdAt} />\n\t\t\t\t\t\t\t\t\t\t\t{deployment.startedAt && deployment.finishedAt && (\n\t\t\t\t\t\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-[10px] gap-1 flex items-center\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Clock className=\"size-3\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t{formatDuration(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tMath.floor(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(new Date(deployment.finishedAt).getTime() -\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew Date(deployment.startedAt).getTime()) /\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t1000,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center sm:justify-end\">\n\t\t\t\t\t\t\t\t\t\t\t{deployment.pid && deployment.status === \"running\" && (\n\t\t\t\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"Kill Process\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to kill the process?\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"default\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait killProcess({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdeploymentId: deployment.deploymentId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Process killed successfully\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error killing process\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"destructive\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tisLoading={isKillingProcess}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-full sm:w-auto\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tKill Process\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetActiveLog(deployment);\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-full sm:w-auto\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\tView\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\n\t\t\t\t\t\t\t\t\t\t\t{canDelete && (\n\t\t\t\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"Delete Deployment\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to delete this deployment? This action cannot be undone.\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"default\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait removeDeployment({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdeploymentId: deployment.deploymentId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Deployment deleted successfully\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error deleting deployment\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"destructive\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tisLoading={isRemovingDeployment}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDelete\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Trash2 className=\"size-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t\t\t{deployment?.rollback &&\n\t\t\t\t\t\t\t\t\t\t\t\tdeployment.status === \"done\" &&\n\t\t\t\t\t\t\t\t\t\t\t\ttype === \"application\" && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"Rollback to this deployment\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAre you sure you want to rollback to this\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdeployment?\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<AlertBlock type=\"info\" className=\"text-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tPlease wait a few seconds while the image is\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpulled from the registry. Your application\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tshould be running shortly.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"default\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait rollback({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trollbackId: deployment.rollback.rollbackId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Rollback initiated successfully\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error initiating rollback\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisLoading={isRollingBack}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-full sm:w-auto\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<RefreshCcw className=\"size-4 text-primary group-hover:text-red-500\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tRollback\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t})}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t<ShowDeployment\n\t\t\t\t\tserverId={activeLog?.buildServerId || serverId}\n\t\t\t\t\topen={Boolean(activeLog && activeLog.logPath !== null)}\n\t\t\t\t\tonClose={() => setActiveLog(null)}\n\t\t\t\t\tlogPath={activeLog?.logPath || \"\"}\n\t\t\t\t\terrorMessage={activeLog?.errorMessage || \"\"}\n\t\t\t\t/>\n\t\t\t</CardContent>\n\t\t</Card>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/domains/dns-helper-modal.tsx",
    "content": "import { Copy, HelpCircle, Server } from \"lucide-react\";\nimport { toast } from \"sonner\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\n\ninterface Props {\n\tdomain: {\n\t\thost: string;\n\t\thttps: boolean;\n\t\tpath?: string;\n\t};\n\tserverIp?: string;\n}\n\nexport const DnsHelperModal = ({ domain, serverIp }: Props) => {\n\tconst copyToClipboard = (text: string) => {\n\t\tnavigator.clipboard.writeText(text);\n\t\ttoast.success(\"Copied to clipboard!\");\n\t};\n\n\treturn (\n\t\t<Dialog>\n\t\t\t<DialogTrigger>\n\t\t\t\t<Button variant=\"ghost\" size=\"icon\" className=\"group\">\n\t\t\t\t\t<HelpCircle className=\"size-4\" />\n\t\t\t\t</Button>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-2xl\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle className=\"flex items-center gap-2\">\n\t\t\t\t\t\t<Server className=\"size-5\" />\n\t\t\t\t\t\tDNS Configuration Guide\n\t\t\t\t\t</DialogTitle>\n\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\tFollow these steps to configure your DNS records for {domain.host}\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\n\t\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t\t<AlertBlock type=\"info\">\n\t\t\t\t\t\tTo make your domain accessible, you need to configure your DNS\n\t\t\t\t\t\trecords with your domain provider (e.g., Cloudflare, GoDaddy,\n\t\t\t\t\t\tNameCheap).\n\t\t\t\t\t</AlertBlock>\n\n\t\t\t\t\t<div className=\"flex flex-col gap-6\">\n\t\t\t\t\t\t<div className=\"rounded-lg border p-4\">\n\t\t\t\t\t\t\t<h3 className=\"font-medium mb-2\">1. Add A Record</h3>\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-3\">\n\t\t\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\tCreate an A record that points your domain to the server's IP\n\t\t\t\t\t\t\t\t\taddress:\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t\t<div className=\"flex items-center justify-between gap-2 bg-muted p-3 rounded-md\">\n\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-sm font-medium\">Type: A</p>\n\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\tName: @ or {domain.host.split(\".\")[0]}\n\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\tValue: {serverIp || \"Your server IP\"}\n\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={() => copyToClipboard(serverIp || \"\")}\n\t\t\t\t\t\t\t\t\t\t\tdisabled={!serverIp}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<Copy className=\"size-4\" />\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div className=\"rounded-lg border p-4\">\n\t\t\t\t\t\t\t<h3 className=\"font-medium mb-2\">2. Verify Configuration</h3>\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-3\">\n\t\t\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\tAfter configuring your DNS records:\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t<ul className=\"list-disc list-inside space-y-1 text-sm\">\n\t\t\t\t\t\t\t\t\t<li>Wait for DNS propagation (usually 15-30 minutes)</li>\n\t\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t\tTest your domain by visiting:{\" \"}\n\t\t\t\t\t\t\t\t\t\t{domain.https ? \"https://\" : \"http://\"}\n\t\t\t\t\t\t\t\t\t\t{domain.host}\n\t\t\t\t\t\t\t\t\t\t{domain.path || \"/\"}\n\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t<li>Use a DNS lookup tool to verify your records</li>\n\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/domains/handle-domain.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { DatabaseZap, Dices, RefreshCw } from \"lucide-react\";\nimport Link from \"next/link\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport z from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input, NumberInput } from \"@/components/ui/input\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { Switch } from \"@/components/ui/switch\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { api } from \"@/utils/api\";\n\nexport type CacheType = \"fetch\" | \"cache\";\n\nexport const domain = z\n\t.object({\n\t\thost: z\n\t\t\t.string()\n\t\t\t.min(1, { message: \"Add a hostname\" })\n\t\t\t.refine((val) => val === val.trim(), {\n\t\t\t\tmessage: \"Domain name cannot have leading or trailing spaces\",\n\t\t\t})\n\t\t\t.transform((val) => val.trim()),\n\t\tpath: z.string().min(1).optional(),\n\t\tinternalPath: z.string().optional(),\n\t\tstripPath: z.boolean().optional(),\n\t\tport: z\n\t\t\t.number()\n\t\t\t.min(1, { message: \"Port must be at least 1\" })\n\t\t\t.max(65535, { message: \"Port must be 65535 or below\" })\n\t\t\t.optional(),\n\t\thttps: z.boolean().optional(),\n\t\tcertificateType: z.enum([\"letsencrypt\", \"none\", \"custom\"]).optional(),\n\t\tcustomCertResolver: z.string().optional(),\n\t\tserviceName: z.string().optional(),\n\t\tdomainType: z.enum([\"application\", \"compose\", \"preview\"]).optional(),\n\t})\n\t.superRefine((input, ctx) => {\n\t\tif (input.https && !input.certificateType) {\n\t\t\tctx.addIssue({\n\t\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\t\tpath: [\"certificateType\"],\n\t\t\t\tmessage: \"Required\",\n\t\t\t});\n\t\t}\n\n\t\tif (input.certificateType === \"custom\" && !input.customCertResolver) {\n\t\t\tctx.addIssue({\n\t\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\t\tpath: [\"customCertResolver\"],\n\t\t\t\tmessage: \"Required\",\n\t\t\t});\n\t\t}\n\n\t\tif (input.domainType === \"compose\" && !input.serviceName) {\n\t\t\tctx.addIssue({\n\t\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\t\tpath: [\"serviceName\"],\n\t\t\t\tmessage: \"Required\",\n\t\t\t});\n\t\t}\n\n\t\t// Validate stripPath requires a valid path\n\t\tif (input.stripPath && (!input.path || input.path === \"/\")) {\n\t\t\tctx.addIssue({\n\t\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\t\tpath: [\"stripPath\"],\n\t\t\t\tmessage:\n\t\t\t\t\t\"Strip path can only be enabled when a path other than '/' is specified\",\n\t\t\t});\n\t\t}\n\n\t\t// Validate internalPath starts with /\n\t\tif (\n\t\t\tinput.internalPath &&\n\t\t\tinput.internalPath !== \"/\" &&\n\t\t\t!input.internalPath.startsWith(\"/\")\n\t\t) {\n\t\t\tctx.addIssue({\n\t\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\t\tpath: [\"internalPath\"],\n\t\t\t\tmessage: \"Internal path must start with '/'\",\n\t\t\t});\n\t\t}\n\t});\n\ntype Domain = z.infer<typeof domain>;\n\ninterface Props {\n\tid: string;\n\ttype: \"application\" | \"compose\";\n\tdomainId?: string;\n\tchildren: React.ReactNode;\n}\n\nexport const AddDomain = ({ id, type, domainId = \"\", children }: Props) => {\n\tconst [isOpen, setIsOpen] = useState(false);\n\tconst [cacheType, setCacheType] = useState<CacheType>(\"cache\");\n\tconst [isManualInput, setIsManualInput] = useState(false);\n\n\tconst utils = api.useUtils();\n\tconst { data, refetch } = api.domain.one.useQuery(\n\t\t{\n\t\t\tdomainId,\n\t\t},\n\t\t{\n\t\t\tenabled: !!domainId,\n\t\t},\n\t);\n\n\tconst { data: application } =\n\t\ttype === \"application\"\n\t\t\t? api.application.one.useQuery(\n\t\t\t\t\t{\n\t\t\t\t\t\tapplicationId: id,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tenabled: !!id,\n\t\t\t\t\t},\n\t\t\t\t)\n\t\t\t: api.compose.one.useQuery(\n\t\t\t\t\t{\n\t\t\t\t\t\tcomposeId: id,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tenabled: !!id,\n\t\t\t\t\t},\n\t\t\t\t);\n\n\tconst { mutateAsync, isError, error, isPending } = domainId\n\t\t? api.domain.update.useMutation()\n\t\t: api.domain.create.useMutation();\n\n\tconst { mutateAsync: generateDomain, isPending: isLoadingGenerate } =\n\t\tapi.domain.generateDomain.useMutation();\n\n\tconst { data: canGenerateTraefikMeDomains } =\n\t\tapi.domain.canGenerateTraefikMeDomains.useQuery({\n\t\t\tserverId: application?.serverId || \"\",\n\t\t});\n\n\tconst {\n\t\tdata: services,\n\t\tisFetching: isLoadingServices,\n\t\terror: errorServices,\n\t\trefetch: refetchServices,\n\t} = api.compose.loadServices.useQuery(\n\t\t{\n\t\t\tcomposeId: id,\n\t\t\ttype: cacheType,\n\t\t},\n\t\t{\n\t\t\tretry: false,\n\t\t\trefetchOnWindowFocus: false,\n\t\t\tenabled: type === \"compose\" && !!id,\n\t\t},\n\t);\n\n\tconst form = useForm<Domain>({\n\t\tresolver: zodResolver(domain),\n\t\tdefaultValues: {\n\t\t\thost: \"\",\n\t\t\tpath: undefined,\n\t\t\tinternalPath: undefined,\n\t\t\tstripPath: false,\n\t\t\tport: undefined,\n\t\t\thttps: false,\n\t\t\tcertificateType: undefined,\n\t\t\tcustomCertResolver: undefined,\n\t\t\tserviceName: undefined,\n\t\t\tdomainType: type,\n\t\t},\n\t\tmode: \"onChange\",\n\t});\n\n\tconst certificateType = form.watch(\"certificateType\");\n\tconst https = form.watch(\"https\");\n\tconst domainType = form.watch(\"domainType\");\n\tconst host = form.watch(\"host\");\n\tconst isTraefikMeDomain = host?.includes(\"traefik.me\") || false;\n\n\tuseEffect(() => {\n\t\tif (data) {\n\t\t\tform.reset({\n\t\t\t\t...data,\n\t\t\t\t/* Convert null to undefined */\n\t\t\t\tpath: data?.path || undefined,\n\t\t\t\tinternalPath: data?.internalPath || undefined,\n\t\t\t\tstripPath: data?.stripPath || false,\n\t\t\t\tport: data?.port || undefined,\n\t\t\t\tcertificateType: data?.certificateType || undefined,\n\t\t\t\tcustomCertResolver: data?.customCertResolver || undefined,\n\t\t\t\tserviceName: data?.serviceName || undefined,\n\t\t\t\tdomainType: data?.domainType || type,\n\t\t\t});\n\t\t}\n\n\t\tif (!domainId) {\n\t\t\tform.reset({\n\t\t\t\thost: \"\",\n\t\t\t\tpath: undefined,\n\t\t\t\tinternalPath: undefined,\n\t\t\t\tstripPath: false,\n\t\t\t\tport: undefined,\n\t\t\t\thttps: false,\n\t\t\t\tcertificateType: undefined,\n\t\t\t\tcustomCertResolver: undefined,\n\t\t\t\tdomainType: type,\n\t\t\t});\n\t\t}\n\t}, [form, data, isPending, domainId]);\n\n\t// Separate effect for handling custom cert resolver validation\n\tuseEffect(() => {\n\t\tif (certificateType === \"custom\") {\n\t\t\tform.trigger(\"customCertResolver\");\n\t\t}\n\t}, [certificateType, form]);\n\n\tconst dictionary = {\n\t\tsuccess: domainId ? \"Domain Updated\" : \"Domain Created\",\n\t\terror: domainId ? \"Error updating the domain\" : \"Error creating the domain\",\n\t\tsubmit: domainId ? \"Update\" : \"Create\",\n\t\tdialogDescription: domainId\n\t\t\t? \"In this section you can edit a domain\"\n\t\t\t: \"In this section you can add domains\",\n\t};\n\n\tconst onSubmit = async (data: Domain) => {\n\t\tawait mutateAsync({\n\t\t\tdomainId,\n\t\t\t...(data.domainType === \"application\" && {\n\t\t\t\tapplicationId: id,\n\t\t\t}),\n\t\t\t...(data.domainType === \"compose\" && {\n\t\t\t\tcomposeId: id,\n\t\t\t}),\n\t\t\t...data,\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(dictionary.success);\n\n\t\t\t\tif (data.domainType === \"application\") {\n\t\t\t\t\tawait utils.domain.byApplicationId.invalidate({\n\t\t\t\t\t\tapplicationId: id,\n\t\t\t\t\t});\n\t\t\t\t\tawait utils.application.readTraefikConfig.invalidate({\n\t\t\t\t\t\tapplicationId: id,\n\t\t\t\t\t});\n\t\t\t\t} else if (data.domainType === \"compose\") {\n\t\t\t\t\tawait utils.domain.byComposeId.invalidate({\n\t\t\t\t\t\tcomposeId: id,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tif (domainId) {\n\t\t\t\t\trefetch();\n\t\t\t\t}\n\t\t\t\tsetIsOpen(false);\n\t\t\t})\n\t\t\t.catch((e) => {\n\t\t\t\tconsole.log(e);\n\t\t\t\ttoast.error(dictionary.error);\n\t\t\t});\n\t};\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger className=\"\" asChild>\n\t\t\t\t{children}\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-2xl\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Domain</DialogTitle>\n\t\t\t\t\t<DialogDescription>{dictionary.dialogDescription}</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t{isError && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\n\t\t\t\t{type === \"compose\" && (\n\t\t\t\t\t<AlertBlock type=\"info\" className=\"mb-4\">\n\t\t\t\t\t\tWhenever you make changes to domains, remember to redeploy your\n\t\t\t\t\t\tcompose to apply the changes.\n\t\t\t\t\t</AlertBlock>\n\t\t\t\t)}\n\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tid=\"hook-form\"\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\tclassName=\"grid w-full gap-8 \"\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t<div className=\"flex flex-row items-end w-full gap-4\">\n\t\t\t\t\t\t\t\t\t{domainType === \"compose\" && (\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2 w-full\">\n\t\t\t\t\t\t\t\t\t\t\t{errorServices && (\n\t\t\t\t\t\t\t\t\t\t\t\t<AlertBlock\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"warning\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"[overflow-wrap:anywhere]\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{errorServices?.message}\n\t\t\t\t\t\t\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\t\tname=\"serviceName\"\n\t\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem className=\"w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Service Name</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{isManualInput ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Enter service name manually\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-full\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonValueChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdefaultValue={field.value || \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a service name\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{services?.map((service, index) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={service}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={`${service}-${index}`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{service}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"none\" disabled>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tEmpty\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{!isManualInput && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipProvider delayDuration={0}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisLoading={isLoadingServices}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (cacheType === \"fetch\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trefetchServices();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetCacheType(\"fetch\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<RefreshCw className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tside=\"left\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsideOffset={5}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"max-w-[10rem]\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFetch: Will clone the repository and\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tload the services\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipProvider delayDuration={0}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisLoading={isLoadingServices}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (cacheType === \"cache\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trefetchServices();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetCacheType(\"cache\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DatabaseZap className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tside=\"left\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsideOffset={5}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"max-w-[10rem]\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCache: If you previously deployed this\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcompose, it will read the services\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfrom the last deployment/fetch from\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthe repository\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipProvider delayDuration={0}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetIsManualInput(!isManualInput);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!isManualInput) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(\"\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{isManualInput ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<RefreshCw className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-xs text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tManual\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tside=\"left\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsideOffset={5}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"max-w-[10rem]\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{isManualInput\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Switch to service selection\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Enter service name manually\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"host\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t{!canGenerateTraefikMeDomains &&\n\t\t\t\t\t\t\t\t\t\t\t\tfield.value.includes(\"traefik.me\") && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<AlertBlock type=\"warning\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tYou need to set an IP address in your{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thref=\"/dashboard/settings/server\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-primary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{application?.serverId\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Remote Servers -> Server -> Edit Server -> Update IP Address\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Web Server -> Server -> Update Server IP\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Link>{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tto make your traefik.me domain work.\n\t\t\t\t\t\t\t\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t{isTraefikMeDomain && (\n\t\t\t\t\t\t\t\t\t\t\t\t<AlertBlock type=\"info\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<strong>Note:</strong> traefik.me is a public HTTP\n\t\t\t\t\t\t\t\t\t\t\t\t\tservice and does not support SSL/HTTPS. HTTPS and\n\t\t\t\t\t\t\t\t\t\t\t\t\tcertificate options will not have any effect.\n\t\t\t\t\t\t\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Host</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"api.dokploy.com\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipProvider delayDuration={0}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisLoading={isLoadingGenerate}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgenerateDomain({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tappName: application?.appName || \"\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tserverId: application?.serverId || \"\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.then((domain) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(domain);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.catch((err) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(err.message);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Dices className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tside=\"left\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsideOffset={5}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"max-w-[10rem]\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>Generate traefik.me domain</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"path\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => {\n\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Path</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder={\"/\"} {...field} />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"internalPath\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => {\n\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Internal Path</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\tThe path where your application expects to receive\n\t\t\t\t\t\t\t\t\t\t\t\t\trequests internally (defaults to \"/\")\n\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder={\"/\"} {...field} />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"stripPath\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem className=\"flex flex-row items-center justify-between p-3 border rounded-lg shadow-sm\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Strip Path</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\tRemove the external path from the request before\n\t\t\t\t\t\t\t\t\t\t\t\t\tforwarding to the application\n\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"port\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => {\n\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Container Port</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\tThe port where your application is running inside the\n\t\t\t\t\t\t\t\t\t\t\t\t\tcontainer (e.g., 3000 for Node.js, 80 for Nginx, 8080\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor Java)\n\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<NumberInput placeholder={\"3000\"} {...field} />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"https\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem className=\"flex flex-row items-center justify-between p-3 mt-4 border rounded-lg shadow-sm\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>HTTPS</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\tAutomatically provision SSL Certificate.\n\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t{https && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"certificateType\"\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => {\n\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Certificate Provider</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonValueChange={(value) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(value);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (value !== \"custom\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"customCertResolver\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a certificate provider\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value={\"none\"}>None</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value={\"letsencrypt\"}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLet's Encrypt\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value={\"custom\"}>Custom</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t\t\t{certificateType === \"custom\" && (\n\t\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\t\tname=\"customCertResolver\"\n\t\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Custom Certificate Resolver</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-full\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Enter your custom certificate resolver\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value || \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(e);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.trigger(\"customCertResolver\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</form>\n\n\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t<Button isLoading={isPending} form=\"hook-form\" type=\"submit\">\n\t\t\t\t\t\t\t{dictionary.submit}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</DialogFooter>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/domains/show-domains.tsx",
    "content": "import {\n\tCheckCircle2,\n\tExternalLink,\n\tGlobeIcon,\n\tInfoIcon,\n\tLoader2,\n\tPenBoxIcon,\n\tRefreshCw,\n\tServer,\n\tTrash2,\n\tXCircle,\n} from \"lucide-react\";\nimport Link from \"next/link\";\nimport { useState } from \"react\";\nimport { toast } from \"sonner\";\nimport { DialogAction } from \"@/components/shared/dialog-action\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { api } from \"@/utils/api\";\nimport { DnsHelperModal } from \"./dns-helper-modal\";\nimport { AddDomain } from \"./handle-domain\";\n\nexport type ValidationState = {\n\tisLoading: boolean;\n\tisValid?: boolean;\n\terror?: string;\n\tresolvedIp?: string;\n\tmessage?: string;\n\tcdnProvider?: string;\n};\n\nexport type ValidationStates = Record<string, ValidationState>;\n\ninterface Props {\n\tid: string;\n\ttype: \"application\" | \"compose\";\n}\n\nexport const ShowDomains = ({ id, type }: Props) => {\n\tconst { data: permissions } = api.user.getPermissions.useQuery();\n\tconst canCreateDomain = permissions?.domain.create ?? false;\n\tconst canDeleteDomain = permissions?.domain.delete ?? false;\n\tconst { data: application } =\n\t\ttype === \"application\"\n\t\t\t? api.application.one.useQuery(\n\t\t\t\t\t{\n\t\t\t\t\t\tapplicationId: id,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tenabled: !!id,\n\t\t\t\t\t},\n\t\t\t\t)\n\t\t\t: api.compose.one.useQuery(\n\t\t\t\t\t{\n\t\t\t\t\t\tcomposeId: id,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tenabled: !!id,\n\t\t\t\t\t},\n\t\t\t\t);\n\tconst [validationStates, setValidationStates] = useState<ValidationStates>(\n\t\t{},\n\t);\n\tconst { data: ip } = api.settings.getIp.useQuery();\n\n\tconst {\n\t\tdata,\n\t\trefetch,\n\t\tisLoading: isLoadingDomains,\n\t} = type === \"application\"\n\t\t? api.domain.byApplicationId.useQuery(\n\t\t\t\t{\n\t\t\t\t\tapplicationId: id,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tenabled: !!id,\n\t\t\t\t},\n\t\t\t)\n\t\t: api.domain.byComposeId.useQuery(\n\t\t\t\t{\n\t\t\t\t\tcomposeId: id,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tenabled: !!id,\n\t\t\t\t},\n\t\t\t);\n\n\tconst { mutateAsync: validateDomain } =\n\t\tapi.domain.validateDomain.useMutation();\n\tconst { mutateAsync: deleteDomain, isPending: isRemoving } =\n\t\tapi.domain.delete.useMutation();\n\n\tconst handleValidateDomain = async (host: string) => {\n\t\tsetValidationStates((prev) => ({\n\t\t\t...prev,\n\t\t\t[host]: { isLoading: true },\n\t\t}));\n\n\t\ttry {\n\t\t\tconst result = await validateDomain({\n\t\t\t\tdomain: host,\n\t\t\t\tserverIp:\n\t\t\t\t\tapplication?.server?.ipAddress?.toString() || ip?.toString() || \"\",\n\t\t\t});\n\n\t\t\tsetValidationStates((prev) => ({\n\t\t\t\t...prev,\n\t\t\t\t[host]: {\n\t\t\t\t\tisLoading: false,\n\t\t\t\t\tisValid: result.isValid,\n\t\t\t\t\terror: result.error,\n\t\t\t\t\tresolvedIp: result.resolvedIp,\n\t\t\t\t\tcdnProvider: result.cdnProvider,\n\t\t\t\t\tmessage: result.error && result.isValid ? result.error : undefined,\n\t\t\t\t},\n\t\t\t}));\n\t\t} catch (err) {\n\t\t\tconst error = err as Error;\n\t\t\tsetValidationStates((prev) => ({\n\t\t\t\t...prev,\n\t\t\t\t[host]: {\n\t\t\t\t\tisLoading: false,\n\t\t\t\t\tisValid: false,\n\t\t\t\t\terror: error.message || \"Failed to validate domain\",\n\t\t\t\t},\n\t\t\t}));\n\t\t}\n\t};\n\n\treturn (\n\t\t<div className=\"flex w-full flex-col gap-5 \">\n\t\t\t<Card className=\"bg-background\">\n\t\t\t\t<CardHeader className=\"flex flex-row items-center flex-wrap gap-4 justify-between\">\n\t\t\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t\t\t<CardTitle className=\"text-xl\">Domains</CardTitle>\n\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\tDomains are used to access to the application\n\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div className=\"flex flex-row gap-4 flex-wrap\">\n\t\t\t\t\t\t{canCreateDomain && data && data?.length > 0 && (\n\t\t\t\t\t\t\t<AddDomain id={id} type={type}>\n\t\t\t\t\t\t\t\t<Button>\n\t\t\t\t\t\t\t\t\t<GlobeIcon className=\"size-4\" /> Add Domain\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</AddDomain>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</CardHeader>\n\t\t\t\t<CardContent className=\"flex w-full flex-row gap-4\">\n\t\t\t\t\t{isLoadingDomains ? (\n\t\t\t\t\t\t<div className=\"flex w-full flex-row gap-4 min-h-[40vh] justify-center items-center\">\n\t\t\t\t\t\t\t<Loader2 className=\"size-5 animate-spin text-muted-foreground\" />\n\t\t\t\t\t\t\t<span className=\"text-base text-muted-foreground\">\n\t\t\t\t\t\t\t\tLoading domains...\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) : data?.length === 0 ? (\n\t\t\t\t\t\t<div className=\"flex w-full flex-col items-center justify-center gap-3 min-h-[40vh]\">\n\t\t\t\t\t\t\t<GlobeIcon className=\"size-8 text-muted-foreground\" />\n\t\t\t\t\t\t\t<span className=\"text-base text-muted-foreground\">\n\t\t\t\t\t\t\t\tTo access the application it is required to set at least 1\n\t\t\t\t\t\t\t\tdomain\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t{canCreateDomain && (\n\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-4 flex-wrap\">\n\t\t\t\t\t\t\t\t\t<AddDomain id={id} type={type}>\n\t\t\t\t\t\t\t\t\t\t<Button>\n\t\t\t\t\t\t\t\t\t\t\t<GlobeIcon className=\"size-4\" /> Add Domain\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t</AddDomain>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<div className=\"grid grid-cols-1 gap-4 xl:grid-cols-2 w-full min-h-[40vh] \">\n\t\t\t\t\t\t\t{data?.map((item) => {\n\t\t\t\t\t\t\t\tconst validationState = validationStates[item.host];\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<Card\n\t\t\t\t\t\t\t\t\t\tkey={item.domainId}\n\t\t\t\t\t\t\t\t\t\tclassName=\"relative overflow-hidden w-full border transition-all hover:shadow-md bg-transparent h-fit\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<CardContent className=\"p-6\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t\t\t\t\t\t\t{/* Service & Domain Info */}\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center justify-between flex-wrap gap-y-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{item.serviceName && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Badge variant=\"outline\" className=\"w-fit\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Server className=\"size-3 mr-1\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{item.serviceName}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex gap-2 flex-wrap\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{!item.host.includes(\"traefik.me\") && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DnsHelperModal\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdomain={{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thost: item.host,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thttps: item.https,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpath: item.path || undefined,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tserverIp={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tapplication?.server?.ipAddress?.toString() ||\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tip?.toString()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{canCreateDomain && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<AddDomain\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tid={id}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype={type}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdomainId={item.domainId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"group hover:bg-blue-500/10\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<PenBoxIcon className=\"size-3.5 text-primary group-hover:text-blue-500\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</AddDomain>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{canDeleteDomain && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"Delete Domain\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to delete this domain?\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"destructive\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait deleteDomain({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdomainId: item.domainId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.then((_data) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Domain deleted successfully\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error deleting domain\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"group hover:bg-red-500/10\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisLoading={isRemoving}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Trash2 className=\"size-4 text-primary group-hover:text-red-500\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"w-full break-all\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-2 text-base font-medium hover:underline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\thref={`${item.https ? \"https\" : \"http\"}://${item.host}${item.path}`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{item.host}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ExternalLink className=\"size-4 min-w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t\t\t{/* Domain Details */}\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-wrap gap-3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Badge variant=\"secondary\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<InfoIcon className=\"size-3 mr-1\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tPath: {item.path || \"/\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>URL path for this service</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Badge variant=\"secondary\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<InfoIcon className=\"size-3 mr-1\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tPort: {item.port}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>Container port exposed</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant={item.https ? \"outline\" : \"secondary\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{item.https ? \"HTTPS\" : \"HTTP\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{item.https\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Secure HTTPS connection\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Standard HTTP connection\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t{item.certificateType && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Badge variant=\"outline\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCert: {item.certificateType}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>SSL Certificate Provider</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalidationState?.isValid\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"bg-green-500/10 text-green-500 cursor-pointer\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: validationState?.error\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"bg-red-500/10 text-red-500 cursor-pointer\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"bg-yellow-500/10 text-yellow-500 cursor-pointer\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thandleValidateDomain(item.host)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{validationState?.isLoading ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Loader2 className=\"size-3 mr-1 animate-spin\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tChecking DNS...\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) : validationState?.isValid ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CheckCircle2 className=\"size-3 mr-1\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{validationState.message &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalidationState.cdnProvider\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? `Behind ${validationState.cdnProvider}`\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"DNS Valid\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) : validationState?.error ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<XCircle className=\"size-3 mr-1\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{validationState.error}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<RefreshCw className=\"size-3 mr-1\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tValidate DNS\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent className=\"max-w-xs\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{validationState?.error ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"font-medium text-red-500\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tError:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>{validationState.error}</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Click to validate DNS configuration\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t\t\t\t\t</Card>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</CardContent>\n\t\t\t</Card>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/environment/show-enviroment.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { EyeIcon, EyeOffIcon } from \"lucide-react\";\nimport { type CSSProperties, useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { CodeEditor } from \"@/components/shared/code-editor\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Toggle } from \"@/components/ui/toggle\";\nimport { api } from \"@/utils/api\";\nimport type { ServiceType } from \"../advanced/show-resources\";\n\nconst addEnvironmentSchema = z.object({\n\tenvironment: z.string(),\n});\n\ntype EnvironmentSchema = z.infer<typeof addEnvironmentSchema>;\n\ninterface Props {\n\tid: string;\n\ttype: Exclude<ServiceType | \"compose\", \"application\">;\n}\n\nexport const ShowEnvironment = ({ id, type }: Props) => {\n\tconst { data: permissions } = api.user.getPermissions.useQuery();\n\tconst canWrite = permissions?.envVars.write ?? false;\n\tconst queryMap = {\n\t\tpostgres: () =>\n\t\t\tapi.postgres.one.useQuery({ postgresId: id }, { enabled: !!id }),\n\t\tredis: () => api.redis.one.useQuery({ redisId: id }, { enabled: !!id }),\n\t\tmysql: () => api.mysql.one.useQuery({ mysqlId: id }, { enabled: !!id }),\n\t\tmariadb: () =>\n\t\t\tapi.mariadb.one.useQuery({ mariadbId: id }, { enabled: !!id }),\n\t\tmongo: () => api.mongo.one.useQuery({ mongoId: id }, { enabled: !!id }),\n\t\tcompose: () =>\n\t\t\tapi.compose.one.useQuery({ composeId: id }, { enabled: !!id }),\n\t};\n\tconst { data, refetch } = queryMap[type]\n\t\t? queryMap[type]()\n\t\t: api.mongo.one.useQuery({ mongoId: id }, { enabled: !!id });\n\tconst [isEnvVisible, setIsEnvVisible] = useState(true);\n\n\tconst mutationMap = {\n\t\tpostgres: () => api.postgres.update.useMutation(),\n\t\tredis: () => api.redis.update.useMutation(),\n\t\tmysql: () => api.mysql.update.useMutation(),\n\t\tmariadb: () => api.mariadb.update.useMutation(),\n\t\tmongo: () => api.mongo.update.useMutation(),\n\t\tcompose: () => api.compose.update.useMutation(),\n\t};\n\tconst { mutateAsync, isPending } = mutationMap[type]\n\t\t? mutationMap[type]()\n\t\t: api.mongo.update.useMutation();\n\n\tconst form = useForm<EnvironmentSchema>({\n\t\tdefaultValues: {\n\t\t\tenvironment: \"\",\n\t\t},\n\t\tresolver: zodResolver(addEnvironmentSchema),\n\t});\n\n\t// Watch form value\n\tconst currentEnvironment = form.watch(\"environment\");\n\tconst hasChanges = currentEnvironment !== (data?.env || \"\");\n\n\tuseEffect(() => {\n\t\tif (data) {\n\t\t\tform.reset({\n\t\t\t\tenvironment: data.env || \"\",\n\t\t\t});\n\t\t}\n\t}, [data, form]);\n\n\tconst onSubmit = async (formData: EnvironmentSchema) => {\n\t\tmutateAsync({\n\t\t\tmongoId: id || \"\",\n\t\t\tpostgresId: id || \"\",\n\t\t\tredisId: id || \"\",\n\t\t\tmysqlId: id || \"\",\n\t\t\tmariadbId: id || \"\",\n\t\t\tcomposeId: id || \"\",\n\t\t\tenv: formData.environment,\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(\"Environments Added\");\n\t\t\t\tawait refetch();\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error adding environment\");\n\t\t\t});\n\t};\n\n\tconst handleCancel = () => {\n\t\tform.reset({\n\t\t\tenvironment: data?.env || \"\",\n\t\t});\n\t};\n\n\t// Add keyboard shortcut for Ctrl+S/Cmd+S\n\tuseEffect(() => {\n\t\tconst handleKeyDown = (e: KeyboardEvent) => {\n\t\t\tif ((e.ctrlKey || e.metaKey) && e.key === \"s\" && !isPending) {\n\t\t\t\te.preventDefault();\n\t\t\t\tform.handleSubmit(onSubmit)();\n\t\t\t}\n\t\t};\n\n\t\tdocument.addEventListener(\"keydown\", handleKeyDown);\n\t\treturn () => {\n\t\t\tdocument.removeEventListener(\"keydown\", handleKeyDown);\n\t\t};\n\t}, [form, onSubmit, isPending]);\n\n\treturn (\n\t\t<div className=\"flex w-full flex-col gap-5 \">\n\t\t\t<Card className=\"bg-background\">\n\t\t\t\t<CardHeader className=\"flex flex-row w-full items-center justify-between\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<CardTitle className=\"text-xl\">Environment Settings</CardTitle>\n\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\tYou can add environment variables to your resource.\n\t\t\t\t\t\t\t{hasChanges && (\n\t\t\t\t\t\t\t\t<span className=\"text-yellow-500 ml-2\">\n\t\t\t\t\t\t\t\t\t(You have unsaved changes)\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<Toggle\n\t\t\t\t\t\taria-label=\"Toggle bold\"\n\t\t\t\t\t\tpressed={isEnvVisible}\n\t\t\t\t\t\tonPressedChange={setIsEnvVisible}\n\t\t\t\t\t>\n\t\t\t\t\t\t{isEnvVisible ? (\n\t\t\t\t\t\t\t<EyeOffIcon className=\"h-4 w-4 text-muted-foreground\" />\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<EyeIcon className=\"h-4 w-4 text-muted-foreground\" />\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Toggle>\n\t\t\t\t</CardHeader>\n\t\t\t\t<CardContent>\n\t\t\t\t\t<Form {...form}>\n\t\t\t\t\t\t<form\n\t\t\t\t\t\t\tid=\"hook-form\"\n\t\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\t\tclassName=\"w-full space-y-4\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"environment\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormControl className=\"\">\n\t\t\t\t\t\t\t\t\t\t\t<CodeEditor\n\t\t\t\t\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tWebkitTextSecurity: isEnvVisible ? \"disc\" : null,\n\t\t\t\t\t\t\t\t\t\t\t\t\t} as CSSProperties\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tlanguage=\"properties\"\n\t\t\t\t\t\t\t\t\t\t\t\tdisabled={isEnvVisible}\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"font-mono\"\n\t\t\t\t\t\t\t\t\t\t\t\twrapperClassName=\"compose-file-editor\"\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder={`NODE_ENV=production\nPORT=3000\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t`}\n\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t{canWrite && (\n\t\t\t\t\t\t\t\t<div className=\"flex flex-row justify-end gap-2\">\n\t\t\t\t\t\t\t\t\t{hasChanges && (\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={handleCancel}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\tCancel\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tisLoading={isPending}\n\t\t\t\t\t\t\t\t\t\tclassName=\"w-fit\"\n\t\t\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t\t\t\tdisabled={!hasChanges}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tSave\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</form>\n\t\t\t\t\t</Form>\n\t\t\t\t</CardContent>\n\t\t\t</Card>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/environment/show.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { useEffect } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { Button } from \"@/components/ui/button\";\nimport { Card } from \"@/components/ui/card\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n} from \"@/components/ui/form\";\nimport { Secrets } from \"@/components/ui/secrets\";\nimport { Switch } from \"@/components/ui/switch\";\nimport { api } from \"@/utils/api\";\n\nconst addEnvironmentSchema = z.object({\n\tenv: z.string(),\n\tbuildArgs: z.string(),\n\tbuildSecrets: z.string(),\n\tcreateEnvFile: z.boolean(),\n});\n\ntype EnvironmentSchema = z.infer<typeof addEnvironmentSchema>;\n\ninterface Props {\n\tapplicationId: string;\n}\n\nexport const ShowEnvironment = ({ applicationId }: Props) => {\n\tconst { data: permissions } = api.user.getPermissions.useQuery();\n\tconst canWrite = permissions?.envVars.write ?? false;\n\tconst { mutateAsync, isPending } =\n\t\tapi.application.saveEnvironment.useMutation();\n\n\tconst { data, refetch } = api.application.one.useQuery(\n\t\t{\n\t\t\tapplicationId,\n\t\t},\n\t\t{\n\t\t\tenabled: !!applicationId,\n\t\t},\n\t);\n\n\tconst form = useForm<EnvironmentSchema>({\n\t\tdefaultValues: {\n\t\t\tenv: \"\",\n\t\t\tbuildArgs: \"\",\n\t\t\tbuildSecrets: \"\",\n\t\t\tcreateEnvFile: true,\n\t\t},\n\t\tresolver: zodResolver(addEnvironmentSchema),\n\t});\n\n\t// Watch form values\n\tconst currentEnv = form.watch(\"env\");\n\tconst currentBuildArgs = form.watch(\"buildArgs\");\n\tconst currentBuildSecrets = form.watch(\"buildSecrets\");\n\tconst currentCreateEnvFile = form.watch(\"createEnvFile\");\n\tconst hasChanges =\n\t\tcurrentEnv !== (data?.env || \"\") ||\n\t\tcurrentBuildArgs !== (data?.buildArgs || \"\") ||\n\t\tcurrentBuildSecrets !== (data?.buildSecrets || \"\") ||\n\t\tcurrentCreateEnvFile !== (data?.createEnvFile ?? true);\n\n\tuseEffect(() => {\n\t\tif (data) {\n\t\t\tform.reset({\n\t\t\t\tenv: data.env || \"\",\n\t\t\t\tbuildArgs: data.buildArgs || \"\",\n\t\t\t\tbuildSecrets: data.buildSecrets || \"\",\n\t\t\t\tcreateEnvFile: data.createEnvFile ?? true,\n\t\t\t});\n\t\t}\n\t}, [data, form]);\n\n\tconst onSubmit = async (formData: EnvironmentSchema) => {\n\t\tmutateAsync({\n\t\t\tenv: formData.env,\n\t\t\tbuildArgs: formData.buildArgs,\n\t\t\tbuildSecrets: formData.buildSecrets,\n\t\t\tcreateEnvFile: formData.createEnvFile,\n\t\t\tapplicationId,\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(\"Environments Added\");\n\t\t\t\tawait refetch();\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error adding environment\");\n\t\t\t});\n\t};\n\n\tconst handleCancel = () => {\n\t\tform.reset({\n\t\t\tenv: data?.env || \"\",\n\t\t\tbuildArgs: data?.buildArgs || \"\",\n\t\t\tbuildSecrets: data?.buildSecrets || \"\",\n\t\t\tcreateEnvFile: data?.createEnvFile ?? true,\n\t\t});\n\t};\n\n\t// Add keyboard shortcut for Ctrl+S/Cmd+S\n\tuseEffect(() => {\n\t\tconst handleKeyDown = (e: KeyboardEvent) => {\n\t\t\tif ((e.ctrlKey || e.metaKey) && e.key === \"s\" && !isPending) {\n\t\t\t\te.preventDefault();\n\t\t\t\tform.handleSubmit(onSubmit)();\n\t\t\t}\n\t\t};\n\n\t\tdocument.addEventListener(\"keydown\", handleKeyDown);\n\t\treturn () => {\n\t\t\tdocument.removeEventListener(\"keydown\", handleKeyDown);\n\t\t};\n\t}, [form, onSubmit, isPending]);\n\n\treturn (\n\t\t<Card className=\"bg-background px-6 pb-6\">\n\t\t\t<Form {...form}>\n\t\t\t\t<form\n\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\tclassName=\"flex w-full flex-col gap-4\"\n\t\t\t\t>\n\t\t\t\t\t<Secrets\n\t\t\t\t\t\tname=\"env\"\n\t\t\t\t\t\ttitle=\"Environment Settings\"\n\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tYou can add environment variables to your resource.\n\t\t\t\t\t\t\t\t{hasChanges && (\n\t\t\t\t\t\t\t\t\t<span className=\"text-yellow-500 ml-2\">\n\t\t\t\t\t\t\t\t\t\t(You have unsaved changes)\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t}\n\t\t\t\t\t\tplaceholder={[\"NODE_ENV=production\", \"PORT=3000\"].join(\"\\n\")}\n\t\t\t\t\t/>\n\t\t\t\t\t{data?.buildType === \"dockerfile\" && (\n\t\t\t\t\t\t<Secrets\n\t\t\t\t\t\t\tname=\"buildArgs\"\n\t\t\t\t\t\t\ttitle=\"Build-time Arguments\"\n\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\tArguments are available only at build-time. See\n\t\t\t\t\t\t\t\t\tdocumentation&nbsp;\n\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\tclassName=\"text-primary\"\n\t\t\t\t\t\t\t\t\t\thref=\"https://docs.docker.com/build/building/variables/\"\n\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\there\n\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t.\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tplaceholder=\"NPM_TOKEN=xyz\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t\t{data?.buildType === \"dockerfile\" && (\n\t\t\t\t\t\t<Secrets\n\t\t\t\t\t\t\tname=\"buildSecrets\"\n\t\t\t\t\t\t\ttitle=\"Build-time Secrets\"\n\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\tSecrets are specially designed for sensitive information and\n\t\t\t\t\t\t\t\t\tare only available at build-time. See documentation&nbsp;\n\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\tclassName=\"text-primary\"\n\t\t\t\t\t\t\t\t\t\thref=\"https://docs.docker.com/build/building/secrets/\"\n\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\there\n\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t.\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tplaceholder=\"NPM_TOKEN=xyz\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t\t{data?.buildType === \"dockerfile\" && (\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"createEnvFile\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"flex flex-row items-center justify-between p-3 border rounded-lg shadow-sm\">\n\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Create Environment File</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\tWhen enabled, an .env file will be created in the same\n\t\t\t\t\t\t\t\t\t\t\tdirectory as your Dockerfile during the build process.\n\t\t\t\t\t\t\t\t\t\t\tDisable this if you don't want to generate an environment\n\t\t\t\t\t\t\t\t\t\t\tfile.\n\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\tdisabled={!canWrite}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t\t{canWrite && (\n\t\t\t\t\t\t<div className=\"flex flex-row justify-end gap-2\">\n\t\t\t\t\t\t\t{hasChanges && (\n\t\t\t\t\t\t\t\t<Button type=\"button\" variant=\"outline\" onClick={handleCancel}>\n\t\t\t\t\t\t\t\t\tCancel\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tisLoading={isPending}\n\t\t\t\t\t\t\t\tclassName=\"w-fit\"\n\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t\tdisabled={!hasChanges}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tSave\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</form>\n\t\t\t</Form>\n\t\t</Card>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/general/generic/save-bitbucket-provider.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { CheckIcon, ChevronsUpDown, HelpCircle, X } from \"lucide-react\";\nimport Link from \"next/link\";\nimport { useEffect } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { BitbucketIcon } from \"@/components/icons/data-tools-icons\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCommand,\n\tCommandEmpty,\n\tCommandGroup,\n\tCommandInput,\n\tCommandItem,\n} from \"@/components/ui/command\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport {\n\tPopover,\n\tPopoverContent,\n\tPopoverTrigger,\n} from \"@/components/ui/popover\";\nimport { ScrollArea } from \"@/components/ui/scroll-area\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { Switch } from \"@/components/ui/switch\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { cn } from \"@/lib/utils\";\nimport { api } from \"@/utils/api\";\n\nconst BitbucketProviderSchema = z.object({\n\tbuildPath: z.string().min(1, \"Path is required\").default(\"/\"),\n\trepository: z\n\t\t.object({\n\t\t\trepo: z.string().min(1, \"Repo is required\"),\n\t\t\towner: z.string().min(1, \"Owner is required\"),\n\t\t\tslug: z.string().optional(),\n\t\t})\n\t\t.required(),\n\tbranch: z.string().min(1, \"Branch is required\"),\n\tbitbucketId: z.string().min(1, \"Bitbucket Provider is required\"),\n\twatchPaths: z.array(z.string()).optional(),\n\tenableSubmodules: z.boolean().optional(),\n});\n\ntype BitbucketProvider = z.infer<typeof BitbucketProviderSchema>;\n\ninterface Props {\n\tapplicationId: string;\n}\n\nexport const SaveBitbucketProvider = ({ applicationId }: Props) => {\n\tconst { data: bitbucketProviders } =\n\t\tapi.bitbucket.bitbucketProviders.useQuery();\n\tconst { data, refetch } = api.application.one.useQuery({ applicationId });\n\n\tconst { mutateAsync, isPending: isSavingBitbucketProvider } =\n\t\tapi.application.saveBitbucketProvider.useMutation();\n\n\tconst form = useForm({\n\t\tdefaultValues: {\n\t\t\tbuildPath: \"/\",\n\t\t\trepository: {\n\t\t\t\towner: \"\",\n\t\t\t\trepo: \"\",\n\t\t\t\tslug: \"\",\n\t\t\t},\n\t\t\tbitbucketId: \"\",\n\t\t\tbranch: \"\",\n\t\t\twatchPaths: [],\n\t\t\tenableSubmodules: false,\n\t\t},\n\t\tresolver: zodResolver(BitbucketProviderSchema),\n\t});\n\n\tconst repository = form.watch(\"repository\");\n\tconst bitbucketId = form.watch(\"bitbucketId\");\n\n\tconst {\n\t\tdata: repositories,\n\t\tisLoading: isLoadingRepositories,\n\t\terror,\n\t} = api.bitbucket.getBitbucketRepositories.useQuery(\n\t\t{\n\t\t\tbitbucketId,\n\t\t},\n\t\t{\n\t\t\tenabled: !!bitbucketId,\n\t\t},\n\t);\n\n\tconst {\n\t\tdata: branches,\n\t\tfetchStatus,\n\t\tstatus,\n\t} = api.bitbucket.getBitbucketBranches.useQuery(\n\t\t{\n\t\t\towner: repository?.owner,\n\t\t\trepo: repository?.slug || repository?.repo || \"\",\n\t\t\tbitbucketId,\n\t\t},\n\t\t{\n\t\t\tenabled:\n\t\t\t\t!!repository?.owner &&\n\t\t\t\t!!(repository?.slug || repository?.repo) &&\n\t\t\t\t!!bitbucketId,\n\t\t},\n\t);\n\n\tuseEffect(() => {\n\t\tif (data) {\n\t\t\tform.reset({\n\t\t\t\tbranch: data.bitbucketBranch || \"\",\n\t\t\t\trepository: {\n\t\t\t\t\trepo: data.bitbucketRepository || \"\",\n\t\t\t\t\towner: data.bitbucketOwner || \"\",\n\t\t\t\t\tslug: data.bitbucketRepositorySlug || \"\",\n\t\t\t\t},\n\t\t\t\tbuildPath: data.bitbucketBuildPath || \"/\",\n\t\t\t\tbitbucketId: data.bitbucketId || \"\",\n\t\t\t\twatchPaths: data.watchPaths || [],\n\t\t\t\tenableSubmodules: data.enableSubmodules || false,\n\t\t\t});\n\t\t}\n\t}, [form.reset, data?.applicationId, form]);\n\n\tconst onSubmit = async (data: BitbucketProvider) => {\n\t\tawait mutateAsync({\n\t\t\tbitbucketBranch: data.branch,\n\t\t\tbitbucketRepository: data.repository.repo,\n\t\t\tbitbucketRepositorySlug: data.repository.slug || data.repository.repo,\n\t\t\tbitbucketOwner: data.repository.owner,\n\t\t\tbitbucketBuildPath: data.buildPath,\n\t\t\tbitbucketId: data.bitbucketId,\n\t\t\tapplicationId,\n\t\t\twatchPaths: data.watchPaths || [],\n\t\t\tenableSubmodules: data.enableSubmodules || false,\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(\"Service Provider Saved\");\n\t\t\t\tawait refetch();\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error saving the Bitbucket provider\");\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<div>\n\t\t\t<Form {...form}>\n\t\t\t\t<form\n\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\tclassName=\"grid w-full gap-4 py-3\"\n\t\t\t\t>\n\t\t\t\t\t{error && (\n\t\t\t\t\t\t<AlertBlock type=\"error\">Repositories: {error.message}</AlertBlock>\n\t\t\t\t\t)}\n\t\t\t\t\t<div className=\"grid md:grid-cols-2 gap-4\">\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"bitbucketId\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"md:col-span-2 flex flex-col\">\n\t\t\t\t\t\t\t\t\t<FormLabel>Bitbucket Account</FormLabel>\n\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\tonValueChange={(value) => {\n\t\t\t\t\t\t\t\t\t\t\tfield.onChange(value);\n\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"repository\", {\n\t\t\t\t\t\t\t\t\t\t\t\towner: \"\",\n\t\t\t\t\t\t\t\t\t\t\t\trepo: \"\",\n\t\t\t\t\t\t\t\t\t\t\t\tslug: \"\",\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"branch\", \"\");\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tdefaultValue={field.value}\n\t\t\t\t\t\t\t\t\t\tvalue={field.value}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a Bitbucket Account\" />\n\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t{bitbucketProviders?.map((bitbucketProvider) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={bitbucketProvider.bitbucketId}\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={bitbucketProvider.bitbucketId}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{bitbucketProvider.gitProvider.name}\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"repository\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"md:col-span-2 flex flex-col\">\n\t\t\t\t\t\t\t\t\t<div className=\"flex items-center justify-between\">\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Repository</FormLabel>\n\t\t\t\t\t\t\t\t\t\t{field.value.owner && field.value.repo && (\n\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\thref={`https://bitbucket.org/${field.value.owner}/${field.value.slug || field.value.repo}`}\n\t\t\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1 text-sm text-muted-foreground hover:text-primary\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<BitbucketIcon className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t<span>View Repository</span>\n\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<Popover>\n\t\t\t\t\t\t\t\t\t\t<PopoverTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"w-full justify-between !bg-input\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t!field.value && \"text-muted-foreground\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{!field.value.owner\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Select repository\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: isLoadingRepositories\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Loading....\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: (repositories?.find(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(repo) => repo.name === field.value.repo,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)?.name ?? \"Select repository\")}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</PopoverTrigger>\n\t\t\t\t\t\t\t\t\t\t<PopoverContent className=\"p-0\" align=\"start\">\n\t\t\t\t\t\t\t\t\t\t\t<Command>\n\t\t\t\t\t\t\t\t\t\t\t\t<CommandInput\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Search repository...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-9\"\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t{!bitbucketId ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"py-6 text-center text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSelect a Bitbucket account first\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t) : isLoadingRepositories ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"py-6 text-center text-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLoading Repositories....\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t\t\t\t<CommandEmpty>No repositories found.</CommandEmpty>\n\t\t\t\t\t\t\t\t\t\t\t\t<ScrollArea className=\"h-96\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{repositories?.map((repo) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={repo.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={repo.url}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"repository\", {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\towner: repo.owner.username as string,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trepo: repo.name,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tslug: repo.slug,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"branch\", \"\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>{repo.name}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground text-xs\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{repo.owner.username}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CheckIcon\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"ml-auto h-4 w-4\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trepo.name === field.value.repo\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"opacity-100\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"opacity-0\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t</ScrollArea>\n\t\t\t\t\t\t\t\t\t\t\t</Command>\n\t\t\t\t\t\t\t\t\t\t</PopoverContent>\n\t\t\t\t\t\t\t\t\t</Popover>\n\t\t\t\t\t\t\t\t\t{form.formState.errors.repository && (\n\t\t\t\t\t\t\t\t\t\t<p className={cn(\"text-sm font-medium text-destructive\")}>\n\t\t\t\t\t\t\t\t\t\t\tRepository is required\n\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"branch\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"block w-full\">\n\t\t\t\t\t\t\t\t\t<FormLabel>Branch</FormLabel>\n\t\t\t\t\t\t\t\t\t<Popover>\n\t\t\t\t\t\t\t\t\t\t<PopoverTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\" w-full justify-between !bg-input\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t!field.value && \"text-muted-foreground\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{status === \"pending\" && fetchStatus === \"fetching\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Loading....\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: field.value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? branches?.find(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(branch) => branch.name === field.value,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)?.name\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Select branch\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</PopoverTrigger>\n\t\t\t\t\t\t\t\t\t\t<PopoverContent className=\"p-0\" align=\"start\">\n\t\t\t\t\t\t\t\t\t\t\t<Command>\n\t\t\t\t\t\t\t\t\t\t\t\t<CommandInput\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Search branch...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-9\"\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t{status === \"pending\" && fetchStatus === \"fetching\" && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"py-6 text-center text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLoading Branches....\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t{!repository?.owner && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"py-6 text-center text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSelect a repository\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t<ScrollArea className=\"h-96\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandEmpty>No branch found.</CommandEmpty>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{branches?.map((branch) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={branch.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={branch.commit.sha}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"branch\", branch.name);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{branch.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CheckIcon\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"ml-auto h-4 w-4\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbranch.name === field.value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"opacity-100\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"opacity-0\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t</ScrollArea>\n\t\t\t\t\t\t\t\t\t\t\t</Command>\n\t\t\t\t\t\t\t\t\t\t</PopoverContent>\n\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</Popover>\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"buildPath\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Build Path</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"/\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"watchPaths\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"md:col-span-2\">\n\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Watch Paths</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<HelpCircle className=\"size-4 text-muted-foreground hover:text-foreground transition-colors cursor-pointer\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tAdd paths to watch for changes. When files in these\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpaths change, a new deployment will be triggered.\n\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-wrap gap-2 mb-2\">\n\t\t\t\t\t\t\t\t\t\t{field.value?.map((path, index) => (\n\t\t\t\t\t\t\t\t\t\t\t<Badge key={index} variant=\"secondary\">\n\t\t\t\t\t\t\t\t\t\t\t\t{path}\n\t\t\t\t\t\t\t\t\t\t\t\t<X\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"ml-1 size-3 cursor-pointer\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst newPaths = [...(field.value || [])];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnewPaths.splice(index, 1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"watchPaths\", newPaths);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Enter a path to watch (e.g., src/**, dist/*.js)\"\n\t\t\t\t\t\t\t\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (e.key === \"Enter\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst input = e.currentTarget;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst value = input.value.trim();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (value) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst newPaths = [...(field.value || []), value];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"watchPaths\", newPaths);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tinput.value = \"\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst input = document.querySelector(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'input[placeholder=\"Enter a path to watch (e.g., src/**, dist/*.js)\"]',\n\t\t\t\t\t\t\t\t\t\t\t\t\t) as HTMLInputElement;\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst value = input.value.trim();\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (value) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst newPaths = [...(field.value || []), value];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"watchPaths\", newPaths);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tinput.value = \"\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\tAdd\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"enableSubmodules\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"flex items-center space-x-2\">\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormLabel className=\"!mt-0\">Enable Submodules</FormLabel>\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"flex w-full justify-end\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tisLoading={isSavingBitbucketProvider}\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\tclassName=\"w-fit\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tSave\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\t\t\t\t</form>\n\t\t\t</Form>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/general/generic/save-docker-provider.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { useEffect } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { api } from \"@/utils/api\";\n\nconst DockerProviderSchema = z.object({\n\tdockerImage: z.string().min(1, {\n\t\tmessage: \"Docker image is required\",\n\t}),\n\tusername: z.string().optional(),\n\tpassword: z.string().optional(),\n\tregistryURL: z.string().optional(),\n});\n\ntype DockerProvider = z.infer<typeof DockerProviderSchema>;\n\ninterface Props {\n\tapplicationId: string;\n}\n\nexport const SaveDockerProvider = ({ applicationId }: Props) => {\n\tconst { data, refetch } = api.application.one.useQuery({ applicationId });\n\n\tconst { mutateAsync } = api.application.saveDockerProvider.useMutation();\n\tconst form = useForm<DockerProvider>({\n\t\tdefaultValues: {\n\t\t\tdockerImage: \"\",\n\t\t\tpassword: \"\",\n\t\t\tusername: \"\",\n\t\t\tregistryURL: \"\",\n\t\t},\n\t\tresolver: zodResolver(DockerProviderSchema),\n\t});\n\n\tuseEffect(() => {\n\t\tif (data) {\n\t\t\tform.reset({\n\t\t\t\tdockerImage: data.dockerImage || \"\",\n\t\t\t\tpassword: data.password || \"\",\n\t\t\t\tusername: data.username || \"\",\n\t\t\t\tregistryURL: data.registryUrl || \"\",\n\t\t\t});\n\t\t}\n\t}, [form.reset, data?.applicationId, form]);\n\n\tconst onSubmit = async (values: DockerProvider) => {\n\t\tawait mutateAsync({\n\t\t\tdockerImage: values.dockerImage,\n\t\t\tpassword: values.password || null,\n\t\t\tapplicationId,\n\t\t\tusername: values.username || null,\n\t\t\tregistryUrl: values.registryURL || null,\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(\"Docker Provider Saved\");\n\t\t\t\tawait refetch();\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error saving the Docker provider\");\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<Form {...form}>\n\t\t\t<form\n\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\tclassName=\"flex flex-col gap-4\"\n\t\t\t>\n\t\t\t\t<div className=\"grid md:grid-cols-2 gap-4 \">\n\t\t\t\t\t<div className=\"space-y-4\">\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"dockerImage\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Docker Image</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"node:16\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t\t<FormField\n\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\tname=\"registryURL\"\n\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t<FormLabel>Registry URL</FormLabel>\n\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t<Input placeholder=\"Registry URL\" {...field} />\n\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t)}\n\t\t\t\t\t/>\n\t\t\t\t\t<div className=\"space-y-4\">\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"username\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Username</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Username\"\n\t\t\t\t\t\t\t\t\t\t\tautoComplete=\"username\"\n\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"space-y-4\">\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"password\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Password</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Password\"\n\t\t\t\t\t\t\t\t\t\t\tautoComplete=\"one-time-code\"\n\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\ttype=\"password\"\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"flex flex-row justify-end\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\tclassName=\"w-fit\"\n\t\t\t\t\t\tisLoading={form.formState.isSubmitting}\n\t\t\t\t\t>\n\t\t\t\t\t\tSave{\" \"}\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t</form>\n\t\t</Form>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/general/generic/save-drag-n-drop.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { TrashIcon } from \"lucide-react\";\nimport { useEffect } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { Button } from \"@/components/ui/button\";\nimport { Dropzone } from \"@/components/ui/dropzone\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { api } from \"@/utils/api\";\nimport { type UploadFile, uploadFileSchema } from \"@/utils/schema\";\n\ninterface Props {\n\tapplicationId: string;\n}\n\nexport const SaveDragNDrop = ({ applicationId }: Props) => {\n\tconst { data, refetch } = api.application.one.useQuery({ applicationId });\n\n\tconst { mutateAsync, isPending } =\n\t\tapi.application.dropDeployment.useMutation();\n\n\tconst form = useForm({\n\t\tdefaultValues: {},\n\t\tresolver: zodResolver(uploadFileSchema),\n\t});\n\n\tuseEffect(() => {\n\t\tif (data) {\n\t\t\tform.reset({\n\t\t\t\tdropBuildPath: data.dropBuildPath || \"\",\n\t\t\t});\n\t\t}\n\t}, [data, form, form.reset, form.formState.isSubmitSuccessful]);\n\tconst zip = form.watch(\"zip\");\n\n\tconst onSubmit = async (values: UploadFile) => {\n\t\tconst formData = new FormData();\n\n\t\tformData.append(\"zip\", values.zip);\n\t\tformData.append(\"applicationId\", applicationId);\n\t\tif (values.dropBuildPath) {\n\t\t\tformData.append(\"dropBuildPath\", values.dropBuildPath);\n\t\t}\n\n\t\tawait mutateAsync(formData)\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(\"Deployment saved\");\n\t\t\t\tawait refetch();\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error saving the deployment\");\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<Form {...form}>\n\t\t\t<form\n\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\tclassName=\"flex flex-col gap-4\"\n\t\t\t>\n\t\t\t\t<div className=\"grid md:grid-cols-2 gap-4 \">\n\t\t\t\t\t<div className=\"md:col-span-2 space-y-4\">\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"dropBuildPath\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"w-full \">\n\t\t\t\t\t\t\t\t\t<FormLabel>Build Path</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input {...field} placeholder=\"Build Path\" />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"zip\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"w-full \">\n\t\t\t\t\t\t\t\t\t<FormLabel>Zip file</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Dropzone\n\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\tdropMessage=\"Drop files or click here\"\n\t\t\t\t\t\t\t\t\t\t\taccept=\".zip\"\n\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\tif (e instanceof FileList) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(e[0]);\n\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(e);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t{zip instanceof File && (\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-4 items-center\">\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t{zip.name} ({zip.size} bytes)\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-fit\"\n\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(null);\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<TrashIcon className=\"w-4 h-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"flex flex-row justify-end\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\tclassName=\"w-fit\"\n\t\t\t\t\t\tisLoading={isPending}\n\t\t\t\t\t\tdisabled={!zip || isPending}\n\t\t\t\t\t>\n\t\t\t\t\t\tDeploy{\" \"}\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t</form>\n\t\t</Form>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/general/generic/save-git-provider.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { HelpCircle, KeyRoundIcon, LockIcon, X } from \"lucide-react\";\nimport Link from \"next/link\";\nimport { useRouter } from \"next/router\";\nimport { useEffect } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { GitIcon } from \"@/components/icons/data-tools-icons\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectGroup,\n\tSelectItem,\n\tSelectLabel,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { Switch } from \"@/components/ui/switch\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { api } from \"@/utils/api\";\n\nconst GitProviderSchema = z.object({\n\tbuildPath: z.string().min(1, \"Path is required\").default(\"/\"),\n\trepositoryURL: z.string().min(1, {\n\t\tmessage: \"Repository URL is required\",\n\t}),\n\tbranch: z.string().min(1, \"Branch required\"),\n\tsshKey: z.string().optional(),\n\twatchPaths: z.array(z.string()).optional(),\n\tenableSubmodules: z.boolean().default(false),\n});\n\ntype GitProvider = z.infer<typeof GitProviderSchema>;\n\ninterface Props {\n\tapplicationId: string;\n}\n\nexport const SaveGitProvider = ({ applicationId }: Props) => {\n\tconst { data, refetch } = api.application.one.useQuery({ applicationId });\n\tconst { data: sshKeys } = api.sshKey.all.useQuery();\n\tconst router = useRouter();\n\n\tconst { mutateAsync, isPending } =\n\t\tapi.application.saveGitProvider.useMutation();\n\n\tconst form = useForm({\n\t\tdefaultValues: {\n\t\t\tbranch: \"\",\n\t\t\tbuildPath: \"/\",\n\t\t\trepositoryURL: \"\",\n\t\t\tsshKey: undefined,\n\t\t\twatchPaths: [],\n\t\t\tenableSubmodules: false,\n\t\t},\n\t\tresolver: zodResolver(GitProviderSchema),\n\t});\n\n\tuseEffect(() => {\n\t\tif (data) {\n\t\t\tform.reset({\n\t\t\t\tsshKey: data.customGitSSHKeyId || undefined,\n\t\t\t\tbranch: data.customGitBranch || \"\",\n\t\t\t\tbuildPath: data.customGitBuildPath || \"/\",\n\t\t\t\trepositoryURL: data.customGitUrl || \"\",\n\t\t\t\twatchPaths: data.watchPaths || [],\n\t\t\t\tenableSubmodules: data.enableSubmodules ?? false,\n\t\t\t});\n\t\t}\n\t}, [form.reset, data, form]);\n\n\tconst onSubmit = async (values: GitProvider) => {\n\t\tawait mutateAsync({\n\t\t\tcustomGitBranch: values.branch,\n\t\t\tcustomGitBuildPath: values.buildPath,\n\t\t\tcustomGitUrl: values.repositoryURL,\n\t\t\tcustomGitSSHKeyId: values.sshKey === \"none\" ? null : values.sshKey,\n\t\t\tapplicationId,\n\t\t\twatchPaths: values.watchPaths || [],\n\t\t\tenableSubmodules: values.enableSubmodules,\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(\"Git Provider Saved\");\n\t\t\t\tawait refetch();\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error saving the Git provider\");\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<Form {...form}>\n\t\t\t<form\n\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\tclassName=\"flex flex-col gap-4\"\n\t\t\t>\n\t\t\t\t<div className=\"grid md:grid-cols-2 gap-4\">\n\t\t\t\t\t<div className=\"flex items-end col-span-2 gap-4\">\n\t\t\t\t\t\t<div className=\"grow\">\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"repositoryURL\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center justify-between\">\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Repository URL</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t{field.value?.startsWith(\"https://\") && (\n\t\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\t\thref={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1 text-sm text-muted-foreground hover:text-primary\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GitIcon className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span>View Repository</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"Repository URL\" {...field} />\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{sshKeys && sshKeys.length > 0 ? (\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"sshKey\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem className=\"basis-40\">\n\t\t\t\t\t\t\t\t\t\t<FormLabel className=\"w-full inline-flex justify-between\">\n\t\t\t\t\t\t\t\t\t\t\tSSH Key\n\t\t\t\t\t\t\t\t\t\t\t<LockIcon className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\t\t\tkey={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\tonValueChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\tdefaultValue={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a key\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{sshKeys?.map((sshKey) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={sshKey.sshKeyId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={sshKey.sshKeyId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{sshKey.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"none\">None</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectLabel>Keys ({sshKeys?.length})</SelectLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\tonClick={() => router.push(\"/dashboard/settings/ssh-keys\")}\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<KeyRoundIcon className=\"size-4\" /> Add SSH Key\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"space-y-4\">\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"branch\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Branch</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"Branch\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<FormField\n\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\tname=\"buildPath\"\n\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t<FormLabel>Build Path</FormLabel>\n\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t<Input placeholder=\"/\" {...field} />\n\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t)}\n\t\t\t\t\t/>\n\t\t\t\t\t<FormField\n\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\tname=\"watchPaths\"\n\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t<FormItem className=\"md:col-span-2\">\n\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t<FormLabel>Watch Paths</FormLabel>\n\t\t\t\t\t\t\t\t\t<TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t<HelpCircle className=\"size-4 text-muted-foreground hover:text-foreground transition-colors cursor-pointer\" />\n\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t<TooltipContent className=\"max-w-[300px]\">\n\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\tAdd paths to watch for changes. When files in these\n\t\t\t\t\t\t\t\t\t\t\t\t\tpaths change, a new deployment will be triggered. This\n\t\t\t\t\t\t\t\t\t\t\t\t\twill work only when manual webhook is setup.\n\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div className=\"flex flex-wrap gap-2 mb-2\">\n\t\t\t\t\t\t\t\t\t{field.value?.map((path, index) => (\n\t\t\t\t\t\t\t\t\t\t<Badge key={index} variant=\"secondary\">\n\t\t\t\t\t\t\t\t\t\t\t{path}\n\t\t\t\t\t\t\t\t\t\t\t<X\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"ml-1 size-3 cursor-pointer\"\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst newPaths = [...(field.value || [])];\n\t\t\t\t\t\t\t\t\t\t\t\t\tnewPaths.splice(index, 1);\n\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"watchPaths\", newPaths);\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t<div className=\"flex gap-2\">\n\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Enter a path to watch (e.g., src/**, dist/*.js)\"\n\t\t\t\t\t\t\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\tif (e.key === \"Enter\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst input = e.currentTarget;\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst value = input.value.trim();\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (value) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst newPaths = [...(field.value || []), value];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"watchPaths\", newPaths);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tinput.value = \"\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\tconst input = document.querySelector(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'input[placeholder=\"Enter a path to watch (e.g., src/**, dist/*.js)\"]',\n\t\t\t\t\t\t\t\t\t\t\t\t) as HTMLInputElement;\n\t\t\t\t\t\t\t\t\t\t\t\tconst value = input.value.trim();\n\t\t\t\t\t\t\t\t\t\t\t\tif (value) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst newPaths = [...(field.value || []), value];\n\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"watchPaths\", newPaths);\n\t\t\t\t\t\t\t\t\t\t\t\t\tinput.value = \"\";\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\tAdd\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t)}\n\t\t\t\t\t/>\n\n\t\t\t\t\t<FormField\n\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\tname=\"enableSubmodules\"\n\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t<FormItem className=\"flex items-center space-x-2\">\n\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t<FormLabel className=\"!mt-0\">Enable Submodules</FormLabel>\n\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t)}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"flex flex-row justify-end\">\n\t\t\t\t\t<Button type=\"submit\" className=\"w-fit\" isLoading={isPending}>\n\t\t\t\t\t\tSave\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t</form>\n\t\t</Form>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/general/generic/save-gitea-provider.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { CheckIcon, ChevronsUpDown, HelpCircle, Plus, X } from \"lucide-react\";\nimport Link from \"next/link\";\nimport { useEffect } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { GiteaIcon } from \"@/components/icons/data-tools-icons\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCommand,\n\tCommandEmpty,\n\tCommandGroup,\n\tCommandInput,\n\tCommandItem,\n} from \"@/components/ui/command\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport {\n\tPopover,\n\tPopoverContent,\n\tPopoverTrigger,\n} from \"@/components/ui/popover\";\nimport { ScrollArea } from \"@/components/ui/scroll-area\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { Switch } from \"@/components/ui/switch\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { cn } from \"@/lib/utils\";\nimport { api } from \"@/utils/api\";\n\ninterface GiteaRepository {\n\tname: string;\n\turl: string;\n\tid: number;\n\towner: {\n\t\tusername: string;\n\t};\n}\n\ninterface GiteaBranch {\n\tname: string;\n\tcommit: {\n\t\tid: string;\n\t};\n}\n\nconst GiteaProviderSchema = z.object({\n\tbuildPath: z.string().min(1, \"Path is required\").default(\"/\"),\n\trepository: z\n\t\t.object({\n\t\t\trepo: z.string().min(1, \"Repo is required\"),\n\t\t\towner: z.string().min(1, \"Owner is required\"),\n\t\t})\n\t\t.required(),\n\tbranch: z.string().min(1, \"Branch is required\"),\n\tgiteaId: z.string().min(1, \"Gitea Provider is required\"),\n\twatchPaths: z.array(z.string()).default([]),\n\tenableSubmodules: z.boolean().optional(),\n});\n\ntype GiteaProvider = z.infer<typeof GiteaProviderSchema>;\n\ninterface Props {\n\tapplicationId: string;\n}\n\nexport const SaveGiteaProvider = ({ applicationId }: Props) => {\n\tconst { data: giteaProviders } = api.gitea.giteaProviders.useQuery();\n\tconst { data, refetch } = api.application.one.useQuery({ applicationId });\n\n\tconst { mutateAsync, isPending: isSavingGiteaProvider } =\n\t\tapi.application.saveGiteaProvider.useMutation();\n\n\tconst form = useForm({\n\t\tdefaultValues: {\n\t\t\tbuildPath: \"/\",\n\t\t\trepository: {\n\t\t\t\towner: \"\",\n\t\t\t\trepo: \"\",\n\t\t\t},\n\t\t\tgiteaId: \"\",\n\t\t\tbranch: \"\",\n\t\t\twatchPaths: [],\n\t\t\tenableSubmodules: false,\n\t\t},\n\t\tresolver: zodResolver(GiteaProviderSchema),\n\t});\n\n\tconst repository = form.watch(\"repository\");\n\tconst giteaId = form.watch(\"giteaId\");\n\n\tconst { data: giteaUrl } = api.gitea.getGiteaUrl.useQuery(\n\t\t{ giteaId },\n\t\t{\n\t\t\tenabled: !!giteaId,\n\t\t},\n\t);\n\n\tconst {\n\t\tdata: repositories,\n\t\tisLoading: isLoadingRepositories,\n\t\terror,\n\t} = api.gitea.getGiteaRepositories.useQuery(\n\t\t{\n\t\t\tgiteaId,\n\t\t},\n\t\t{\n\t\t\tenabled: !!giteaId,\n\t\t},\n\t);\n\n\tconst {\n\t\tdata: branches,\n\t\tfetchStatus,\n\t\tstatus,\n\t} = api.gitea.getGiteaBranches.useQuery(\n\t\t{\n\t\t\towner: repository?.owner,\n\t\t\trepositoryName: repository?.repo,\n\t\t\tgiteaId: giteaId,\n\t\t},\n\t\t{\n\t\t\tenabled: !!repository?.owner && !!repository?.repo && !!giteaId,\n\t\t},\n\t);\n\n\tuseEffect(() => {\n\t\tif (data) {\n\t\t\tform.reset({\n\t\t\t\tbranch: data.giteaBranch || \"\",\n\t\t\t\trepository: {\n\t\t\t\t\trepo: data.giteaRepository || \"\",\n\t\t\t\t\towner: data.giteaOwner || \"\",\n\t\t\t\t},\n\t\t\t\tbuildPath: data.giteaBuildPath || \"/\",\n\t\t\t\tgiteaId: data.giteaId || \"\",\n\t\t\t\twatchPaths: data.watchPaths || [],\n\t\t\t\tenableSubmodules: data.enableSubmodules || false,\n\t\t\t});\n\t\t}\n\t}, [form.reset, data?.applicationId, form]);\n\n\tconst onSubmit = async (data: GiteaProvider) => {\n\t\tawait mutateAsync({\n\t\t\tgiteaBranch: data.branch,\n\t\t\tgiteaRepository: data.repository.repo,\n\t\t\tgiteaOwner: data.repository.owner,\n\t\t\tgiteaBuildPath: data.buildPath,\n\t\t\tgiteaId: data.giteaId,\n\t\t\tapplicationId,\n\t\t\twatchPaths: data.watchPaths,\n\t\t\tenableSubmodules: data.enableSubmodules || false,\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(\"Service Provider Saved\");\n\t\t\t\tawait refetch();\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error saving the Gitea provider\");\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<div>\n\t\t\t<Form {...form}>\n\t\t\t\t<form\n\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\tclassName=\"grid w-full gap-4 py-3\"\n\t\t\t\t>\n\t\t\t\t\t{error && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\t\t\t\t\t<div className=\"grid md:grid-cols-2 gap-4\">\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"giteaId\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"md:col-span-2 flex flex-col\">\n\t\t\t\t\t\t\t\t\t<FormLabel>Gitea Account</FormLabel>\n\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\tonValueChange={(value) => {\n\t\t\t\t\t\t\t\t\t\t\tfield.onChange(value);\n\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"repository\", {\n\t\t\t\t\t\t\t\t\t\t\t\towner: \"\",\n\t\t\t\t\t\t\t\t\t\t\t\trepo: \"\",\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"branch\", \"\");\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tdefaultValue={field.value}\n\t\t\t\t\t\t\t\t\t\tvalue={field.value}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a Gitea Account\" />\n\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t{giteaProviders?.map((giteaProvider) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={giteaProvider.giteaId}\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={giteaProvider.giteaId}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{giteaProvider.gitProvider.name}\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"repository\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"md:col-span-2 flex flex-col\">\n\t\t\t\t\t\t\t\t\t<div className=\"flex items-center justify-between\">\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Repository</FormLabel>\n\t\t\t\t\t\t\t\t\t\t{field.value.owner && field.value.repo && (\n\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\thref={`${giteaUrl}/${field.value.owner}/${field.value.repo}`}\n\t\t\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1 text-sm text-muted-foreground hover:text-primary\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<GiteaIcon className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t<span>View Repository</span>\n\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t<Popover>\n\t\t\t\t\t\t\t\t\t\t<PopoverTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"w-full justify-between !bg-input\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t!field.value && \"text-muted-foreground\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{!field.value.owner\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Select repository\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: isLoadingRepositories\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Loading....\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: (repositories?.find(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(repo: GiteaRepository) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trepo.name === field.value.repo,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)?.name ?? \"Select repository\")}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</PopoverTrigger>\n\t\t\t\t\t\t\t\t\t\t<PopoverContent className=\"p-0\" align=\"start\">\n\t\t\t\t\t\t\t\t\t\t\t<Command>\n\t\t\t\t\t\t\t\t\t\t\t\t<CommandInput\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Search repository...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-9\"\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t{!giteaId ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"py-6 text-center text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSelect a Gitea account first\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t) : isLoadingRepositories ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"py-6 text-center text-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLoading Repositories....\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t\t\t\t<CommandEmpty>No repositories found.</CommandEmpty>\n\t\t\t\t\t\t\t\t\t\t\t\t<ScrollArea className=\"h-96\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{repositories && repositories.length === 0 && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandEmpty>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tNo repositories found.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandEmpty>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{repositories?.map((repo: GiteaRepository) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={repo.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={repo.url}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"repository\", {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\towner: repo.owner.username as string,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trepo: repo.name,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"branch\", \"\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>{repo.name}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground text-xs\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{repo.owner.username}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CheckIcon\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"ml-auto h-4 w-4\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trepo.name === field.value.repo\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"opacity-100\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"opacity-0\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t</ScrollArea>\n\t\t\t\t\t\t\t\t\t\t\t</Command>\n\t\t\t\t\t\t\t\t\t\t</PopoverContent>\n\t\t\t\t\t\t\t\t\t</Popover>\n\t\t\t\t\t\t\t\t\t{form.formState.errors.repository && (\n\t\t\t\t\t\t\t\t\t\t<p className={cn(\"text-sm font-medium text-destructive\")}>\n\t\t\t\t\t\t\t\t\t\t\tRepository is required\n\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"branch\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"block w-full\">\n\t\t\t\t\t\t\t\t\t<FormLabel>Branch</FormLabel>\n\t\t\t\t\t\t\t\t\t<Popover>\n\t\t\t\t\t\t\t\t\t\t<PopoverTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\" w-full justify-between !bg-input\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t!field.value && \"text-muted-foreground\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{status === \"pending\" && fetchStatus === \"fetching\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Loading....\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: field.value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? branches?.find(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(branch: GiteaBranch) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbranch.name === field.value,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)?.name\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Select branch\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</PopoverTrigger>\n\t\t\t\t\t\t\t\t\t\t<PopoverContent className=\"p-0\" align=\"start\">\n\t\t\t\t\t\t\t\t\t\t\t<Command>\n\t\t\t\t\t\t\t\t\t\t\t\t<CommandInput\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Search branch...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-9\"\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t{status === \"pending\" && fetchStatus === \"fetching\" && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"py-6 text-center text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLoading Branches....\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t{!repository?.owner && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"py-6 text-center text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSelect a repository\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t<ScrollArea className=\"h-96\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandEmpty>No branch found.</CommandEmpty>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{branches && branches.length === 0 && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandItem>No branches found.</CommandItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{branches?.map((branch: GiteaBranch) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={branch.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={branch.commit.id}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"branch\", branch.name);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{branch.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CheckIcon\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"ml-auto h-4 w-4\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbranch.name === field.value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"opacity-100\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"opacity-0\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t</ScrollArea>\n\t\t\t\t\t\t\t\t\t\t\t</Command>\n\t\t\t\t\t\t\t\t\t\t</PopoverContent>\n\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</Popover>\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"buildPath\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Build Path</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"/\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"watchPaths\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"md:col-span-2\">\n\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Watch Paths</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<HelpCircle className=\"size-4 text-muted-foreground hover:text-foreground transition-colors cursor-pointer\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tAdd paths to watch for changes. When files in these\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpaths change, a new deployment will be triggered.\n\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-wrap gap-2 mb-2\">\n\t\t\t\t\t\t\t\t\t\t{field.value?.map((path: string, index: number) => (\n\t\t\t\t\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\t\t\t\t\tkey={index}\n\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{path}\n\t\t\t\t\t\t\t\t\t\t\t\t<X\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"size-3 cursor-pointer hover:text-destructive\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst newPaths = [...(field.value || [])];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnewPaths.splice(index, 1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(newPaths);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div className=\"flex gap-2\">\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Enter a path to watch (e.g., src/**, dist/*.js)\"\n\t\t\t\t\t\t\t\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (e.key === \"Enter\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst input = e.currentTarget;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst path = input.value.trim();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (path) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange([...(field.value || []), path]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tinput.value = \"\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\tconst input = document.querySelector(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'input[placeholder*=\"Enter a path\"]',\n\t\t\t\t\t\t\t\t\t\t\t\t) as HTMLInputElement;\n\t\t\t\t\t\t\t\t\t\t\t\tconst path = input.value.trim();\n\t\t\t\t\t\t\t\t\t\t\t\tif (path) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange([...(field.value || []), path]);\n\t\t\t\t\t\t\t\t\t\t\t\t\tinput.value = \"\";\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<Plus className=\"size-4\" />\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"enableSubmodules\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"flex items-center space-x-2\">\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormLabel className=\"!mt-0\">Enable Submodules</FormLabel>\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"flex w-full justify-end\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tisLoading={isSavingGiteaProvider}\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\tclassName=\"w-fit\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tSave\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\t\t\t\t</form>\n\t\t\t</Form>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/general/generic/save-github-provider.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { CheckIcon, ChevronsUpDown, HelpCircle, Plus, X } from \"lucide-react\";\nimport Link from \"next/link\";\nimport { useEffect } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { GithubIcon } from \"@/components/icons/data-tools-icons\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCommand,\n\tCommandEmpty,\n\tCommandGroup,\n\tCommandInput,\n\tCommandItem,\n} from \"@/components/ui/command\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport {\n\tPopover,\n\tPopoverContent,\n\tPopoverTrigger,\n} from \"@/components/ui/popover\";\nimport { ScrollArea } from \"@/components/ui/scroll-area\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { Switch } from \"@/components/ui/switch\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { cn } from \"@/lib/utils\";\nimport { api } from \"@/utils/api\";\n\nconst GithubProviderSchema = z.object({\n\tbuildPath: z.string().min(1, \"Path is required\").default(\"/\"),\n\trepository: z\n\t\t.object({\n\t\t\trepo: z.string().min(1, \"Repo is required\"),\n\t\t\towner: z.string().min(1, \"Owner is required\"),\n\t\t})\n\t\t.required(),\n\tbranch: z.string().min(1, \"Branch is required\"),\n\tgithubId: z.string().min(1, \"Github Provider is required\"),\n\twatchPaths: z.array(z.string()).optional(),\n\ttriggerType: z.enum([\"push\", \"tag\"]).default(\"push\"),\n\tenableSubmodules: z.boolean().default(false),\n});\n\ntype GithubProvider = z.infer<typeof GithubProviderSchema>;\n\ninterface Props {\n\tapplicationId: string;\n}\n\nexport const SaveGithubProvider = ({ applicationId }: Props) => {\n\tconst { data: githubProviders } = api.github.githubProviders.useQuery();\n\tconst { data, refetch } = api.application.one.useQuery({ applicationId });\n\n\tconst { mutateAsync, isPending: isSavingGithubProvider } =\n\t\tapi.application.saveGithubProvider.useMutation();\n\n\tconst form = useForm({\n\t\tdefaultValues: {\n\t\t\tbuildPath: \"/\",\n\t\t\trepository: {\n\t\t\t\towner: \"\",\n\t\t\t\trepo: \"\",\n\t\t\t},\n\t\t\tgithubId: \"\",\n\t\t\tbranch: \"\",\n\t\t\ttriggerType: \"push\",\n\t\t\tenableSubmodules: false,\n\t\t},\n\t\tresolver: zodResolver(GithubProviderSchema),\n\t});\n\n\tconst repository = form.watch(\"repository\");\n\tconst githubId = form.watch(\"githubId\");\n\tconst triggerType = form.watch(\"triggerType\");\n\n\tconst { data: repositories, isPending: isLoadingRepositories } =\n\t\tapi.github.getGithubRepositories.useQuery(\n\t\t\t{\n\t\t\t\tgithubId,\n\t\t\t},\n\t\t\t{\n\t\t\t\tenabled: !!githubId,\n\t\t\t},\n\t\t);\n\n\tconst {\n\t\tdata: branches,\n\t\tfetchStatus,\n\t\tstatus,\n\t} = api.github.getGithubBranches.useQuery(\n\t\t{\n\t\t\towner: repository?.owner,\n\t\t\trepo: repository?.repo,\n\t\t\tgithubId,\n\t\t},\n\t\t{\n\t\t\tenabled: !!repository?.owner && !!repository?.repo && !!githubId,\n\t\t},\n\t);\n\n\tuseEffect(() => {\n\t\tif (data) {\n\t\t\tform.reset({\n\t\t\t\tbranch: data.branch || \"\",\n\t\t\t\trepository: {\n\t\t\t\t\trepo: data.repository || \"\",\n\t\t\t\t\towner: data.owner || \"\",\n\t\t\t\t},\n\t\t\t\tbuildPath: data.buildPath || \"/\",\n\t\t\t\tgithubId: data.githubId || \"\",\n\t\t\t\twatchPaths: data.watchPaths || [],\n\t\t\t\ttriggerType: data.triggerType || \"push\",\n\t\t\t\tenableSubmodules: data.enableSubmodules ?? false,\n\t\t\t});\n\t\t}\n\t}, [form.reset, data?.applicationId, form]);\n\n\tconst onSubmit = async (data: GithubProvider) => {\n\t\tawait mutateAsync({\n\t\t\tbranch: data.branch,\n\t\t\trepository: data.repository.repo,\n\t\t\tapplicationId,\n\t\t\towner: data.repository.owner,\n\t\t\tbuildPath: data.buildPath,\n\t\t\tgithubId: data.githubId,\n\t\t\twatchPaths: data.watchPaths || [],\n\t\t\ttriggerType: data.triggerType,\n\t\t\tenableSubmodules: data.enableSubmodules,\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(\"Service Provider Saved\");\n\t\t\t\tawait refetch();\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error saving the github provider\");\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<div>\n\t\t\t<Form {...form}>\n\t\t\t\t<form\n\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\tclassName=\"grid w-full gap-4 py-3\"\n\t\t\t\t>\n\t\t\t\t\t<div className=\"grid md:grid-cols-2 gap-4\">\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"githubId\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"md:col-span-2 flex flex-col\">\n\t\t\t\t\t\t\t\t\t<FormLabel>Github Account</FormLabel>\n\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\tonValueChange={(value) => {\n\t\t\t\t\t\t\t\t\t\t\tfield.onChange(value);\n\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"repository\", {\n\t\t\t\t\t\t\t\t\t\t\t\towner: \"\",\n\t\t\t\t\t\t\t\t\t\t\t\trepo: \"\",\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"branch\", \"\");\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tdefaultValue={field.value}\n\t\t\t\t\t\t\t\t\t\tvalue={field.value}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a Github Account\" />\n\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t{githubProviders?.map((githubProvider) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={githubProvider.githubId}\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={githubProvider.githubId}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{githubProvider.gitProvider.name}\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"repository\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"md:col-span-2 flex flex-col\">\n\t\t\t\t\t\t\t\t\t<div className=\"flex items-center justify-between\">\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Repository</FormLabel>\n\t\t\t\t\t\t\t\t\t\t{field.value.owner && field.value.repo && (\n\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\thref={`https://github.com/${field.value.owner}/${field.value.repo}`}\n\t\t\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1 text-sm text-muted-foreground hover:text-primary\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<GithubIcon className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t<span>View Repository</span>\n\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<Popover>\n\t\t\t\t\t\t\t\t\t\t<PopoverTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"w-full justify-between !bg-input\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t!field.value && \"text-muted-foreground\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{!field.value.owner\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Select repository\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: isLoadingRepositories\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Loading....\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: (repositories?.find(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(repo) => repo.name === field.value.repo,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)?.name ?? \"Select repository\")}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</PopoverTrigger>\n\t\t\t\t\t\t\t\t\t\t<PopoverContent className=\"p-0\" align=\"start\">\n\t\t\t\t\t\t\t\t\t\t\t<Command>\n\t\t\t\t\t\t\t\t\t\t\t\t<CommandInput\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Search repository...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-9\"\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t{!githubId ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"py-6 text-center text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSelect a GitHub account first\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t) : isLoadingRepositories ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"py-6 text-center text-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLoading Repositories....\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t\t\t\t<CommandEmpty>No repositories found.</CommandEmpty>\n\t\t\t\t\t\t\t\t\t\t\t\t<ScrollArea className=\"h-96\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{repositories?.map((repo) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={repo.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={repo.url}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"repository\", {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\towner: repo.owner.login as string,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trepo: repo.name,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"branch\", \"\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>{repo.name}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground text-xs\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{repo.owner.login}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CheckIcon\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"ml-auto h-4 w-4\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trepo.name === field.value.repo\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"opacity-100\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"opacity-0\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t</ScrollArea>\n\t\t\t\t\t\t\t\t\t\t\t</Command>\n\t\t\t\t\t\t\t\t\t\t</PopoverContent>\n\t\t\t\t\t\t\t\t\t</Popover>\n\t\t\t\t\t\t\t\t\t{form.formState.errors.repository && (\n\t\t\t\t\t\t\t\t\t\t<p className={cn(\"text-sm font-medium text-destructive\")}>\n\t\t\t\t\t\t\t\t\t\t\tRepository is required\n\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"branch\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"block w-full\">\n\t\t\t\t\t\t\t\t\t<FormLabel>Branch</FormLabel>\n\t\t\t\t\t\t\t\t\t<Popover>\n\t\t\t\t\t\t\t\t\t\t<PopoverTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\" w-full justify-between !bg-input\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t!field.value && \"text-muted-foreground\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{status === \"pending\" && fetchStatus === \"fetching\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Loading....\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: field.value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? branches?.find(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(branch) => branch.name === field.value,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)?.name\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Select branch\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</PopoverTrigger>\n\t\t\t\t\t\t\t\t\t\t<PopoverContent className=\"p-0\" align=\"start\">\n\t\t\t\t\t\t\t\t\t\t\t<Command>\n\t\t\t\t\t\t\t\t\t\t\t\t<CommandInput\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Search branch...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-9\"\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t{status === \"pending\" && fetchStatus === \"fetching\" && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"py-6 text-center text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLoading Branches....\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t{!repository?.owner && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"py-6 text-center text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSelect a repository\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t<ScrollArea className=\"h-96\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandEmpty>No branch found.</CommandEmpty>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{branches?.map((branch) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={branch.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={branch.commit.sha}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"branch\", branch.name);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{branch.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CheckIcon\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"ml-auto h-4 w-4\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbranch.name === field.value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"opacity-100\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"opacity-0\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t</ScrollArea>\n\t\t\t\t\t\t\t\t\t\t\t</Command>\n\t\t\t\t\t\t\t\t\t\t</PopoverContent>\n\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</Popover>\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"buildPath\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Build Path</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"/\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"triggerType\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"md:col-span-2\">\n\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2 \">\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Trigger Type</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<HelpCircle className=\"size-4 text-muted-foreground hover:text-foreground transition-colors cursor-pointer\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tChoose when to trigger deployments: on push to the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tselected branch or when a new tag is created.\n\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\tonValueChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\tdefaultValue={field.value}\n\t\t\t\t\t\t\t\t\t\tvalue={field.value}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a trigger type\" />\n\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"push\">On Push</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"tag\">On Tag</SelectItem>\n\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{triggerType === \"push\" && (\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"watchPaths\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem className=\"md:col-span-2\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Watch Paths</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<HelpCircle className=\"size-4 text-muted-foreground hover:text-foreground transition-colors cursor-pointer\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAdd paths to watch for changes. When files in\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthese paths change, a new deployment will be\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttriggered.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-wrap gap-2 mb-2\">\n\t\t\t\t\t\t\t\t\t\t\t{field.value?.map((path, index) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={`${path}-${index}`}\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{path}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<X\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"size-3 cursor-pointer hover:text-destructive\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst newPaths = [...(field.value || [])];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnewPaths.splice(index, 1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(newPaths);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Enter a path to watch (e.g., src/**, dist/*.js)\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (e.key === \"Enter\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst input = e.currentTarget;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst path = input.value.trim();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (path) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange([...(field.value || []), path]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tinput.value = \"\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst input = document.querySelector(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'input[placeholder*=\"Enter a path\"]',\n\t\t\t\t\t\t\t\t\t\t\t\t\t) as HTMLInputElement;\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst path = input.value.trim();\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (path) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange([...(field.value || []), path]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tinput.value = \"\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<Plus className=\"size-4\" />\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"enableSubmodules\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"flex items-center space-x-2\">\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormLabel className=\"!mt-0\">Enable Submodules</FormLabel>\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"flex w-full justify-end\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tisLoading={isSavingGithubProvider}\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\tclassName=\"w-fit\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tSave\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\t\t\t\t</form>\n\t\t\t</Form>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/general/generic/save-gitlab-provider.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { CheckIcon, ChevronsUpDown, HelpCircle, Plus, X } from \"lucide-react\";\nimport Link from \"next/link\";\nimport { useEffect, useMemo } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { GitlabIcon } from \"@/components/icons/data-tools-icons\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCommand,\n\tCommandEmpty,\n\tCommandGroup,\n\tCommandInput,\n\tCommandItem,\n} from \"@/components/ui/command\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport {\n\tPopover,\n\tPopoverContent,\n\tPopoverTrigger,\n} from \"@/components/ui/popover\";\nimport { ScrollArea } from \"@/components/ui/scroll-area\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { Switch } from \"@/components/ui/switch\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { cn } from \"@/lib/utils\";\nimport { api } from \"@/utils/api\";\n\nconst GitlabProviderSchema = z.object({\n\tbuildPath: z.string().min(1, \"Path is required\").default(\"/\"),\n\trepository: z\n\t\t.object({\n\t\t\trepo: z.string().min(1, \"Repo is required\"),\n\t\t\towner: z.string().min(1, \"Owner is required\"),\n\t\t\tgitlabPathNamespace: z.string().min(1),\n\t\t\tid: z.number().nullable(),\n\t\t})\n\t\t.required(),\n\tbranch: z.string().min(1, \"Branch is required\"),\n\tgitlabId: z.string().min(1, \"Gitlab Provider is required\"),\n\twatchPaths: z.array(z.string()).optional(),\n\tenableSubmodules: z.boolean().default(false),\n});\n\ntype GitlabProvider = z.infer<typeof GitlabProviderSchema>;\n\ninterface Props {\n\tapplicationId: string;\n}\n\nexport const SaveGitlabProvider = ({ applicationId }: Props) => {\n\tconst { data: gitlabProviders } = api.gitlab.gitlabProviders.useQuery();\n\tconst { data, refetch } = api.application.one.useQuery({ applicationId });\n\n\tconst { mutateAsync, isPending: isSavingGitlabProvider } =\n\t\tapi.application.saveGitlabProvider.useMutation();\n\n\tconst form = useForm({\n\t\tdefaultValues: {\n\t\t\tbuildPath: \"/\",\n\t\t\trepository: {\n\t\t\t\towner: \"\",\n\t\t\t\trepo: \"\",\n\t\t\t\tgitlabPathNamespace: \"\",\n\t\t\t\tid: null,\n\t\t\t},\n\t\t\tgitlabId: \"\",\n\t\t\tbranch: \"\",\n\t\t\tenableSubmodules: false,\n\t\t},\n\t\tresolver: zodResolver(GitlabProviderSchema),\n\t});\n\n\tconst repository = form.watch(\"repository\");\n\tconst gitlabId = form.watch(\"gitlabId\");\n\n\tconst gitlabUrl = useMemo(() => {\n\t\tconst url = gitlabProviders?.find(\n\t\t\t(provider) => provider.gitlabId === gitlabId,\n\t\t)?.gitlabUrl;\n\n\t\tconst gitlabUrl = url?.replace(/\\/$/, \"\");\n\n\t\treturn gitlabUrl || \"https://gitlab.com\";\n\t}, [gitlabId, gitlabProviders]);\n\n\tconst {\n\t\tdata: repositories,\n\t\tisLoading: isLoadingRepositories,\n\t\terror,\n\t} = api.gitlab.getGitlabRepositories.useQuery(\n\t\t{\n\t\t\tgitlabId,\n\t\t},\n\t\t{\n\t\t\tenabled: !!gitlabId,\n\t\t},\n\t);\n\n\tconst {\n\t\tdata: branches,\n\t\tfetchStatus,\n\t\tstatus,\n\t} = api.gitlab.getGitlabBranches.useQuery(\n\t\t{\n\t\t\towner: repository?.owner,\n\t\t\trepo: repository?.repo,\n\t\t\tid: repository?.id || 0,\n\t\t\tgitlabId: gitlabId,\n\t\t},\n\t\t{\n\t\t\tenabled: !!repository?.owner && !!repository?.repo && !!gitlabId,\n\t\t},\n\t);\n\n\tuseEffect(() => {\n\t\tif (data) {\n\t\t\tform.reset({\n\t\t\t\tbranch: data.gitlabBranch || \"\",\n\t\t\t\trepository: {\n\t\t\t\t\trepo: data.gitlabRepository || \"\",\n\t\t\t\t\towner: data.gitlabOwner || \"\",\n\t\t\t\t\tgitlabPathNamespace: data.gitlabPathNamespace || \"\",\n\t\t\t\t\tid: data.gitlabProjectId,\n\t\t\t\t},\n\t\t\t\tbuildPath: data.gitlabBuildPath || \"/\",\n\t\t\t\tgitlabId: data.gitlabId || \"\",\n\t\t\t\twatchPaths: data.watchPaths || [],\n\t\t\t\tenableSubmodules: data.enableSubmodules ?? false,\n\t\t\t});\n\t\t}\n\t}, [form.reset, data?.applicationId, form]);\n\n\tconst onSubmit = async (data: GitlabProvider) => {\n\t\tawait mutateAsync({\n\t\t\tgitlabBranch: data.branch,\n\t\t\tgitlabRepository: data.repository.repo,\n\t\t\tgitlabOwner: data.repository.owner,\n\t\t\tgitlabBuildPath: data.buildPath,\n\t\t\tgitlabId: data.gitlabId,\n\t\t\tapplicationId,\n\t\t\tgitlabProjectId: data.repository.id,\n\t\t\tgitlabPathNamespace: data.repository.gitlabPathNamespace,\n\t\t\twatchPaths: data.watchPaths || [],\n\t\t\tenableSubmodules: data.enableSubmodules,\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(\"Service Provider Saved\");\n\t\t\t\tawait refetch();\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error saving the gitlab provider\");\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<div>\n\t\t\t<Form {...form}>\n\t\t\t\t<form\n\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\tclassName=\"grid w-full gap-4 py-3\"\n\t\t\t\t>\n\t\t\t\t\t{error && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\t\t\t\t\t<div className=\"grid md:grid-cols-2 gap-4\">\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"gitlabId\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"md:col-span-2 flex flex-col\">\n\t\t\t\t\t\t\t\t\t<FormLabel>Gitlab Account</FormLabel>\n\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\tonValueChange={(value) => {\n\t\t\t\t\t\t\t\t\t\t\tfield.onChange(value);\n\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"repository\", {\n\t\t\t\t\t\t\t\t\t\t\t\towner: \"\",\n\t\t\t\t\t\t\t\t\t\t\t\trepo: \"\",\n\t\t\t\t\t\t\t\t\t\t\t\tid: null,\n\t\t\t\t\t\t\t\t\t\t\t\tgitlabPathNamespace: \"\",\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"branch\", \"\");\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tdefaultValue={field.value}\n\t\t\t\t\t\t\t\t\t\tvalue={field.value}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a Gitlab Account\" />\n\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t{gitlabProviders?.map((gitlabProvider) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={gitlabProvider.gitlabId}\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={gitlabProvider.gitlabId}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{gitlabProvider.gitProvider.name}\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"repository\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"md:col-span-2 flex flex-col\">\n\t\t\t\t\t\t\t\t\t<div className=\"flex items-center justify-between\">\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Repository</FormLabel>\n\t\t\t\t\t\t\t\t\t\t{field.value.gitlabPathNamespace && (\n\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\thref={`${gitlabUrl}/${field.value.gitlabPathNamespace}`}\n\t\t\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1 text-sm text-muted-foreground hover:text-primary\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<GitlabIcon className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t<span>View Repository</span>\n\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<Popover>\n\t\t\t\t\t\t\t\t\t\t<PopoverTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"w-full justify-between !bg-input\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t!field.value && \"text-muted-foreground\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{!field.value.owner\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Select repository\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: isLoadingRepositories\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Loading....\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: (repositories?.find(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(repo) => repo.name === field.value.repo,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)?.name ?? \"Select repository\")}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</PopoverTrigger>\n\t\t\t\t\t\t\t\t\t\t<PopoverContent className=\"p-0\" align=\"start\">\n\t\t\t\t\t\t\t\t\t\t\t<Command>\n\t\t\t\t\t\t\t\t\t\t\t\t<CommandInput\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Search repository...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-9\"\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t{!gitlabId ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"py-6 text-center text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSelect a GitLab account first\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t) : isLoadingRepositories ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"py-6 text-center text-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLoading Repositories....\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t\t\t\t<CommandEmpty>No repositories found.</CommandEmpty>\n\t\t\t\t\t\t\t\t\t\t\t\t<ScrollArea className=\"h-96\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{repositories && repositories.length === 0 && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandEmpty>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tNo repositories found.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandEmpty>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{repositories?.map((repo) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={repo.url}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={repo.url}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"repository\", {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\towner: repo.owner.username as string,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trepo: repo.name,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tid: repo.id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgitlabPathNamespace: repo.url,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"branch\", \"\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>{repo.name}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground text-xs\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{repo.owner.username}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CheckIcon\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"ml-auto h-4 w-4\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trepo.url ===\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.value.gitlabPathNamespace\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"opacity-100\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"opacity-0\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t</ScrollArea>\n\t\t\t\t\t\t\t\t\t\t\t</Command>\n\t\t\t\t\t\t\t\t\t\t</PopoverContent>\n\t\t\t\t\t\t\t\t\t</Popover>\n\t\t\t\t\t\t\t\t\t{form.formState.errors.repository && (\n\t\t\t\t\t\t\t\t\t\t<p className={cn(\"text-sm font-medium text-destructive\")}>\n\t\t\t\t\t\t\t\t\t\t\tRepository is required\n\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"branch\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"block w-full\">\n\t\t\t\t\t\t\t\t\t<FormLabel>Branch</FormLabel>\n\t\t\t\t\t\t\t\t\t<Popover>\n\t\t\t\t\t\t\t\t\t\t<PopoverTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\" w-full justify-between !bg-input\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t!field.value && \"text-muted-foreground\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{status === \"pending\" && fetchStatus === \"fetching\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Loading....\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: field.value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? branches?.find(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(branch) => branch.name === field.value,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)?.name\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Select branch\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</PopoverTrigger>\n\t\t\t\t\t\t\t\t\t\t<PopoverContent className=\"p-0\" align=\"start\">\n\t\t\t\t\t\t\t\t\t\t\t<Command>\n\t\t\t\t\t\t\t\t\t\t\t\t<CommandInput\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Search branch...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-9\"\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t{status === \"pending\" && fetchStatus === \"fetching\" && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"py-6 text-center text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLoading Branches....\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t{!repository?.owner && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"py-6 text-center text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSelect a repository\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t<ScrollArea className=\"h-96\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandEmpty>No branch found.</CommandEmpty>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{branches?.map((branch) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={branch.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={branch.commit.id}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"branch\", branch.name);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{branch.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CheckIcon\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"ml-auto h-4 w-4\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbranch.name === field.value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"opacity-100\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"opacity-0\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t</ScrollArea>\n\t\t\t\t\t\t\t\t\t\t\t</Command>\n\t\t\t\t\t\t\t\t\t\t</PopoverContent>\n\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</Popover>\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"buildPath\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Build Path</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"/\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"watchPaths\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"md:col-span-2\">\n\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Watch Paths</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<HelpCircle className=\"size-4 text-muted-foreground hover:text-foreground transition-colors cursor-pointer\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tAdd paths to watch for changes. When files in these\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpaths change, a new deployment will be triggered.\n\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-wrap gap-2 mb-2\">\n\t\t\t\t\t\t\t\t\t\t{field.value?.map((path, index) => (\n\t\t\t\t\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\t\t\t\t\tkey={`${path}-${index}`}\n\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{path}\n\t\t\t\t\t\t\t\t\t\t\t\t<X\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"size-3 cursor-pointer hover:text-destructive\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst newPaths = [...(field.value || [])];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnewPaths.splice(index, 1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(newPaths);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div className=\"flex gap-2\">\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Enter a path to watch (e.g., src/**, dist/*.js)\"\n\t\t\t\t\t\t\t\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (e.key === \"Enter\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst input = e.currentTarget;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst path = input.value.trim();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (path) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange([...(field.value || []), path]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tinput.value = \"\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\tconst input = document.querySelector(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'input[placeholder*=\"Enter a path\"]',\n\t\t\t\t\t\t\t\t\t\t\t\t) as HTMLInputElement;\n\t\t\t\t\t\t\t\t\t\t\t\tconst path = input.value.trim();\n\t\t\t\t\t\t\t\t\t\t\t\tif (path) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange([...(field.value || []), path]);\n\t\t\t\t\t\t\t\t\t\t\t\t\tinput.value = \"\";\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<Plus className=\"size-4\" />\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"enableSubmodules\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"flex items-center space-x-2\">\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormLabel className=\"!mt-0\">Enable Submodules</FormLabel>\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"flex w-full justify-end\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tisLoading={isSavingGitlabProvider}\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\tclassName=\"w-fit\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tSave\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\t\t\t\t</form>\n\t\t\t</Form>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/general/generic/show.tsx",
    "content": "import { GitBranch, Loader2, UploadCloud } from \"lucide-react\";\nimport Link from \"next/link\";\nimport { useState } from \"react\";\nimport { toast } from \"sonner\";\nimport { SaveDockerProvider } from \"@/components/dashboard/application/general/generic/save-docker-provider\";\nimport { SaveGitProvider } from \"@/components/dashboard/application/general/generic/save-git-provider\";\nimport { SaveGiteaProvider } from \"@/components/dashboard/application/general/generic/save-gitea-provider\";\nimport { SaveGithubProvider } from \"@/components/dashboard/application/general/generic/save-github-provider\";\nimport {\n\tBitbucketIcon,\n\tDockerIcon,\n\tGiteaIcon,\n\tGithubIcon,\n\tGitIcon,\n\tGitlabIcon,\n} from \"@/components/icons/data-tools-icons\";\nimport { Card, CardContent, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport { Tabs, TabsContent, TabsList, TabsTrigger } from \"@/components/ui/tabs\";\nimport { api } from \"@/utils/api\";\nimport { SaveBitbucketProvider } from \"./save-bitbucket-provider\";\nimport { SaveDragNDrop } from \"./save-drag-n-drop\";\nimport { SaveGitlabProvider } from \"./save-gitlab-provider\";\nimport { UnauthorizedGitProvider } from \"./unauthorized-git-provider\";\n\ntype TabState =\n\t| \"github\"\n\t| \"docker\"\n\t| \"git\"\n\t| \"drop\"\n\t| \"gitlab\"\n\t| \"bitbucket\"\n\t| \"gitea\";\n\ninterface Props {\n\tapplicationId: string;\n}\n\nexport const ShowProviderForm = ({ applicationId }: Props) => {\n\tconst { data: githubProviders, isPending: isLoadingGithub } =\n\t\tapi.github.githubProviders.useQuery();\n\tconst { data: gitlabProviders, isPending: isLoadingGitlab } =\n\t\tapi.gitlab.gitlabProviders.useQuery();\n\tconst { data: bitbucketProviders, isPending: isLoadingBitbucket } =\n\t\tapi.bitbucket.bitbucketProviders.useQuery();\n\tconst { data: giteaProviders, isPending: isLoadingGitea } =\n\t\tapi.gitea.giteaProviders.useQuery();\n\n\tconst { data: application, refetch } = api.application.one.useQuery({\n\t\tapplicationId,\n\t});\n\tconst { mutateAsync: disconnectGitProvider } =\n\t\tapi.application.disconnectGitProvider.useMutation();\n\n\tconst [tab, setSab] = useState<TabState>(application?.sourceType || \"github\");\n\n\tconst isLoading =\n\t\tisLoadingGithub || isLoadingGitlab || isLoadingBitbucket || isLoadingGitea;\n\n\tconst handleDisconnect = async () => {\n\t\ttry {\n\t\t\tawait disconnectGitProvider({ applicationId });\n\t\t\ttoast.success(\"Repository disconnected successfully\");\n\t\t\tawait refetch();\n\t\t} catch (error) {\n\t\t\ttoast.error(\n\t\t\t\t`Failed to disconnect repository: ${\n\t\t\t\t\terror instanceof Error ? error.message : \"Unknown error\"\n\t\t\t\t}`,\n\t\t\t);\n\t\t}\n\t};\n\n\tif (isLoading) {\n\t\treturn (\n\t\t\t<Card className=\"group relative w-full bg-transparent\">\n\t\t\t\t<CardHeader>\n\t\t\t\t\t<CardTitle className=\"flex items-start justify-between\">\n\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t<span className=\"flex flex-col space-y-0.5\">Provider</span>\n\t\t\t\t\t\t\t<p className=\"flex items-center text-sm font-normal text-muted-foreground\">\n\t\t\t\t\t\t\t\tSelect the source of your code\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"hidden space-y-1 text-sm font-normal md:block\">\n\t\t\t\t\t\t\t<GitBranch className=\"size-6 text-muted-foreground\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</CardTitle>\n\t\t\t\t</CardHeader>\n\t\t\t\t<CardContent>\n\t\t\t\t\t<div className=\"flex min-h-[25vh] items-center justify-center\">\n\t\t\t\t\t\t<div className=\"flex items-center gap-2 text-muted-foreground\">\n\t\t\t\t\t\t\t<Loader2 className=\"size-4 animate-spin\" />\n\t\t\t\t\t\t\t<span>Loading providers...</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</CardContent>\n\t\t\t</Card>\n\t\t);\n\t}\n\n\t// Check if user doesn't have access to the current git provider\n\tif (\n\t\tapplication &&\n\t\t!application.hasGitProviderAccess &&\n\t\tapplication.sourceType !== \"docker\" &&\n\t\tapplication.sourceType !== \"drop\"\n\t) {\n\t\treturn (\n\t\t\t<Card className=\"group relative w-full bg-transparent\">\n\t\t\t\t<CardHeader>\n\t\t\t\t\t<CardTitle className=\"flex items-start justify-between\">\n\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t<span className=\"flex flex-col space-y-0.5\">Provider</span>\n\t\t\t\t\t\t\t<p className=\"flex items-center text-sm font-normal text-muted-foreground\">\n\t\t\t\t\t\t\t\tRepository connection through unauthorized provider\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"hidden space-y-1 text-sm font-normal md:block\">\n\t\t\t\t\t\t\t<GitBranch className=\"size-6 text-muted-foreground\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</CardTitle>\n\t\t\t\t</CardHeader>\n\t\t\t\t<CardContent>\n\t\t\t\t\t<UnauthorizedGitProvider\n\t\t\t\t\t\tservice={application}\n\t\t\t\t\t\tonDisconnect={handleDisconnect}\n\t\t\t\t\t/>\n\t\t\t\t</CardContent>\n\t\t\t</Card>\n\t\t);\n\t}\n\n\treturn (\n\t\t<Card className=\"group relative w-full bg-transparent\">\n\t\t\t<CardHeader>\n\t\t\t\t<CardTitle className=\"flex items-start justify-between\">\n\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t<span className=\"flex flex-col space-y-0.5\">Provider</span>\n\t\t\t\t\t\t<p className=\"flex items-center text-sm font-normal text-muted-foreground\">\n\t\t\t\t\t\t\tSelect the source of your code\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"hidden space-y-1 text-sm font-normal md:block\">\n\t\t\t\t\t\t<GitBranch className=\"size-6 text-muted-foreground\" />\n\t\t\t\t\t</div>\n\t\t\t\t</CardTitle>\n\t\t\t</CardHeader>\n\t\t\t<CardContent>\n\t\t\t\t<Tabs\n\t\t\t\t\tvalue={tab}\n\t\t\t\t\tclassName=\"w-full\"\n\t\t\t\t\tonValueChange={(e) => {\n\t\t\t\t\t\tsetSab(e as TabState);\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<div className=\"flex flex-row items-center justify-between w-full overflow-auto\">\n\t\t\t\t\t\t<TabsList className=\"flex gap-4 justify-start bg-transparent\">\n\t\t\t\t\t\t\t<TabsTrigger\n\t\t\t\t\t\t\t\tvalue=\"github\"\n\t\t\t\t\t\t\t\tclassName=\"rounded-none border-b-2 gap-2 border-b-transparent data-[state=active]:border-b-2 data-[state=active]:border-b-border\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<GithubIcon className=\"size-4 text-current fill-current\" />\n\t\t\t\t\t\t\t\tGithub\n\t\t\t\t\t\t\t</TabsTrigger>\n\t\t\t\t\t\t\t<TabsTrigger\n\t\t\t\t\t\t\t\tvalue=\"gitlab\"\n\t\t\t\t\t\t\t\tclassName=\"rounded-none border-b-2 gap-2 border-b-transparent data-[state=active]:border-b-2 data-[state=active]:border-b-border\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<GitlabIcon className=\"size-4 text-current fill-current\" />\n\t\t\t\t\t\t\t\tGitlab\n\t\t\t\t\t\t\t</TabsTrigger>\n\t\t\t\t\t\t\t<TabsTrigger\n\t\t\t\t\t\t\t\tvalue=\"bitbucket\"\n\t\t\t\t\t\t\t\tclassName=\"rounded-none border-b-2 gap-2 border-b-transparent data-[state=active]:border-b-2 data-[state=active]:border-b-border\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<BitbucketIcon className=\"size-4 text-current fill-current\" />\n\t\t\t\t\t\t\t\tBitbucket\n\t\t\t\t\t\t\t</TabsTrigger>\n\t\t\t\t\t\t\t<TabsTrigger\n\t\t\t\t\t\t\t\tvalue=\"gitea\"\n\t\t\t\t\t\t\t\tclassName=\"rounded-none border-b-2 gap-2 border-b-transparent data-[state=active]:border-b-2 data-[state=active]:border-b-border\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<GiteaIcon className=\"size-4 text-current fill-current\" />\n\t\t\t\t\t\t\t\tGitea\n\t\t\t\t\t\t\t</TabsTrigger>\n\t\t\t\t\t\t\t<TabsTrigger\n\t\t\t\t\t\t\t\tvalue=\"docker\"\n\t\t\t\t\t\t\t\tclassName=\"rounded-none border-b-2 gap-2 border-b-transparent data-[state=active]:border-b-2 data-[state=active]:border-b-border\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<DockerIcon className=\"size-5 text-current\" />\n\t\t\t\t\t\t\t\tDocker\n\t\t\t\t\t\t\t</TabsTrigger>\n\t\t\t\t\t\t\t<TabsTrigger\n\t\t\t\t\t\t\t\tvalue=\"git\"\n\t\t\t\t\t\t\t\tclassName=\"rounded-none border-b-2 gap-2 border-b-transparent data-[state=active]:border-b-2 data-[state=active]:border-b-border\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<GitIcon />\n\t\t\t\t\t\t\t\tGit\n\t\t\t\t\t\t\t</TabsTrigger>\n\t\t\t\t\t\t\t<TabsTrigger\n\t\t\t\t\t\t\t\tvalue=\"drop\"\n\t\t\t\t\t\t\t\tclassName=\"rounded-none border-b-2 gap-2 border-b-transparent data-[state=active]:border-b-2 data-[state=active]:border-b-border\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<UploadCloud className=\"size-5 text-current\" />\n\t\t\t\t\t\t\t\tDrop\n\t\t\t\t\t\t\t</TabsTrigger>\n\t\t\t\t\t\t</TabsList>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<TabsContent value=\"github\" className=\"w-full p-2\">\n\t\t\t\t\t\t{githubProviders && githubProviders?.length > 0 ? (\n\t\t\t\t\t\t\t<SaveGithubProvider applicationId={applicationId} />\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<div className=\"flex flex-col items-center gap-3 min-h-[25vh] justify-center\">\n\t\t\t\t\t\t\t\t<GithubIcon className=\"size-8 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t<span className=\"text-base text-muted-foreground\">\n\t\t\t\t\t\t\t\t\tTo deploy using GitHub, you need to configure your account\n\t\t\t\t\t\t\t\t\tfirst. Please, go to{\" \"}\n\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\thref=\"/dashboard/settings/git-providers\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"text-foreground\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tSettings\n\t\t\t\t\t\t\t\t\t</Link>{\" \"}\n\t\t\t\t\t\t\t\t\tto do so.\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</TabsContent>\n\t\t\t\t\t<TabsContent value=\"gitlab\" className=\"w-full p-2\">\n\t\t\t\t\t\t{gitlabProviders && gitlabProviders?.length > 0 ? (\n\t\t\t\t\t\t\t<SaveGitlabProvider applicationId={applicationId} />\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<div className=\"flex flex-col items-center gap-3 min-h-[25vh] justify-center\">\n\t\t\t\t\t\t\t\t<GitlabIcon className=\"size-8 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t<span className=\"text-base text-muted-foreground\">\n\t\t\t\t\t\t\t\t\tTo deploy using GitLab, you need to configure your account\n\t\t\t\t\t\t\t\t\tfirst. Please, go to{\" \"}\n\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\thref=\"/dashboard/settings/git-providers\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"text-foreground\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tSettings\n\t\t\t\t\t\t\t\t\t</Link>{\" \"}\n\t\t\t\t\t\t\t\t\tto do so.\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</TabsContent>\n\t\t\t\t\t<TabsContent value=\"bitbucket\" className=\"w-full p-2\">\n\t\t\t\t\t\t{bitbucketProviders && bitbucketProviders?.length > 0 ? (\n\t\t\t\t\t\t\t<SaveBitbucketProvider applicationId={applicationId} />\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<div className=\"flex flex-col items-center gap-3 min-h-[25vh] justify-center\">\n\t\t\t\t\t\t\t\t<BitbucketIcon className=\"size-8 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t<span className=\"text-base text-muted-foreground\">\n\t\t\t\t\t\t\t\t\tTo deploy using Bitbucket, you need to configure your account\n\t\t\t\t\t\t\t\t\tfirst. Please, go to{\" \"}\n\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\thref=\"/dashboard/settings/git-providers\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"text-foreground\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tSettings\n\t\t\t\t\t\t\t\t\t</Link>{\" \"}\n\t\t\t\t\t\t\t\t\tto do so.\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</TabsContent>\n\t\t\t\t\t<TabsContent value=\"gitea\" className=\"w-full p-2\">\n\t\t\t\t\t\t{giteaProviders && giteaProviders?.length > 0 ? (\n\t\t\t\t\t\t\t<SaveGiteaProvider applicationId={applicationId} />\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<div className=\"flex flex-col items-center gap-3 min-h-[25vh] justify-center\">\n\t\t\t\t\t\t\t\t<GiteaIcon className=\"size-8 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t<span className=\"text-base text-muted-foreground\">\n\t\t\t\t\t\t\t\t\tTo deploy using Gitea, you need to configure your account\n\t\t\t\t\t\t\t\t\tfirst. Please, go to{\" \"}\n\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\thref=\"/dashboard/settings/git-providers\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"text-foreground\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tSettings\n\t\t\t\t\t\t\t\t\t</Link>{\" \"}\n\t\t\t\t\t\t\t\t\tto do so.\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</TabsContent>\n\t\t\t\t\t<TabsContent value=\"docker\" className=\"w-full p-2\">\n\t\t\t\t\t\t<SaveDockerProvider applicationId={applicationId} />\n\t\t\t\t\t</TabsContent>\n\n\t\t\t\t\t<TabsContent value=\"git\" className=\"w-full p-2\">\n\t\t\t\t\t\t<SaveGitProvider applicationId={applicationId} />\n\t\t\t\t\t</TabsContent>\n\t\t\t\t\t<TabsContent value=\"drop\" className=\"w-full p-2\">\n\t\t\t\t\t\t<SaveDragNDrop applicationId={applicationId} />\n\t\t\t\t\t</TabsContent>\n\t\t\t\t</Tabs>\n\t\t\t</CardContent>\n\t\t</Card>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/general/generic/unauthorized-git-provider.tsx",
    "content": "import { AlertCircle, GitBranch, Unlink } from \"lucide-react\";\nimport {\n\tBitbucketIcon,\n\tGiteaIcon,\n\tGithubIcon,\n\tGitIcon,\n\tGitlabIcon,\n} from \"@/components/icons/data-tools-icons\";\nimport { DialogAction } from \"@/components/shared/dialog-action\";\nimport { Alert, AlertDescription } from \"@/components/ui/alert\";\nimport { Button } from \"@/components/ui/button\";\nimport { Card, CardContent, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport type { RouterOutputs } from \"@/utils/api\";\n\ninterface Props {\n\tservice:\n\t\t| RouterOutputs[\"application\"][\"one\"]\n\t\t| RouterOutputs[\"compose\"][\"one\"];\n\tonDisconnect: () => void;\n}\n\nexport const UnauthorizedGitProvider = ({ service, onDisconnect }: Props) => {\n\tconst getProviderIcon = (sourceType: string) => {\n\t\tswitch (sourceType) {\n\t\t\tcase \"github\":\n\t\t\t\treturn <GithubIcon className=\"size-5 text-muted-foreground\" />;\n\t\t\tcase \"gitlab\":\n\t\t\t\treturn <GitlabIcon className=\"size-5 text-muted-foreground\" />;\n\t\t\tcase \"bitbucket\":\n\t\t\t\treturn <BitbucketIcon className=\"size-5 text-muted-foreground\" />;\n\t\t\tcase \"gitea\":\n\t\t\t\treturn <GiteaIcon className=\"size-5 text-muted-foreground\" />;\n\t\t\tcase \"git\":\n\t\t\t\treturn <GitIcon className=\"size-5 text-muted-foreground\" />;\n\t\t\tdefault:\n\t\t\t\treturn <GitBranch className=\"size-5 text-muted-foreground\" />;\n\t\t}\n\t};\n\n\tconst getRepositoryInfo = () => {\n\t\tswitch (service.sourceType) {\n\t\t\tcase \"github\":\n\t\t\t\treturn {\n\t\t\t\t\trepo: service.repository,\n\t\t\t\t\tbranch: service.branch,\n\t\t\t\t\towner: service.owner,\n\t\t\t\t};\n\t\t\tcase \"gitlab\":\n\t\t\t\treturn {\n\t\t\t\t\trepo: service.gitlabRepository,\n\t\t\t\t\tbranch: service.gitlabBranch,\n\t\t\t\t\towner: service.gitlabOwner,\n\t\t\t\t};\n\t\t\tcase \"bitbucket\":\n\t\t\t\treturn {\n\t\t\t\t\trepo: service.bitbucketRepository,\n\t\t\t\t\tbranch: service.bitbucketBranch,\n\t\t\t\t\towner: service.bitbucketOwner,\n\t\t\t\t};\n\t\t\tcase \"gitea\":\n\t\t\t\treturn {\n\t\t\t\t\trepo: service.giteaRepository,\n\t\t\t\t\tbranch: service.giteaBranch,\n\t\t\t\t\towner: service.giteaOwner,\n\t\t\t\t};\n\t\t\tcase \"git\":\n\t\t\t\treturn {\n\t\t\t\t\trepo: service.customGitUrl,\n\t\t\t\t\tbranch: service.customGitBranch,\n\t\t\t\t\towner: null,\n\t\t\t\t};\n\t\t\tdefault:\n\t\t\t\treturn { repo: null, branch: null, owner: null };\n\t\t}\n\t};\n\n\tconst { repo, branch, owner } = getRepositoryInfo();\n\n\treturn (\n\t\t<div className=\"space-y-4\">\n\t\t\t<Alert>\n\t\t\t\t<AlertCircle className=\"h-4 w-4\" />\n\t\t\t\t<AlertDescription>\n\t\t\t\t\tThis application is connected to a {service.sourceType} repository\n\t\t\t\t\tthrough a git provider that you don't have access to. You can see\n\t\t\t\t\tbasic repository information below, but cannot modify the\n\t\t\t\t\tconfiguration.\n\t\t\t\t</AlertDescription>\n\t\t\t</Alert>\n\n\t\t\t<Card className=\"border-dashed border-2 border-muted-foreground/20 bg-transparent\">\n\t\t\t\t<CardHeader>\n\t\t\t\t\t<CardTitle className=\"flex items-center gap-2\">\n\t\t\t\t\t\t{getProviderIcon(service.sourceType)}\n\t\t\t\t\t\t<span className=\"capitalize text-sm font-medium\">\n\t\t\t\t\t\t\t{service.sourceType} Repository\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</CardTitle>\n\t\t\t\t</CardHeader>\n\t\t\t\t<CardContent className=\"space-y-3\">\n\t\t\t\t\t{owner && (\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<span className=\"text-sm font-medium text-muted-foreground\">\n\t\t\t\t\t\t\t\tOwner:\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<p className=\"text-sm\">{owner}</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t{repo && (\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<span className=\"text-sm font-medium text-muted-foreground\">\n\t\t\t\t\t\t\t\tRepository:\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<p className=\"text-sm\">{repo}</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t{branch && (\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<span className=\"text-sm font-medium text-muted-foreground\">\n\t\t\t\t\t\t\t\tBranch:\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<p className=\"text-sm\">{branch}</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\n\t\t\t\t\t<div className=\"pt-4 border-t\">\n\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\ttitle=\"Disconnect Repository\"\n\t\t\t\t\t\t\tdescription=\"Are you sure you want to disconnect this repository?\"\n\t\t\t\t\t\t\ttype=\"default\"\n\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\tonDisconnect();\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Button variant=\"secondary\" className=\"w-full\">\n\t\t\t\t\t\t\t\t<Unlink className=\"size-4 mr-2\" />\n\t\t\t\t\t\t\t\tDisconnect Repository\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t<p className=\"text-xs text-muted-foreground mt-2\">\n\t\t\t\t\t\t\tDisconnecting will allow you to configure a new repository with\n\t\t\t\t\t\t\tyour own git providers.\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t</CardContent>\n\t\t\t</Card>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/general/show.tsx",
    "content": "import * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport {\n\tBan,\n\tCheckCircle2,\n\tHammer,\n\tRefreshCcw,\n\tRocket,\n\tTerminal,\n} from \"lucide-react\";\nimport { useRouter } from \"next/router\";\nimport { toast } from \"sonner\";\nimport { ShowBuildChooseForm } from \"@/components/dashboard/application/build/show\";\nimport { ShowProviderForm } from \"@/components/dashboard/application/general/generic/show\";\nimport { DialogAction } from \"@/components/shared/dialog-action\";\nimport { Button } from \"@/components/ui/button\";\nimport { Card, CardContent, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport { Switch } from \"@/components/ui/switch\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { api } from \"@/utils/api\";\nimport { DockerTerminalModal } from \"../../settings/web-server/docker-terminal-modal\";\n\ninterface Props {\n\tapplicationId: string;\n}\n\nexport const ShowGeneralApplication = ({ applicationId }: Props) => {\n\tconst router = useRouter();\n\tconst { data: permissions } = api.user.getPermissions.useQuery();\n\tconst canDeploy = permissions?.deployment.create ?? false;\n\tconst canUpdateService = permissions?.service.create ?? false;\n\tconst { data, refetch } = api.application.one.useQuery(\n\t\t{\n\t\t\tapplicationId,\n\t\t},\n\t\t{ enabled: !!applicationId },\n\t);\n\tconst { mutateAsync: update } = api.application.update.useMutation();\n\tconst { mutateAsync: start, isPending: isStarting } =\n\t\tapi.application.start.useMutation();\n\tconst { mutateAsync: stop, isPending: isStopping } =\n\t\tapi.application.stop.useMutation();\n\n\tconst { mutateAsync: deploy } = api.application.deploy.useMutation();\n\n\tconst { mutateAsync: reload, isPending: isReloading } =\n\t\tapi.application.reload.useMutation();\n\n\tconst { mutateAsync: redeploy } = api.application.redeploy.useMutation();\n\n\treturn (\n\t\t<>\n\t\t\t<Card className=\"bg-background\">\n\t\t\t\t<CardHeader>\n\t\t\t\t\t<CardTitle className=\"text-xl\">Deploy Settings</CardTitle>\n\t\t\t\t</CardHeader>\n\t\t\t\t<CardContent className=\"flex flex-row gap-4 flex-wrap\">\n\t\t\t\t\t<TooltipProvider delayDuration={0} disableHoverableContent={false}>\n\t\t\t\t\t\t{canDeploy && (\n\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\ttitle=\"Deploy Application\"\n\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to deploy this application?\"\n\t\t\t\t\t\t\t\ttype=\"default\"\n\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\tawait deploy({\n\t\t\t\t\t\t\t\t\t\tapplicationId: applicationId,\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Application deployed successfully\");\n\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t\trouter.push(\n\t\t\t\t\t\t\t\t\t\t\t\t`/dashboard/project/${data?.environment.projectId}/environment/${data?.environmentId}/services/application/${applicationId}?tab=deployments`,\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error deploying application\");\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tvariant=\"default\"\n\t\t\t\t\t\t\t\t\tisLoading={data?.applicationStatus === \"running\"}\n\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1.5 group focus-visible:ring-2 focus-visible:ring-offset-2\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t<Rocket className=\"size-4 mr-1\" />\n\t\t\t\t\t\t\t\t\t\t\t\tDeploy\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t<TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t\t<TooltipContent sideOffset={5} className=\"z-[60]\">\n\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\tDownloads the source code and performs a complete\n\t\t\t\t\t\t\t\t\t\t\t\t\tbuild\n\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t</TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{canDeploy && (\n\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\ttitle=\"Reload Application\"\n\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to reload this application?\"\n\t\t\t\t\t\t\t\ttype=\"default\"\n\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\tawait reload({\n\t\t\t\t\t\t\t\t\t\tapplicationId: applicationId,\n\t\t\t\t\t\t\t\t\t\tappName: data?.appName || \"\",\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Application reloaded successfully\");\n\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error reloading application\");\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\tisLoading={isReloading}\n\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1.5 group focus-visible:ring-2 focus-visible:ring-offset-2\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t<RefreshCcw className=\"size-4 mr-1\" />\n\t\t\t\t\t\t\t\t\t\t\t\tReload\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t<TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t\t<TooltipContent sideOffset={5} className=\"z-[60]\">\n\t\t\t\t\t\t\t\t\t\t\t\t<p>Reload the application without rebuilding it</p>\n\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t</TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{canDeploy && (\n\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\ttitle=\"Rebuild Application\"\n\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to rebuild this application?\"\n\t\t\t\t\t\t\t\ttype=\"default\"\n\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\tawait redeploy({\n\t\t\t\t\t\t\t\t\t\tapplicationId: applicationId,\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Application rebuilt successfully\");\n\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error rebuilding application\");\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\tisLoading={data?.applicationStatus === \"running\"}\n\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1.5 group focus-visible:ring-2 focus-visible:ring-offset-2\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t<Hammer className=\"size-4 mr-1\" />\n\t\t\t\t\t\t\t\t\t\t\t\tRebuild\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t<TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t\t<TooltipContent sideOffset={5} className=\"z-[60]\">\n\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\tOnly rebuilds the application without downloading new\n\t\t\t\t\t\t\t\t\t\t\t\t\tcode\n\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t</TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{canDeploy && data?.applicationStatus === \"idle\" ? (\n\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\ttitle=\"Start Application\"\n\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to start this application?\"\n\t\t\t\t\t\t\t\ttype=\"default\"\n\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\tawait start({\n\t\t\t\t\t\t\t\t\t\tapplicationId: applicationId,\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Application started successfully\");\n\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error starting application\");\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\tisLoading={isStarting}\n\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1.5 group focus-visible:ring-2 focus-visible:ring-offset-2\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t<CheckCircle2 className=\"size-4 mr-1\" />\n\t\t\t\t\t\t\t\t\t\t\t\tStart\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t<TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t\t<TooltipContent sideOffset={5} className=\"z-[60]\">\n\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\tStart the application (requires a previous successful\n\t\t\t\t\t\t\t\t\t\t\t\t\tbuild)\n\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t</TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t) : canDeploy ? (\n\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\ttitle=\"Stop Application\"\n\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to stop this application?\"\n\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\tawait stop({\n\t\t\t\t\t\t\t\t\t\tapplicationId: applicationId,\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Application stopped successfully\");\n\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error stopping application\");\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tvariant=\"destructive\"\n\t\t\t\t\t\t\t\t\tisLoading={isStopping}\n\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1.5 group focus-visible:ring-2 focus-visible:ring-offset-2\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t<Ban className=\"size-4 mr-1\" />\n\t\t\t\t\t\t\t\t\t\t\t\tStop\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t<TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t\t<TooltipContent sideOffset={5} className=\"z-[60]\">\n\t\t\t\t\t\t\t\t\t\t\t\t<p>Stop the currently running application</p>\n\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t</TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t) : null}\n\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t<DockerTerminalModal\n\t\t\t\t\t\tappName={data?.appName || \"\"}\n\t\t\t\t\t\tserverId={data?.serverId || \"\"}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\tclassName=\"flex items-center gap-1.5 focus-visible:ring-2 focus-visible:ring-offset-2\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Terminal className=\"size-4 mr-1\" />\n\t\t\t\t\t\t\tOpen Terminal\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</DockerTerminalModal>\n\t\t\t\t\t{canUpdateService && (\n\t\t\t\t\t\t<div className=\"flex flex-row items-center gap-2 rounded-md px-4 py-2 border\">\n\t\t\t\t\t\t\t<span className=\"text-sm font-medium\">Autodeploy</span>\n\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\taria-label=\"Toggle autodeploy\"\n\t\t\t\t\t\t\t\tchecked={data?.autoDeploy || false}\n\t\t\t\t\t\t\t\tonCheckedChange={async (enabled) => {\n\t\t\t\t\t\t\t\t\tawait update({\n\t\t\t\t\t\t\t\t\t\tapplicationId,\n\t\t\t\t\t\t\t\t\t\tautoDeploy: enabled,\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t.then(async () => {\n\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Auto Deploy Updated\");\n\t\t\t\t\t\t\t\t\t\t\tawait refetch();\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error updating Auto Deploy\");\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tclassName=\"flex flex-row gap-2 items-center data-[state=checked]:bg-primary\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{canUpdateService && (\n\t\t\t\t\t\t<div className=\"flex flex-row items-center gap-2 rounded-md px-4 py-2 border\">\n\t\t\t\t\t\t\t<span className=\"text-sm font-medium\">Clean Cache</span>\n\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\taria-label=\"Toggle clean cache\"\n\t\t\t\t\t\t\t\tchecked={data?.cleanCache || false}\n\t\t\t\t\t\t\t\tonCheckedChange={async (enabled) => {\n\t\t\t\t\t\t\t\t\tawait update({\n\t\t\t\t\t\t\t\t\t\tapplicationId,\n\t\t\t\t\t\t\t\t\t\tcleanCache: enabled,\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t.then(async () => {\n\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Clean Cache Updated\");\n\t\t\t\t\t\t\t\t\t\t\tawait refetch();\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error updating Clean Cache\");\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tclassName=\"flex flex-row gap-2 items-center data-[state=checked]:bg-primary\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</CardContent>\n\t\t\t</Card>\n\t\t\t<ShowProviderForm applicationId={applicationId} />\n\t\t\t<ShowBuildChooseForm applicationId={applicationId} />\n\t\t</>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/logs/show.tsx",
    "content": "import { Loader2 } from \"lucide-react\";\nimport dynamic from \"next/dynamic\";\nimport { useEffect, useState } from \"react\";\nimport { Badge } from \"@/components/ui/badge\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport { Label } from \"@/components/ui/label\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectGroup,\n\tSelectItem,\n\tSelectLabel,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { Switch } from \"@/components/ui/switch\";\nimport { api } from \"@/utils/api\";\nexport const DockerLogs = dynamic(\n\t() =>\n\t\timport(\"@/components/dashboard/docker/logs/docker-logs-id\").then(\n\t\t\t(e) => e.DockerLogsId,\n\t\t),\n\t{\n\t\tssr: false,\n\t},\n);\n\nexport const badgeStateColor = (state: string) => {\n\tswitch (state) {\n\t\tcase \"running\":\n\t\tcase \"ready\":\n\t\t\treturn \"green\";\n\t\tcase \"exited\":\n\t\tcase \"shutdown\":\n\t\t\treturn \"red\";\n\t\tcase \"accepted\":\n\t\tcase \"created\":\n\t\t\treturn \"blue\";\n\t\tdefault:\n\t\t\treturn \"default\";\n\t}\n};\n\ninterface Props {\n\tappName: string;\n\tserverId?: string;\n}\n\nexport const ShowDockerLogs = ({ appName, serverId }: Props) => {\n\tconst [containerId, setContainerId] = useState<string | undefined>();\n\tconst [option, setOption] = useState<\"swarm\" | \"native\">(\"native\");\n\n\tconst { data: services, isPending: servicesLoading } =\n\t\tapi.docker.getServiceContainersByAppName.useQuery(\n\t\t\t{\n\t\t\t\tappName,\n\t\t\t\tserverId,\n\t\t\t},\n\t\t\t{\n\t\t\t\tenabled: !!appName && option === \"swarm\",\n\t\t\t},\n\t\t);\n\n\tconst { data: containers, isPending: containersLoading } =\n\t\tapi.docker.getContainersByAppNameMatch.useQuery(\n\t\t\t{\n\t\t\t\tappName,\n\t\t\t\tserverId,\n\t\t\t},\n\t\t\t{\n\t\t\t\tenabled: !!appName && option === \"native\",\n\t\t\t},\n\t\t);\n\n\tuseEffect(() => {\n\t\tif (option === \"native\") {\n\t\t\tif (containers && containers?.length > 0) {\n\t\t\t\tsetContainerId(containers[0]?.containerId);\n\t\t\t}\n\t\t} else {\n\t\t\tif (services && services?.length > 0) {\n\t\t\t\tsetContainerId(services[0]?.containerId);\n\t\t\t}\n\t\t}\n\t}, [option, services, containers]);\n\n\tconst isLoading = option === \"native\" ? containersLoading : servicesLoading;\n\tconst containersLenght =\n\t\toption === \"native\" ? containers?.length : services?.length;\n\n\treturn (\n\t\t<Card className=\"bg-background\">\n\t\t\t<CardHeader>\n\t\t\t\t<CardTitle className=\"text-xl\">Logs</CardTitle>\n\t\t\t\t<CardDescription>\n\t\t\t\t\tWatch the logs of the application in real time\n\t\t\t\t</CardDescription>\n\t\t\t</CardHeader>\n\n\t\t\t<CardContent className=\"flex flex-col gap-4\">\n\t\t\t\t<div className=\"flex flex-row justify-between items-center gap-2\">\n\t\t\t\t\t<Label>Select a container to view logs</Label>\n\t\t\t\t\t<div className=\"flex flex-row gap-2 items-center\">\n\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t{option === \"native\" ? \"Native\" : \"Swarm\"}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\tchecked={option === \"native\"}\n\t\t\t\t\t\t\tonCheckedChange={(checked) => {\n\t\t\t\t\t\t\t\tsetOption(checked ? \"native\" : \"swarm\");\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<Select onValueChange={setContainerId} value={containerId}>\n\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t{isLoading ? (\n\t\t\t\t\t\t\t<div className=\"flex flex-row gap-2 items-center justify-center text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t<span>Loading...</span>\n\t\t\t\t\t\t\t\t<Loader2 className=\"animate-spin size-4\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a container\" />\n\t\t\t\t\t\t)}\n\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t<SelectGroup>\n\t\t\t\t\t\t\t{option === \"native\" ? (\n\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t{containers?.map((container) => (\n\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\tkey={container.containerId}\n\t\t\t\t\t\t\t\t\t\t\tvalue={container.containerId}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{container.name} ({container.containerId}){\" \"}\n\t\t\t\t\t\t\t\t\t\t\t<Badge variant={badgeStateColor(container.state)}>\n\t\t\t\t\t\t\t\t\t\t\t\t{container.state}\n\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t{container.status ? ` ${container.status}` : \"\"}\n\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t{services?.map((container) => (\n\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\tkey={container.containerId}\n\t\t\t\t\t\t\t\t\t\t\tvalue={container.containerId}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{container.name} ({container.containerId}@{container.node}\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t<Badge variant={badgeStateColor(container.state)}>\n\t\t\t\t\t\t\t\t\t\t\t\t{container.state}\n\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t{container.currentState\n\t\t\t\t\t\t\t\t\t\t\t\t? ` ${container.currentState}`\n\t\t\t\t\t\t\t\t\t\t\t\t: \"\"}\n\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t<SelectLabel>Containers ({containersLenght})</SelectLabel>\n\t\t\t\t\t\t</SelectGroup>\n\t\t\t\t\t</SelectContent>\n\t\t\t\t</Select>\n\t\t\t\t{option === \"swarm\" &&\n\t\t\t\t\tservices?.find((c) => c.containerId === containerId)?.error && (\n\t\t\t\t\t\t<div className=\"rounded-md bg-destructive/10 border border-destructive/20 px-3 py-2 text-sm text-destructive\">\n\t\t\t\t\t\t\t<span className=\"font-medium\">Error: </span>\n\t\t\t\t\t\t\t{services?.find((c) => c.containerId === containerId)?.error}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t<DockerLogs\n\t\t\t\t\tserverId={serverId || \"\"}\n\t\t\t\t\tcontainerId={containerId || \"select-a-container\"}\n\t\t\t\t\trunType={option}\n\t\t\t\t/>\n\t\t\t</CardContent>\n\t\t</Card>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/patches/create-file-dialog.tsx",
    "content": "import { FilePlus } from \"lucide-react\";\nimport { useState } from \"react\";\nimport { CodeEditor } from \"@/components/shared/code-editor\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogClose,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport { Input } from \"@/components/ui/input\";\nimport { Label } from \"@/components/ui/label\";\n\ninterface Props {\n\tfolderPath: string;\n\tonCreate: (filename: string, content: string) => void;\n\tonOpenChange: (open: boolean) => void;\n\talwaysVisible?: boolean;\n}\n\nexport const CreateFileDialog = ({\n\tfolderPath,\n\tonCreate,\n\tonOpenChange,\n\talwaysVisible = false,\n}: Props) => {\n\tconst [filename, setFilename] = useState(\"\");\n\tconst [content, setContent] = useState(\"\");\n\n\tconst handleCreate = () => {\n\t\tif (!filename.trim()) return;\n\t\tonCreate(filename.trim(), content);\n\t\tsetFilename(\"\");\n\t\tsetContent(\"\");\n\t\tonOpenChange(false);\n\t};\n\n\treturn (\n\t\t<Dialog>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tclassName={`h-6 w-6 ${alwaysVisible ? \"\" : \"opacity-0 group-hover:opacity-100\"}`}\n\t\t\t\t\ttitle=\"Create file\"\n\t\t\t\t>\n\t\t\t\t\t<FilePlus className=\"h-3 w-3\" />\n\t\t\t\t</Button>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-2xl\">\n\t\t\t\t<form\n\t\t\t\t\tonSubmit={(e) => {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\thandleCreate();\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<DialogHeader>\n\t\t\t\t\t\t<DialogTitle>Create file</DialogTitle>\n\t\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\t\t{folderPath ? `New file in ${folderPath}/` : \"New file in root\"}\n\t\t\t\t\t\t</DialogDescription>\n\t\t\t\t\t</DialogHeader>\n\t\t\t\t\t<div className=\"space-y-4 py-4\">\n\t\t\t\t\t\t<div className=\"space-y-2\">\n\t\t\t\t\t\t\t<Label htmlFor=\"filename\">Filename</Label>\n\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\tid=\"filename\"\n\t\t\t\t\t\t\t\tplaceholder=\"e.g. .env.example\"\n\t\t\t\t\t\t\t\tvalue={filename}\n\t\t\t\t\t\t\t\tonChange={(e) => setFilename(e.target.value)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"space-y-2\">\n\t\t\t\t\t\t\t<Label>Content</Label>\n\t\t\t\t\t\t\t<div className=\"h-[200px] rounded-md border\">\n\t\t\t\t\t\t\t\t<CodeEditor\n\t\t\t\t\t\t\t\t\tvalue={content}\n\t\t\t\t\t\t\t\t\tonChange={(v) => setContent(v ?? \"\")}\n\t\t\t\t\t\t\t\t\tclassName=\"h-full\"\n\t\t\t\t\t\t\t\t\twrapperClassName=\"h-[200px]\"\n\t\t\t\t\t\t\t\t\tlineWrapping\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t<DialogClose asChild>\n\t\t\t\t\t\t\t<Button variant=\"outline\" type=\"button\">\n\t\t\t\t\t\t\t\tCancel\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</DialogClose>\n\t\t\t\t\t\t<DialogClose asChild>\n\t\t\t\t\t\t\t<Button type=\"submit\" disabled={!filename.trim()}>\n\t\t\t\t\t\t\t\tCreate\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</DialogClose>\n\t\t\t\t\t</DialogFooter>\n\t\t\t\t</form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/patches/edit-patch-dialog.tsx",
    "content": "import { Loader2, Pencil } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { toast } from \"sonner\";\nimport { CodeEditor } from \"@/components/shared/code-editor\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogClose,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport { api } from \"@/utils/api\";\n\ninterface Props {\n\tpatchId: string;\n\tentityId: string;\n\ttype: \"application\" | \"compose\";\n\tonSuccess?: () => void;\n}\n\nexport const EditPatchDialog = ({\n\tpatchId,\n\tentityId,\n\ttype,\n\tonSuccess,\n}: Props) => {\n\tconst { data: patch, isPending: isPatchLoading } = api.patch.one.useQuery(\n\t\t{ patchId },\n\t\t{ enabled: !!patchId },\n\t);\n\tconst [content, setContent] = useState(\"\");\n\n\tuseEffect(() => {\n\t\tif (patch) {\n\t\t\tsetContent(patch.content);\n\t\t}\n\t}, [patch]);\n\n\tconst utils = api.useUtils();\n\tconst updatePatch = api.patch.update.useMutation();\n\n\tconst handleSave = () => {\n\t\tupdatePatch\n\t\t\t.mutateAsync({ patchId, content })\n\t\t\t.then(() => {\n\t\t\t\ttoast.success(\"Patch saved\");\n\t\t\t\tutils.patch.byEntityId.invalidate({ id: entityId, type });\n\t\t\t\tonSuccess?.();\n\t\t\t})\n\t\t\t.catch((err) => {\n\t\t\t\ttoast.error(err.message);\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<Dialog>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t<Button variant=\"ghost\" size=\"icon\" title=\"Edit patch\">\n\t\t\t\t\t<Pencil className=\"h-4 w-4\" />\n\t\t\t\t</Button>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-4xl max-h-[85vh] flex flex-col p-0\">\n\t\t\t\t<DialogHeader className=\"px-6 pt-6 pb-4\">\n\t\t\t\t\t<DialogTitle>Edit Patch</DialogTitle>\n\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\t{patch ? `Editing: ${patch.filePath}` : \"Loading patch...\"}\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t{isPatchLoading ? (\n\t\t\t\t\t<div className=\"flex flex-1 items-center justify-center px-6 py-12\">\n\t\t\t\t\t\t<Loader2 className=\"h-6 w-6 animate-spin text-muted-foreground\" />\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<div className=\"flex-1 min-h-0 px-6 overflow-hidden flex flex-col\">\n\t\t\t\t\t\t<CodeEditor\n\t\t\t\t\t\t\tvalue={content}\n\t\t\t\t\t\t\tonChange={(value) => setContent(value ?? \"\")}\n\t\t\t\t\t\t\tclassName=\"h-[400px] w-full\"\n\t\t\t\t\t\t\twrapperClassName=\"h-[400px]\"\n\t\t\t\t\t\t\tlineWrapping\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t<DialogFooter className=\"px-6 \">\n\t\t\t\t\t<DialogClose asChild>\n\t\t\t\t\t\t<Button variant=\"outline\">Cancel</Button>\n\t\t\t\t\t</DialogClose>\n\t\t\t\t\t<Button onClick={handleSave} isLoading={updatePatch.isPending}>\n\t\t\t\t\t\t{updatePatch.isPending && (\n\t\t\t\t\t\t\t<Loader2 className=\"mr-2 h-4 w-4 animate-spin\" />\n\t\t\t\t\t\t)}\n\t\t\t\t\t\tSave\n\t\t\t\t\t</Button>\n\t\t\t\t</DialogFooter>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/patches/index.ts",
    "content": "export * from \"./show-patches\";\nexport * from \"./patch-editor\";\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/patches/patch-editor.tsx",
    "content": "import {\n\tArrowLeft,\n\tChevronRight,\n\tFile,\n\tFolder,\n\tLoader2,\n\tSave,\n\tTrash2,\n} from \"lucide-react\";\nimport { useCallback, useEffect, useState } from \"react\";\nimport { toast } from \"sonner\";\nimport { CodeEditor } from \"@/components/shared/code-editor\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport { ScrollArea } from \"@/components/ui/scroll-area\";\nimport { api } from \"@/utils/api\";\nimport { CreateFileDialog } from \"./create-file-dialog\";\n\ninterface Props {\n\tid: string;\n\ttype: \"application\" | \"compose\";\n\trepoPath: string;\n\tonClose: () => void;\n}\n\ntype DirectoryEntry = {\n\tname: string;\n\tpath: string;\n\ttype: \"file\" | \"directory\";\n\tchildren?: DirectoryEntry[];\n};\n\nexport const PatchEditor = ({ id, type, repoPath, onClose }: Props) => {\n\tconst [selectedFile, setSelectedFile] = useState<string | null>(null);\n\tconst [fileContent, setFileContent] = useState<string>(\"\");\n\tconst [createFolderPath, setCreateFolderPath] = useState<string | null>(null);\n\tconst [expandedFolders, setExpandedFolders] = useState<Set<string>>(\n\t\tnew Set(),\n\t);\n\n\tconst utils = api.useUtils();\n\tconst { data: directories, isPending: isDirLoading } =\n\t\tapi.patch.readRepoDirectories.useQuery(\n\t\t\t{ id: id, type, repoPath },\n\t\t\t{ enabled: !!repoPath },\n\t\t);\n\n\tconst { data: patches } = api.patch.byEntityId.useQuery(\n\t\t{ id, type },\n\t\t{ enabled: !!id },\n\t);\n\n\tconst { mutateAsync: saveAsPatch, isPending: isSavingPatch } =\n\t\tapi.patch.saveFileAsPatch.useMutation();\n\n\tconst { mutateAsync: markForDeletion, isPending: isMarkingDeletion } =\n\t\tapi.patch.markFileForDeletion.useMutation();\n\n\tconst updatePatch = api.patch.update.useMutation();\n\n\tconst { data: fileData, isFetching: isFileLoading } =\n\t\tapi.patch.readRepoFile.useQuery(\n\t\t\t{\n\t\t\t\tid,\n\t\t\t\ttype,\n\t\t\t\tfilePath: selectedFile || \"\",\n\t\t\t},\n\t\t\t{\n\t\t\t\tenabled: !!selectedFile,\n\t\t\t},\n\t\t);\n\n\tuseEffect(() => {\n\t\tif (fileData !== undefined) {\n\t\t\tsetFileContent(fileData);\n\t\t}\n\t}, [fileData]);\n\n\tconst handleFileSelect = (filePath: string) => {\n\t\tsetSelectedFile(filePath);\n\t};\n\n\tconst toggleFolder = (path: string) => {\n\t\tsetExpandedFolders((prev) => {\n\t\t\tconst next = new Set(prev);\n\t\t\tif (next.has(path)) {\n\t\t\t\tnext.delete(path);\n\t\t\t} else {\n\t\t\t\tnext.add(path);\n\t\t\t}\n\t\t\treturn next;\n\t\t});\n\t};\n\n\tconst handleSave = () => {\n\t\tif (!selectedFile) return;\n\t\tsaveAsPatch({\n\t\t\tid,\n\t\t\ttype,\n\t\t\tfilePath: selectedFile,\n\t\t\tcontent: fileContent,\n\t\t\tpatchType: \"update\",\n\t\t})\n\t\t\t.then(() => {\n\t\t\t\ttoast.success(\"Patch saved\");\n\t\t\t\tutils.patch.byEntityId.invalidate({ id, type });\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Failed to save patch\");\n\t\t\t});\n\t};\n\n\tconst handleMarkForDeletion = () => {\n\t\tif (!selectedFile) return;\n\t\tmarkForDeletion({ id, type, filePath: selectedFile })\n\t\t\t.then(() => {\n\t\t\t\ttoast.success(\"File marked for deletion\");\n\t\t\t\tutils.patch.byEntityId.invalidate({ id, type });\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Failed to mark file for deletion\");\n\t\t\t});\n\t};\n\n\tconst handleCreateFile = useCallback(\n\t\t(folderPath: string, filename: string, content: string) => {\n\t\t\tconst filePath = folderPath ? `${folderPath}/${filename}` : filename;\n\t\t\tsaveAsPatch({\n\t\t\t\tid,\n\t\t\t\ttype,\n\t\t\t\tfilePath,\n\t\t\t\tcontent,\n\t\t\t\tpatchType: \"create\",\n\t\t\t})\n\t\t\t\t.then(() => {\n\t\t\t\t\ttoast.success(\"File created\");\n\t\t\t\t\tutils.patch.byEntityId.invalidate({ id, type });\n\t\t\t\t})\n\t\t\t\t.catch(() => {\n\t\t\t\t\ttoast.error(\"Failed to create file\");\n\t\t\t\t});\n\t\t},\n\t\t[id, type, saveAsPatch, utils],\n\t);\n\n\tconst selectedFilePatch = patches?.find(\n\t\t(p) => p.filePath === selectedFile && p.type === \"delete\",\n\t);\n\n\tconst handleUnmarkDeletion = () => {\n\t\tif (!selectedFilePatch) return;\n\t\tupdatePatch\n\t\t\t.mutateAsync({\n\t\t\t\tpatchId: selectedFilePatch.patchId,\n\t\t\t\ttype: \"update\",\n\t\t\t\tcontent: fileData || \"\",\n\t\t\t})\n\t\t\t.then(() => {\n\t\t\t\ttoast.success(\"Deletion unmarked\");\n\t\t\t\tutils.patch.byEntityId.invalidate({ id, type });\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Failed to unmark deletion\");\n\t\t\t});\n\t};\n\n\tconst hasChanges = fileData !== undefined && fileContent !== fileData;\n\n\tconst renderTree = useCallback(\n\t\t(entries: DirectoryEntry[], depth = 0) => {\n\t\t\treturn entries\n\t\t\t\t.sort((a, b) => {\n\t\t\t\t\t// Directories first, then alphabetically\n\t\t\t\t\tif (a.type !== b.type) {\n\t\t\t\t\t\treturn a.type === \"directory\" ? -1 : 1;\n\t\t\t\t\t}\n\t\t\t\t\treturn a.name.localeCompare(b.name);\n\t\t\t\t})\n\t\t\t\t.map((entry) => {\n\t\t\t\t\tconst isExpanded = expandedFolders.has(entry.path);\n\t\t\t\t\tconst isSelected = selectedFile === entry.path;\n\n\t\t\t\t\tif (entry.type === \"directory\") {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<div key={entry.path}>\n\t\t\t\t\t\t\t\t<div className=\"group flex items-center\">\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\tonClick={() => toggleFolder(entry.path)}\n\t\t\t\t\t\t\t\t\t\tclassName={\n\t\t\t\t\t\t\t\t\t\t\t\"flex-1 flex items-center gap-2 px-2 py-1.5 text-sm hover:bg-muted/50 rounded-md transition-colors text-left min-w-0\"\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tstyle={{ paddingLeft: `${depth * 12 + 8}px` }}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<ChevronRight\n\t\t\t\t\t\t\t\t\t\t\tclassName={`h-4 w-4 shrink-0 transition-transform ${\n\t\t\t\t\t\t\t\t\t\t\t\tisExpanded ? \"rotate-90\" : \"\"\n\t\t\t\t\t\t\t\t\t\t\t}`}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<Folder className=\"h-4 w-4 shrink-0 text-blue-500\" />\n\t\t\t\t\t\t\t\t\t\t<span className=\"truncate\">{entry.name}</span>\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t<CreateFileDialog\n\t\t\t\t\t\t\t\t\t\tfolderPath={entry.path}\n\t\t\t\t\t\t\t\t\t\tonCreate={(filename, content) =>\n\t\t\t\t\t\t\t\t\t\t\thandleCreateFile(entry.path, filename, content)\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tonOpenChange={(open) =>\n\t\t\t\t\t\t\t\t\t\t\tsetCreateFolderPath(open ? entry.path : null)\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t{isExpanded && entry.children && (\n\t\t\t\t\t\t\t\t\t<div>{renderTree(entry.children, depth + 1)}</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tconst isMarkedForDeletion = patches?.some(\n\t\t\t\t\t\t(p) => p.filePath === entry.path && p.type === \"delete\",\n\t\t\t\t\t);\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\tkey={entry.path}\n\t\t\t\t\t\t\tonClick={() => handleFileSelect(entry.path)}\n\t\t\t\t\t\t\tclassName={`w-full flex items-center gap-2 px-2 py-1.5 text-sm hover:bg-muted/50 rounded-md transition-colors ${\n\t\t\t\t\t\t\t\tisSelected ? \"bg-muted\" : \"\"\n\t\t\t\t\t\t\t} ${isMarkedForDeletion ? \"text-destructive\" : \"\"}`}\n\t\t\t\t\t\t\tstyle={{ paddingLeft: `${depth * 12 + 28}px` }}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<File className=\"h-4 w-4 shrink-0 text-muted-foreground\" />\n\t\t\t\t\t\t\t<span className=\"truncate\">{entry.name}</span>\n\t\t\t\t\t\t\t{isMarkedForDeletion && (\n\t\t\t\t\t\t\t\t<Trash2 className=\"h-3 w-3 shrink-0 text-destructive ml-auto\" />\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</button>\n\t\t\t\t\t);\n\t\t\t\t});\n\t\t},\n\t\t[expandedFolders, selectedFile, patches, handleCreateFile],\n\t);\n\n\treturn (\n\t\t<Card className=\"bg-background overflow-hidden\">\n\t\t\t<CardHeader className=\"flex flex-row items-center justify-between pb-4\">\n\t\t\t\t<div className=\"flex items-center gap-4\">\n\t\t\t\t\t<Button variant=\"ghost\" size=\"icon\" onClick={onClose}>\n\t\t\t\t\t\t<ArrowLeft className=\"h-4 w-4\" />\n\t\t\t\t\t</Button>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<CardTitle>Edit File</CardTitle>\n\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\t{selectedFile\n\t\t\t\t\t\t\t\t? `Editing: ${selectedFile}`\n\t\t\t\t\t\t\t\t: \"Select a file from the tree to edit\"}\n\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t{selectedFile && (\n\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t{selectedFilePatch ? (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\tonClick={handleUnmarkDeletion}\n\t\t\t\t\t\t\t\tdisabled={updatePatch.isPending}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{updatePatch.isPending && (\n\t\t\t\t\t\t\t\t\t<Loader2 className=\"mr-2 h-4 w-4 animate-spin\" />\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\tUnmark deletion\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\tonClick={handleMarkForDeletion}\n\t\t\t\t\t\t\t\t\tdisabled={isMarkingDeletion}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{isMarkingDeletion && (\n\t\t\t\t\t\t\t\t\t\t<Loader2 className=\"mr-2 h-4 w-4 animate-spin\" />\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t<Trash2 className=\"mr-2 h-4 w-4\" />\n\t\t\t\t\t\t\t\t\tMark for deletion\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tonClick={handleSave}\n\t\t\t\t\t\t\t\t\tdisabled={isSavingPatch || !hasChanges}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{isSavingPatch && (\n\t\t\t\t\t\t\t\t\t\t<Loader2 className=\"mr-2 h-4 w-4 animate-spin\" />\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t<Save className=\"mr-2 h-4 w-4\" />\n\t\t\t\t\t\t\t\t\tSave Patch\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</CardHeader>\n\t\t\t<CardContent className=\"p-0\">\n\t\t\t\t<div className=\"grid grid-cols-[250px_1fr] border-t h-[600px]\">\n\t\t\t\t\t<div className=\"border-r h-full overflow-hidden\">\n\t\t\t\t\t\t<ScrollArea className=\"h-full\">\n\t\t\t\t\t\t\t<div className=\"p-2 space-y-1\">\n\t\t\t\t\t\t\t\t<div className=\"group flex items-center gap-2 px-2 py-1.5 mb-1\">\n\t\t\t\t\t\t\t\t\t<CreateFileDialog\n\t\t\t\t\t\t\t\t\t\tfolderPath=\"\"\n\t\t\t\t\t\t\t\t\t\talwaysVisible\n\t\t\t\t\t\t\t\t\t\tonCreate={(filename, content) =>\n\t\t\t\t\t\t\t\t\t\t\thandleCreateFile(\"\", filename, content)\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tonOpenChange={(open) =>\n\t\t\t\t\t\t\t\t\t\t\tsetCreateFolderPath(open ? \"\" : null)\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<span className=\"text-xs text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\tNew file in root\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t{isDirLoading ? (\n\t\t\t\t\t\t\t\t\t<div className=\"flex items-center justify-center py-8\">\n\t\t\t\t\t\t\t\t\t\t<Loader2 className=\"h-6 w-6 animate-spin\" />\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t) : directories ? (\n\t\t\t\t\t\t\t\t\trenderTree(directories)\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<div className=\"text-sm text-muted-foreground p-4\">\n\t\t\t\t\t\t\t\t\t\tNo files found\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</ScrollArea>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"h-full overflow-hidden relative\">\n\t\t\t\t\t\t{isFileLoading ? (\n\t\t\t\t\t\t\t<div className=\"flex items-center justify-center h-full\">\n\t\t\t\t\t\t\t\t<Loader2 className=\"h-6 w-6 animate-spin\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : selectedFile ? (\n\t\t\t\t\t\t\t<CodeEditor\n\t\t\t\t\t\t\t\tvalue={fileData || \"\"}\n\t\t\t\t\t\t\t\tonChange={(value) => setFileContent(value || \"\")}\n\t\t\t\t\t\t\t\tclassName=\"h-full w-full\"\n\t\t\t\t\t\t\t\twrapperClassName=\"h-full\"\n\t\t\t\t\t\t\t\tlineWrapping\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<div className=\"flex items-center justify-center h-full text-muted-foreground\">\n\t\t\t\t\t\t\t\tSelect a file to edit\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</CardContent>\n\t\t</Card>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/patches/show-patches.tsx",
    "content": "import { File, FilePlus2, Loader2, Trash2 } from \"lucide-react\";\nimport { useState } from \"react\";\nimport { toast } from \"sonner\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport { Switch } from \"@/components/ui/switch\";\nimport {\n\tTable,\n\tTableBody,\n\tTableCell,\n\tTableHead,\n\tTableHeader,\n\tTableRow,\n} from \"@/components/ui/table\";\nimport { api } from \"@/utils/api\";\nimport { EditPatchDialog } from \"./edit-patch-dialog\";\nimport { PatchEditor } from \"./patch-editor\";\n\ninterface Props {\n\tid: string;\n\ttype: \"application\" | \"compose\";\n}\n\nexport const ShowPatches = ({ id, type }: Props) => {\n\tconst [selectedFile, setSelectedFile] = useState<string | null>(null);\n\tconst [repoPath, setRepoPath] = useState<string | null>(null);\n\tconst [isLoadingRepo, setIsLoadingRepo] = useState(false);\n\n\tconst utils = api.useUtils();\n\n\tconst { data: patches, isPending: isPatchesLoading } =\n\t\tapi.patch.byEntityId.useQuery({ id, type }, { enabled: !!id });\n\n\tconst mutationMap = {\n\t\tapplication: () => api.patch.delete.useMutation(),\n\t\tcompose: () => api.patch.delete.useMutation(),\n\t};\n\n\tconst ensureRepo = api.patch.ensureRepo.useMutation();\n\n\tconst togglePatch = api.patch.toggleEnabled.useMutation();\n\n\tconst { mutateAsync } = mutationMap[type]\n\t\t? mutationMap[type]()\n\t\t: api.patch.delete.useMutation();\n\n\tconst handleCloseEditor = () => {\n\t\tsetSelectedFile(null);\n\t\tsetRepoPath(null);\n\t};\n\n\tif (repoPath) {\n\t\treturn (\n\t\t\t<PatchEditor\n\t\t\t\tid={id}\n\t\t\t\ttype={type}\n\t\t\t\trepoPath={repoPath || \"\"}\n\t\t\t\tonClose={handleCloseEditor}\n\t\t\t/>\n\t\t);\n\t}\n\n\tconst handleOpenEditor = async () => {\n\t\tsetIsLoadingRepo(true);\n\t\tawait ensureRepo\n\t\t\t.mutateAsync({ id, type })\n\t\t\t.then((result) => {\n\t\t\t\tsetRepoPath(result);\n\t\t\t})\n\t\t\t.catch((err) => {\n\t\t\t\ttoast.error(err.message);\n\t\t\t})\n\t\t\t.finally(() => {\n\t\t\t\tsetIsLoadingRepo(false);\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<Card className=\"bg-background\">\n\t\t\t<CardHeader className=\"flex flex-row items-center justify-between\">\n\t\t\t\t<div>\n\t\t\t\t\t<CardTitle>Patches</CardTitle>\n\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\tApply code patches to your repository during build. Patches are\n\t\t\t\t\t\tapplied after cloning the repository and before building.\n\t\t\t\t\t</CardDescription>\n\t\t\t\t</div>\n\t\t\t\t{patches && patches?.length > 0 && (\n\t\t\t\t\t<Button onClick={handleOpenEditor} disabled={isLoadingRepo}>\n\t\t\t\t\t\t{isLoadingRepo && <Loader2 className=\"mr-2 h-4 w-4 animate-spin\" />}\n\t\t\t\t\t\t<FilePlus2 className=\"mr-2 h-4 w-4\" />\n\t\t\t\t\t\tCreate Patch\n\t\t\t\t\t</Button>\n\t\t\t\t)}\n\t\t\t</CardHeader>\n\t\t\t<CardContent>\n\t\t\t\t{isPatchesLoading ? (\n\t\t\t\t\t<div className=\"flex items-center justify-center py-8\">\n\t\t\t\t\t\t<Loader2 className=\"h-6 w-6 animate-spin\" />\n\t\t\t\t\t</div>\n\t\t\t\t) : patches?.length === 0 ? (\n\t\t\t\t\t<div className=\"flex min-h-[40vh] w-full flex-col items-center justify-center gap-4 rounded-lg border border-dashed p-8\">\n\t\t\t\t\t\t<div className=\"rounded-full bg-muted p-4\">\n\t\t\t\t\t\t\t<FilePlus2 className=\"h-10 w-10 text-muted-foreground\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"space-y-1 text-center\">\n\t\t\t\t\t\t\t<p className=\"text-sm font-medium\">No patches yet</p>\n\t\t\t\t\t\t\t<p className=\"max-w-sm text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\tAdd file patches to modify your repo before each build—configs,\n\t\t\t\t\t\t\t\tenv, or code. Create your first patch to get started.\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<Button onClick={handleOpenEditor} disabled={isLoadingRepo}>\n\t\t\t\t\t\t\t{isLoadingRepo && (\n\t\t\t\t\t\t\t\t<Loader2 className=\"mr-2 h-4 w-4 animate-spin\" />\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<FilePlus2 className=\"mr-2 h-4 w-4\" />\n\t\t\t\t\t\t\tCreate Patch\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<Table>\n\t\t\t\t\t\t<TableHeader>\n\t\t\t\t\t\t\t<TableRow>\n\t\t\t\t\t\t\t\t<TableHead>File Path</TableHead>\n\t\t\t\t\t\t\t\t<TableHead className=\"w-[80px]\">Type</TableHead>\n\t\t\t\t\t\t\t\t<TableHead className=\"w-[100px]\">Enabled</TableHead>\n\t\t\t\t\t\t\t\t<TableHead className=\"w-[100px]\">Actions</TableHead>\n\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t</TableHeader>\n\t\t\t\t\t\t<TableBody>\n\t\t\t\t\t\t\t{patches?.map((patch) => (\n\t\t\t\t\t\t\t\t<TableRow key={patch.patchId}>\n\t\t\t\t\t\t\t\t\t<TableCell className=\"font-mono text-sm\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t<File className=\"h-4 w-4 text-muted-foreground shrink-0\" />\n\t\t\t\t\t\t\t\t\t\t\t{patch.filePath}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t\t<TableCell>\n\t\t\t\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\t\t\t\tpatch.type === \"delete\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t? \"destructive\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t: patch.type === \"create\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"default\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"font-normal\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{patch.type}\n\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t\t<TableCell>\n\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\tchecked={patch.enabled}\n\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={(checked) => {\n\t\t\t\t\t\t\t\t\t\t\t\ttogglePatch\n\t\t\t\t\t\t\t\t\t\t\t\t\t.mutateAsync({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpatchId: patch.patchId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tenabled: checked,\n\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Patch updated\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tutils.patch.byEntityId.invalidate({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tid,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t.catch((err) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(err.message);\n\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t.finally(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetIsLoadingRepo(false);\n\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t\t<TableCell>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t{(patch.type === \"update\" || patch.type === \"create\") && (\n\t\t\t\t\t\t\t\t\t\t\t\t<EditPatchDialog\n\t\t\t\t\t\t\t\t\t\t\t\t\tpatchId={patch.patchId}\n\t\t\t\t\t\t\t\t\t\t\t\t\tentityId={id}\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype={type}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tmutateAsync({ patchId: patch.patchId })\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Patch deleted\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tutils.patch.byEntityId.invalidate({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tid,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.catch((err) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(err.message);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"Delete patch\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<Trash2 className=\"h-4 w-4 text-destructive\" />\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</TableBody>\n\t\t\t\t\t</Table>\n\t\t\t\t)}\n\t\t\t</CardContent>\n\t\t</Card>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/preview-deployments/add-preview-domain.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { Dices } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport type z from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input, NumberInput } from \"@/components/ui/input\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { Switch } from \"@/components/ui/switch\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { domain } from \"@/server/db/validations/domain\";\nimport { api } from \"@/utils/api\";\n\ntype Domain = z.infer<typeof domain>;\n\ninterface Props {\n\tpreviewDeploymentId: string;\n\tdomainId?: string;\n\tchildren: React.ReactNode;\n}\n\nexport const AddPreviewDomain = ({\n\tpreviewDeploymentId,\n\tdomainId = \"\",\n\tchildren,\n}: Props) => {\n\tconst [isOpen, setIsOpen] = useState(false);\n\tconst utils = api.useUtils();\n\tconst { data, refetch } = api.domain.one.useQuery(\n\t\t{\n\t\t\tdomainId,\n\t\t},\n\t\t{\n\t\t\tenabled: !!domainId,\n\t\t},\n\t);\n\n\tconst { data: previewDeployment } = api.previewDeployment.one.useQuery(\n\t\t{\n\t\t\tpreviewDeploymentId,\n\t\t},\n\t\t{\n\t\t\tenabled: !!previewDeploymentId,\n\t\t},\n\t);\n\n\tconst { mutateAsync, isError, error, isPending } = domainId\n\t\t? api.domain.update.useMutation()\n\t\t: api.domain.create.useMutation();\n\n\tconst { mutateAsync: generateDomain, isPending: isLoadingGenerate } =\n\t\tapi.domain.generateDomain.useMutation();\n\n\tconst form = useForm<Domain>({\n\t\tresolver: zodResolver(domain),\n\t});\n\n\tconst host = form.watch(\"host\");\n\tconst isTraefikMeDomain = host?.includes(\"traefik.me\") || false;\n\n\tuseEffect(() => {\n\t\tif (data) {\n\t\t\tform.reset({\n\t\t\t\t...data,\n\t\t\t\t/* Convert null to undefined */\n\t\t\t\tpath: data?.path || undefined,\n\t\t\t\tport: data?.port || undefined,\n\t\t\t\tcustomCertResolver: data?.customCertResolver || undefined,\n\t\t\t});\n\t\t}\n\n\t\tif (!domainId) {\n\t\t\tform.reset({});\n\t\t}\n\t}, [form, form.reset, data, isPending]);\n\n\tconst dictionary = {\n\t\tsuccess: domainId ? \"Domain Updated\" : \"Domain Created\",\n\t\terror: domainId ? \"Error updating the domain\" : \"Error creating the domain\",\n\t\tsubmit: domainId ? \"Update\" : \"Create\",\n\t\tdialogDescription: domainId\n\t\t\t? \"In this section you can edit a domain\"\n\t\t\t: \"In this section you can add domains\",\n\t};\n\n\tconst onSubmit = async (data: Domain) => {\n\t\tawait mutateAsync({\n\t\t\tdomainId,\n\t\t\tpreviewDeploymentId,\n\t\t\t...data,\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(dictionary.success);\n\t\t\t\tawait utils.previewDeployment.all.invalidate({\n\t\t\t\t\tapplicationId: previewDeployment?.applicationId,\n\t\t\t\t});\n\n\t\t\t\tif (domainId) {\n\t\t\t\t\trefetch();\n\t\t\t\t}\n\t\t\t\tsetIsOpen(false);\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(dictionary.error);\n\t\t\t});\n\t};\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger className=\"\" asChild>\n\t\t\t\t{children}\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-2xl\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Domain</DialogTitle>\n\t\t\t\t\t<DialogDescription>{dictionary.dialogDescription}</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t{isError && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tid=\"hook-form\"\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\tclassName=\"grid w-full gap-8 \"\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"host\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t{isTraefikMeDomain && (\n\t\t\t\t\t\t\t\t\t\t\t\t<AlertBlock type=\"info\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<strong>Note:</strong> traefik.me is a public HTTP\n\t\t\t\t\t\t\t\t\t\t\t\t\tservice and does not support SSL/HTTPS. HTTPS and\n\t\t\t\t\t\t\t\t\t\t\t\t\tcertificate options will not have any effect.\n\t\t\t\t\t\t\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Host</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"api.dokploy.com\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipProvider delayDuration={0}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisLoading={isLoadingGenerate}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgenerateDomain({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tappName: previewDeployment?.appName || \"\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tserverId:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpreviewDeployment?.application\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t?.serverId || \"\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.then((domain) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(domain);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.catch((err) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(err.message);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Dices className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tside=\"left\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsideOffset={5}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"max-w-[10rem]\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>Generate traefik.me domain</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"path\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => {\n\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Path</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder={\"/\"} {...field} />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"port\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => {\n\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Container Port</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<NumberInput placeholder={\"3000\"} {...field} />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"https\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem className=\"flex flex-row items-center justify-between p-3 mt-4 border rounded-lg shadow-sm\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>HTTPS</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\tAutomatically provision SSL Certificate.\n\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t{form.getValues().https && (\n\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\tname=\"certificateType\"\n\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t<FormItem className=\"col-span-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Certificate Provider</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\t\t\t\tonValueChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t\tdefaultValue={field.value || \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a certificate provider\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"none\">None</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value={\"letsencrypt\"}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLet's Encrypt\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</form>\n\n\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t<Button isLoading={isPending} form=\"hook-form\" type=\"submit\">\n\t\t\t\t\t\t\t{dictionary.submit}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</DialogFooter>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/preview-deployments/show-preview-deployments.tsx",
    "content": "import * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport {\n\tExternalLink,\n\tFileText,\n\tGitPullRequest,\n\tHammer,\n\tLoader2,\n\tPenSquare,\n\tRocketIcon,\n\tTrash2,\n} from \"lucide-react\";\nimport { toast } from \"sonner\";\nimport { GithubIcon } from \"@/components/icons/data-tools-icons\";\nimport { DateTooltip } from \"@/components/shared/date-tooltip\";\nimport { DialogAction } from \"@/components/shared/dialog-action\";\nimport { StatusTooltip } from \"@/components/shared/status-tooltip\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport { Input } from \"@/components/ui/input\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { api } from \"@/utils/api\";\nimport { ShowModalLogs } from \"../../settings/web-server/show-modal-logs\";\nimport { ShowDeploymentsModal } from \"../deployments/show-deployments-modal\";\nimport { AddPreviewDomain } from \"./add-preview-domain\";\nimport { ShowPreviewSettings } from \"./show-preview-settings\";\n\ninterface Props {\n\tapplicationId: string;\n}\n\nexport const ShowPreviewDeployments = ({ applicationId }: Props) => {\n\tconst { data } = api.application.one.useQuery({ applicationId });\n\n\tconst { mutateAsync: deletePreviewDeployment, isPending } =\n\t\tapi.previewDeployment.delete.useMutation();\n\n\tconst { mutateAsync: redeployPreviewDeployment } =\n\t\tapi.previewDeployment.redeploy.useMutation();\n\n\tconst {\n\t\tdata: previewDeployments,\n\t\trefetch: refetchPreviewDeployments,\n\t\tisLoading: isLoadingPreviewDeployments,\n\t} = api.previewDeployment.all.useQuery(\n\t\t{ applicationId },\n\t\t{\n\t\t\tenabled: !!applicationId,\n\t\t\trefetchInterval: 2000,\n\t\t},\n\t);\n\n\tconst handleDeletePreviewDeployment = async (previewDeploymentId: string) => {\n\t\tdeletePreviewDeployment({\n\t\t\tpreviewDeploymentId: previewDeploymentId,\n\t\t})\n\t\t\t.then(() => {\n\t\t\t\trefetchPreviewDeployments();\n\t\t\t\ttoast.success(\"Preview deployment deleted\");\n\t\t\t})\n\t\t\t.catch((error) => {\n\t\t\t\ttoast.error(error.message);\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<Card className=\"bg-background\">\n\t\t\t<CardHeader className=\"flex flex-row items-center justify-between flex-wrap gap-2\">\n\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t<CardTitle className=\"text-xl\">Preview Deployments</CardTitle>\n\t\t\t\t\t<CardDescription>See all the preview deployments</CardDescription>\n\t\t\t\t</div>\n\t\t\t\t{data?.isPreviewDeploymentsActive && (\n\t\t\t\t\t<ShowPreviewSettings applicationId={applicationId} />\n\t\t\t\t)}\n\t\t\t</CardHeader>\n\t\t\t<CardContent className=\"flex flex-col gap-4\">\n\t\t\t\t{data?.isPreviewDeploymentsActive ? (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<div className=\"flex flex-col gap-2 text-sm\">\n\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tPreview deployments are a way to test your application before it\n\t\t\t\t\t\t\t\tis deployed to production. It will create a new deployment for\n\t\t\t\t\t\t\t\teach pull request you create.\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{isLoadingPreviewDeployments ? (\n\t\t\t\t\t\t\t<div className=\"flex w-full flex-row items-center justify-center gap-3 min-h-[35vh]\">\n\t\t\t\t\t\t\t\t<Loader2 className=\"size-5 text-muted-foreground animate-spin\" />\n\t\t\t\t\t\t\t\t<span className=\"text-base text-muted-foreground\">\n\t\t\t\t\t\t\t\t\tLoading preview deployments...\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : !previewDeployments?.length ? (\n\t\t\t\t\t\t\t<div className=\"flex w-full flex-col items-center justify-center gap-3 min-h-[35vh]\">\n\t\t\t\t\t\t\t\t<RocketIcon className=\"size-8 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t<span className=\"text-base text-muted-foreground\">\n\t\t\t\t\t\t\t\t\tNo preview deployments found\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t\t\t{previewDeployments?.map((deployment) => {\n\t\t\t\t\t\t\t\t\tconst deploymentUrl = `${deployment.domain?.https ? \"https\" : \"http\"}://${deployment.domain?.host}${deployment.domain?.path || \"/\"}`;\n\t\t\t\t\t\t\t\t\tconst status = deployment.previewStatus;\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tkey={deployment.previewDeploymentId}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"group relative overflow-hidden border rounded-lg transition-colors\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\tclassName={`absolute left-0 top-0 w-1 h-full ${\n\t\t\t\t\t\t\t\t\t\t\t\t\tstatus === \"done\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"bg-green-500\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: status === \"running\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"bg-yellow-500\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"bg-red-500\"\n\t\t\t\t\t\t\t\t\t\t\t\t}`}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"p-4\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-start justify-between mb-3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-start gap-3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<GitPullRequest className=\"size-5 text-muted-foreground mt-1 flex-shrink-0\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"font-medium text-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{deployment.pullRequestTitle}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"text-sm text-muted-foreground mt-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{deployment.branch}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Badge variant=\"outline\" className=\"gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<StatusTooltip\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstatus={deployment.previewStatus}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"size-2\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DateTooltip date={deployment.createdAt} />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"pl-8 space-y-3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"relative flex-grow\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={deploymentUrl}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treadOnly\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"pr-8 text-sm text-blue-500 hover:text-blue-600 cursor-pointer\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twindow.open(deploymentUrl, \"_blank\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ExternalLink className=\"absolute right-3 top-1/2 -translate-y-1/2 size-4 text-gray-400\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex gap-2 opacity-80 group-hover:opacity-100 transition-opacity\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"gap-2\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twindow.open(deployment.pullRequestURL, \"_blank\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<GithubIcon className=\"size-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tPull Request\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ShowModalLogs\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tappName={deployment.appName}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tserverId={data?.serverId || \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"gap-2\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FileText className=\"size-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLogs\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</ShowModalLogs>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ShowDeploymentsModal\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tid={deployment.previewDeploymentId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"previewDeployment\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tserverId={data?.serverId || \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"gap-2\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<RocketIcon className=\"size-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDeployments\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</ShowDeploymentsModal>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"Rebuild Preview Deployment\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to rebuild this preview deployment?\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"default\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait redeployPreviewDeployment({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpreviewDeploymentId:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdeployment.previewDeploymentId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Preview deployment rebuild started\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trefetchPreviewDeployments();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Error rebuilding preview deployment\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisLoading={status === \"running\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"gap-2\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Hammer className=\"size-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tRebuild\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsideOffset={5}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"z-[60]\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tRebuild the preview deployment without\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdownloading new code\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DialogAction>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<AddPreviewDomain\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpreviewDeploymentId={`${deployment.previewDeploymentId}`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdomainId={deployment.domain?.domainId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"gap-2\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<PenSquare className=\"size-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</AddPreviewDomain>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"Delete Preview\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to delete this preview?\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thandleDeletePreviewDeployment(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdeployment.previewDeploymentId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisLoading={isPending}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-red-600 hover:text-red-700 hover:bg-red-50\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Trash2 className=\"size-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</>\n\t\t\t\t) : (\n\t\t\t\t\t<div className=\"flex w-full flex-col items-center justify-center gap-3 pt-10\">\n\t\t\t\t\t\t<RocketIcon className=\"size-8 text-muted-foreground\" />\n\t\t\t\t\t\t<span className=\"text-base text-muted-foreground\">\n\t\t\t\t\t\t\tPreview deployments are disabled for this application, please\n\t\t\t\t\t\t\tenable it\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<ShowPreviewSettings applicationId={applicationId} />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</CardContent>\n\t\t</Card>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/preview-deployments/show-preview-settings.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { HelpCircle, Plus, Settings2, X } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input, NumberInput } from \"@/components/ui/input\";\nimport { Secrets } from \"@/components/ui/secrets\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { Switch } from \"@/components/ui/switch\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { api } from \"@/utils/api\";\n\nconst schema = z\n\t.object({\n\t\tenv: z.string(),\n\t\tbuildArgs: z.string(),\n\t\tbuildSecrets: z.string(),\n\t\twildcardDomain: z.string(),\n\t\tport: z.number(),\n\t\tpreviewLimit: z.number(),\n\t\tpreviewLabels: z.array(z.string()).optional(),\n\t\tpreviewHttps: z.boolean(),\n\t\tpreviewPath: z.string(),\n\t\tpreviewCertificateType: z.enum([\"letsencrypt\", \"none\", \"custom\"]),\n\t\tpreviewCustomCertResolver: z.string().optional(),\n\t\tpreviewRequireCollaboratorPermissions: z.boolean(),\n\t})\n\t.superRefine((input, ctx) => {\n\t\tif (\n\t\t\tinput.previewCertificateType === \"custom\" &&\n\t\t\t!input.previewCustomCertResolver\n\t\t) {\n\t\t\tctx.addIssue({\n\t\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\t\tpath: [\"previewCustomCertResolver\"],\n\t\t\t\tmessage: \"Required\",\n\t\t\t});\n\t\t}\n\t});\n\ntype Schema = z.infer<typeof schema>;\n\ninterface Props {\n\tapplicationId: string;\n}\n\nexport const ShowPreviewSettings = ({ applicationId }: Props) => {\n\tconst [isOpen, setIsOpen] = useState(false);\n\tconst [isEnabled, setIsEnabled] = useState(false);\n\tconst { mutateAsync: updateApplication, isPending } =\n\t\tapi.application.update.useMutation();\n\n\tconst { data, refetch } = api.application.one.useQuery({ applicationId });\n\n\tconst form = useForm<Schema>({\n\t\tdefaultValues: {\n\t\t\tenv: \"\",\n\t\t\twildcardDomain: \"*.traefik.me\",\n\t\t\tport: 3000,\n\t\t\tpreviewLimit: 3,\n\t\t\tpreviewLabels: [],\n\t\t\tpreviewHttps: false,\n\t\t\tpreviewPath: \"/\",\n\t\t\tpreviewCertificateType: \"none\",\n\t\t\tpreviewRequireCollaboratorPermissions: true,\n\t\t},\n\t\tresolver: zodResolver(schema),\n\t});\n\n\tconst previewHttps = form.watch(\"previewHttps\");\n\tconst wildcardDomain = form.watch(\"wildcardDomain\");\n\tconst isTraefikMeDomain = wildcardDomain?.includes(\"traefik.me\") || false;\n\n\tuseEffect(() => {\n\t\tsetIsEnabled(data?.isPreviewDeploymentsActive || false);\n\t}, [data?.isPreviewDeploymentsActive]);\n\n\tuseEffect(() => {\n\t\tif (data) {\n\t\t\tform.reset({\n\t\t\t\tenv: data.previewEnv || \"\",\n\t\t\t\tbuildArgs: data.previewBuildArgs || \"\",\n\t\t\t\tbuildSecrets: data.previewBuildSecrets || \"\",\n\t\t\t\twildcardDomain: data.previewWildcard || \"*.traefik.me\",\n\t\t\t\tport: data.previewPort || 3000,\n\t\t\t\tpreviewLabels: data.previewLabels || [],\n\t\t\t\tpreviewLimit: data.previewLimit || 3,\n\t\t\t\tpreviewHttps: data.previewHttps || false,\n\t\t\t\tpreviewPath: data.previewPath || \"/\",\n\t\t\t\tpreviewCertificateType: data.previewCertificateType || \"none\",\n\t\t\t\tpreviewCustomCertResolver: data.previewCustomCertResolver || \"\",\n\t\t\t\tpreviewRequireCollaboratorPermissions:\n\t\t\t\t\tdata.previewRequireCollaboratorPermissions ?? true,\n\t\t\t});\n\t\t}\n\t}, [data]);\n\n\tconst onSubmit = async (formData: Schema) => {\n\t\tupdateApplication({\n\t\t\tpreviewEnv: formData.env,\n\t\t\tpreviewBuildArgs: formData.buildArgs,\n\t\t\tpreviewBuildSecrets: formData.buildSecrets,\n\t\t\tpreviewWildcard: formData.wildcardDomain,\n\t\t\tpreviewPort: formData.port,\n\t\t\tpreviewLabels: formData.previewLabels,\n\t\t\tapplicationId,\n\t\t\tpreviewLimit: formData.previewLimit,\n\t\t\tpreviewHttps: formData.previewHttps,\n\t\t\tpreviewPath: formData.previewPath,\n\t\t\tpreviewCertificateType: formData.previewCertificateType,\n\t\t\tpreviewCustomCertResolver: formData.previewCustomCertResolver,\n\t\t\tpreviewRequireCollaboratorPermissions:\n\t\t\t\tformData.previewRequireCollaboratorPermissions,\n\t\t})\n\t\t\t.then(() => {\n\t\t\t\ttoast.success(\"Preview Deployments settings updated\");\n\t\t\t})\n\t\t\t.catch((error) => {\n\t\t\t\ttoast.error(error.message);\n\t\t\t});\n\t};\n\treturn (\n\t\t<div>\n\t\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t\t<DialogTrigger asChild>\n\t\t\t\t\t<Button variant=\"outline\">\n\t\t\t\t\t\t<Settings2 className=\"size-4\" />\n\t\t\t\t\t\tConfigure\n\t\t\t\t\t</Button>\n\t\t\t\t</DialogTrigger>\n\t\t\t\t<DialogContent className=\"sm:max-w-5xl w-full\">\n\t\t\t\t\t<DialogHeader>\n\t\t\t\t\t\t<DialogTitle>Preview Deployment Settings</DialogTitle>\n\t\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\t\tAdjust the settings for preview deployments of this application,\n\t\t\t\t\t\t\tincluding environment variables, build options, and deployment\n\t\t\t\t\t\t\trules.\n\t\t\t\t\t\t</DialogDescription>\n\t\t\t\t\t</DialogHeader>\n\t\t\t\t\t<div className=\"grid gap-4\">\n\t\t\t\t\t\t{isTraefikMeDomain && (\n\t\t\t\t\t\t\t<AlertBlock type=\"info\">\n\t\t\t\t\t\t\t\t<strong>Note:</strong> traefik.me is a public HTTP service and\n\t\t\t\t\t\t\t\tdoes not support SSL/HTTPS. HTTPS and certificate options will\n\t\t\t\t\t\t\t\tnot have any effect.\n\t\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<Form {...form}>\n\t\t\t\t\t\t\t<form\n\t\t\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\t\t\tid=\"hook-form-delete-application\"\n\t\t\t\t\t\t\t\tclassName=\"grid w-full gap-4\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div className=\"grid gap-4 lg:grid-cols-2\">\n\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\tname=\"wildcardDomain\"\n\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Wildcard Domain</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"*.traefik.me\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\tname=\"previewPath\"\n\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Preview Path</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"/\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\tname=\"port\"\n\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Port</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<NumberInput placeholder=\"3000\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\tname=\"previewLabels\"\n\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t<FormItem className=\"md:col-span-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Preview Labels</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<HelpCircle className=\"size-4 text-muted-foreground hover:text-foreground transition-colors cursor-pointer\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAdd a labels that will trigger a preview\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdeployment for a pull request. If no labels\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tare specified, all pull requests will trigger\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ta preview deployment.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-wrap gap-2 mb-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{field.value?.map((label, index) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={index}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<X\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"size-3 cursor-pointer hover:text-destructive\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst newLabels = [...(field.value || [])];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnewLabels.splice(index, 1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(newLabels);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Enter a label (e.g. enhancements, needs-review)\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (e.key === \"Enter\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst input = e.currentTarget;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst label = input.value.trim();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (label) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange([\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t...(field.value || []),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tinput.value = \"\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst input = document.querySelector(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'input[placeholder*=\"Enter a label\"]',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) as HTMLInputElement;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst label = input.value.trim();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (label) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange([...(field.value || []), label]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tinput.value = \"\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Plus className=\"size-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\tname=\"previewLimit\"\n\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Preview Limit</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<NumberInput placeholder=\"3000\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\tname=\"previewHttps\"\n\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t<FormItem className=\"flex flex-row items-center justify-between p-3 mt-4 border rounded-lg shadow-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>HTTPS</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tAutomatically provision SSL Certificate.\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t{previewHttps && (\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"previewCertificateType\"\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Certificate Provider</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonValueChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdefaultValue={field.value || \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a certificate provider\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"none\">None</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value={\"letsencrypt\"}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLet's Encrypt\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value={\"custom\"}>Custom</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t{form.watch(\"previewCertificateType\") === \"custom\" && (\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"previewCustomCertResolver\"\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Certificate Provider</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"my-custom-resolver\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div className=\"grid gap-4 lg:grid-cols-2\">\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row items-center justify-between rounded-lg border p-4 col-span-2\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel className=\"text-base\">\n\t\t\t\t\t\t\t\t\t\t\t\tEnable preview deployments\n\t\t\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\tEnable or disable preview deployments for this\n\t\t\t\t\t\t\t\t\t\t\t\tapplication.\n\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\tchecked={isEnabled}\n\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={(checked) => {\n\t\t\t\t\t\t\t\t\t\t\t\tupdateApplication({\n\t\t\t\t\t\t\t\t\t\t\t\t\tisPreviewDeploymentsActive: checked,\n\t\t\t\t\t\t\t\t\t\t\t\t\tapplicationId,\n\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tchecked\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Preview deployments enabled\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Preview deployments disabled\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t.catch((error) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(error.message);\n\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t<div className=\"grid gap-4 lg:grid-cols-2\">\n\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\tname=\"previewRequireCollaboratorPermissions\"\n\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t<FormItem className=\"flex flex-row items-center justify-between p-3 mt-4 border rounded-lg shadow-sm col-span-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tRequire Collaborator Permissions\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tRequire collaborator permissions to preview\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdeployments, valid roles are:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<li>Admin</li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<li>Maintain</li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<li>Write</li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"env\"\n\t\t\t\t\t\t\t\t\trender={() => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Secrets\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"env\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"Environment Settings\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tdescription=\"You can add environment variables to your resource.\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder={[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"NODE_ENV=production\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"PORT=3000\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t].join(\"\\n\")}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t{data?.buildType === \"dockerfile\" && (\n\t\t\t\t\t\t\t\t\t<Secrets\n\t\t\t\t\t\t\t\t\t\tname=\"buildArgs\"\n\t\t\t\t\t\t\t\t\t\ttitle=\"Build-time Arguments\"\n\t\t\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t\t\t\tArguments are available only at build-time. See\n\t\t\t\t\t\t\t\t\t\t\t\tdocumentation&nbsp;\n\t\t\t\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-primary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\thref=\"https://docs.docker.com/build/building/variables/\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\there\n\t\t\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t\t\t.\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tplaceholder=\"NPM_TOKEN=xyz\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{data?.buildType === \"dockerfile\" && (\n\t\t\t\t\t\t\t\t\t<Secrets\n\t\t\t\t\t\t\t\t\t\tname=\"buildSecrets\"\n\t\t\t\t\t\t\t\t\t\ttitle=\"Build-time Secrets\"\n\t\t\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t\t\t\tSecrets are specially designed for sensitive information\n\t\t\t\t\t\t\t\t\t\t\t\tand are only available at build-time. See\n\t\t\t\t\t\t\t\t\t\t\t\tdocumentation&nbsp;\n\t\t\t\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-primary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\thref=\"https://docs.docker.com/build/building/secrets/\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\there\n\t\t\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t\t\t.\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tplaceholder=\"NPM_TOKEN=xyz\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t</Form>\n\t\t\t\t\t</div>\n\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\tsetIsOpen(false);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tCancel\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tisLoading={isPending}\n\t\t\t\t\t\t\tform=\"hook-form-delete-application\"\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tSave\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</DialogFooter>\n\t\t\t\t</DialogContent>\n\t\t\t</Dialog>\n\t\t\t{/* */}\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/rollbacks/Backup",
    "content": "Backup\n# license-namedbackups-abxelc\n1. docker ps --filter \"label=com.docker.swarm.service.name=license-namedbackups-abxelc\" --format \"{{.Names}}\"\n2. docker run --rm \\\n--volumes-from \"license-namedbackups-abxelc.1.m3cxy78ocj3w0zu42kmgamc5y\" \\\n-v $(pwd):/backup \\\nubuntu \\\ntar cvf /backup/backup.tar /var/lib/postgresql/data\n\n\n# Official Command Backup\n\n1. Backup\n\ndocker run --rm \\\n  -v license-namedbackups-abxelc-data:/volume_data \\\n  -v $(pwd):/backup \\\n  ubuntu \\\n  bash -c \"cd /volume_data && tar cvf /backup/generic_backup.tar .\"\n\n\n2. Restore\n\ndocker service scale license-namedbackups-abxelc=0\n\ndocker volume rm license-namedbackups-abxelc-data\n\n2. docker run --rm \\\n-v license-namedbackups-abxelc-data:/volume_data \\\n-v $(pwd):/backup \\\nubuntu \\\nbash -c \"cd /volume_data && tar xvf /backup/generic_backup.tar .\"\n\ndocker service scale license-namedbackups-abxelc=1\n\n\nroot@srv594061:~# docker volume inspect  n8n_data-data\n[\n    {\n        \"CreatedAt\": \"2025-06-28T18:07:44Z\",\n        \"Driver\": \"local\",\n        \"Labels\": null,\n        \"Mountpoint\": \"/var/lib/docker/volumes/n8n_data-data/_data\",\n        \"Name\": \"n8n_data-data\",\n        \"Options\": null,\n        \"Scope\": \"local\"\n    }\n]\n\nArchivos funcuionando creados por N8N\n\n# root@srv594061:~# cd /var/lib/docker/volumes/n8n_data-data/_data\n# root@srv594061:/var/lib/docker/volumes/n8n_data-data/_data# ls\n# binaryData  config  crash.journal  database.sqlite  git  n8nEventLog.log  ssh\n\nLuego que intente hacer el backup con el comando de backup\n\n\nroot@srv594061:~# docker run --rm   -v n8n_data-data:/volume_data   -v $(pwd):/backup   ubuntu   bash -c \"cd /volume_data && tar cvf /backup/generic_backup6.tar .\"\n./\n./config\n./crash.journal\n./binaryData/\n./git/\n./database.sqlite\n./ssh/\n./n8nEventLog.log\nroot@srv594061:~# \n\n# Paramos la aplicacion\ndocker service scale n8n=0\n\n# Haciendo el restore\nroot@srv594061:~# docker volume rm n8n_data-data\nn8n_data-data\nroot@srv594061:~# docker run --rm -v n8n_data-data:/volume_data -v $(pwd):/backup ubuntu bash -c \"cd /volume_data && tar xvf /backup/generic_backup6.tar && chown -R 999:999 .\"\n./\n./config\n./crash.journal\n./binaryData/\n./git/\n./database.sqlite\n./ssh/\n./n8nEventLog.log\n\n# Tenemos los archivos en el volumen\nroot@srv594061:~# ls /var/lib/docker/volumes/n8n_data-data/_data\nbinaryData  config  crash.journal  database.sqlite  git  n8nEventLog.log  ssh\nroot@srv594061:~# \n\ndocker service scale n8n=1\n\n# Luego en N8N Cuando se que el volumen tiene la data \nPermissions 0644 for n8n settings file /home/node/.n8n/config are too wide. This is ignored for now, but in the future n8n will attempt to change the permissions automatically. To automatically enforce correct permissions now set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true (recommended), or turn this check off set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=false.\nUser settings loaded from: /home/node/.n8n/config\nLast session crashed\nError: EACCES: permission denied, open '/home/node/.n8n/crash.journal'\nat open (node:internal/fs/promises:639:25)\nat touchFile (/usr/local/lib/node_modules/n8n/dist/crash-journal.js:18:20)\nat Object.init (/usr/local/lib/node_modules/n8n/dist/crash-journal.js:32:5)\nat Start.initCrashJournal (/usr/local/lib/node_modules/n8n/dist/commands/base-command.js:113:9)\nat Start.init (/usr/local/lib/node_modules/n8n/dist/commands/start.js:141:9)\nat Start._run (/usr/local/lib/node_modules/n8n/node_modules/@oclif/core/lib/command.js:301:13)\nat Config.runCommand (/usr/local/lib/node_modules/n8n/node_modules/@oclif/core/lib/config/config.js:424:25)\nat run (/usr/local/lib/node_modules/n8n/node_modules/@oclif/core/lib/main.js:94:16)\nat /usr/local/lib/node_modules/n8n/bin/n8n:71:2\nTypeError: Cannot read properties of undefined (reading 'error')\n\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/rollbacks/show-rollback-settings.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport Link from \"next/link\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectGroup,\n\tSelectItem,\n\tSelectLabel,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { Switch } from \"@/components/ui/switch\";\nimport { api } from \"@/utils/api\";\n\nconst formSchema = z\n\t.object({\n\t\trollbackActive: z.boolean(),\n\t\trollbackRegistryId: z.string().optional(),\n\t})\n\t.superRefine((values, ctx) => {\n\t\tif (\n\t\t\tvalues.rollbackActive &&\n\t\t\t(!values.rollbackRegistryId || values.rollbackRegistryId === \"none\")\n\t\t) {\n\t\t\tctx.addIssue({\n\t\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\t\tpath: [\"rollbackRegistryId\"],\n\t\t\t\tmessage: \"Registry is required when rollbacks are enabled\",\n\t\t\t});\n\t\t}\n\t});\n\ntype FormValues = z.infer<typeof formSchema>;\n\ninterface Props {\n\tapplicationId: string;\n\tchildren?: React.ReactNode;\n}\n\nexport const ShowRollbackSettings = ({ applicationId, children }: Props) => {\n\tconst [isOpen, setIsOpen] = useState(false);\n\tconst { data: application, refetch } = api.application.one.useQuery(\n\t\t{\n\t\t\tapplicationId,\n\t\t},\n\t\t{\n\t\t\tenabled: !!applicationId,\n\t\t},\n\t);\n\n\tconst { mutateAsync: updateApplication, isPending } =\n\t\tapi.application.update.useMutation();\n\n\tconst { data: registries } = api.registry.all.useQuery();\n\n\tconst form = useForm<FormValues>({\n\t\tresolver: zodResolver(formSchema),\n\t\tdefaultValues: {\n\t\t\trollbackActive: application?.rollbackActive ?? false,\n\t\t\trollbackRegistryId: application?.rollbackRegistryId || \"\",\n\t\t},\n\t});\n\n\tuseEffect(() => {\n\t\tif (application) {\n\t\t\tform.reset({\n\t\t\t\trollbackActive: application.rollbackActive ?? false,\n\t\t\t\trollbackRegistryId: application.rollbackRegistryId || \"\",\n\t\t\t});\n\t\t}\n\t}, [application, form]);\n\n\tconst onSubmit = async (data: FormValues) => {\n\t\tawait updateApplication({\n\t\t\tapplicationId,\n\t\t\trollbackActive: data.rollbackActive,\n\t\t\trollbackRegistryId:\n\t\t\t\tdata.rollbackRegistryId === \"none\" || !data.rollbackRegistryId\n\t\t\t\t\t? null\n\t\t\t\t\t: data.rollbackRegistryId,\n\t\t})\n\t\t\t.then(() => {\n\t\t\t\ttoast.success(\"Rollback settings updated\");\n\t\t\t\tsetIsOpen(false);\n\t\t\t\trefetch();\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Failed to update rollback settings\");\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger asChild>{children}</DialogTrigger>\n\t\t\t<DialogContent>\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Rollback Settings</DialogTitle>\n\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\tConfigure how rollbacks work for this application\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t\t<AlertBlock>\n\t\t\t\t\t\tHaving rollbacks enabled increases storage usage. Be careful with\n\t\t\t\t\t\tthis option. Note that manually cleaning the cache may delete\n\t\t\t\t\t\trollback images, making them unavailable for future rollbacks.\n\t\t\t\t\t</AlertBlock>\n\t\t\t\t</DialogHeader>\n\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form onSubmit={form.handleSubmit(onSubmit)} className=\"space-y-6\">\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"rollbackActive\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"flex flex-row items-center justify-between rounded-lg border p-4\">\n\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t<FormLabel className=\"text-base\">\n\t\t\t\t\t\t\t\t\t\t\tEnable Rollbacks\n\t\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\tAllow rolling back to previous deployments\n\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t{form.watch(\"rollbackActive\") && (\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"rollbackRegistryId\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Rollback Registry</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\t\tonValueChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\tvalue={field.value || \"none\"}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a registry\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"none\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>None</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{registries?.map((registry) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={registry.registryId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={registry.registryId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{registry.registryName}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tRegistries ({registries?.length || 0})\n\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectGroup>\n\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t{!registries || registries.length === 0 ? (\n\t\t\t\t\t\t\t\t\t\t\t<FormDescription className=\"text-amber-600 dark:text-amber-500\">\n\t\t\t\t\t\t\t\t\t\t\t\tNo registries available. Please{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\t\thref=\"/dashboard/settings/registry\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"underline font-medium hover:text-amber-700 dark:hover:text-amber-400\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\tconfigure a registry\n\t\t\t\t\t\t\t\t\t\t\t\t</Link>{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\tfirst to enable rollbacks.\n\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\tSelect a registry where rollback images will be stored.\n\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t<Button type=\"submit\" className=\"w-full\" isLoading={isPending}>\n\t\t\t\t\t\t\tSave Settings\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</form>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/schedules/handle-schedules.tsx",
    "content": "import { standardSchemaResolver } from \"@hookform/resolvers/standard-schema\";\nimport {\n\tCheckIcon,\n\tChevronsUpDown,\n\tDatabaseZap,\n\tInfo,\n\tPenBoxIcon,\n\tPlusCircle,\n\tRefreshCw,\n} from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { type Control, useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { CodeEditor } from \"@/components/shared/code-editor\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCommand,\n\tCommandEmpty,\n\tCommandGroup,\n\tCommandInput,\n\tCommandItem,\n\tCommandList,\n} from \"@/components/ui/command\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport {\n\tPopover,\n\tPopoverContent,\n\tPopoverTrigger,\n} from \"@/components/ui/popover\";\nimport { ScrollArea } from \"@/components/ui/scroll-area\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { Switch } from \"@/components/ui/switch\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { cn } from \"@/lib/utils\";\nimport { api } from \"@/utils/api\";\nimport type { CacheType } from \"../domains/handle-domain\";\nimport { getTimezoneLabel, TIMEZONES } from \"./timezones\";\n\nexport const commonCronExpressions = [\n\t{ label: \"Every minute\", value: \"* * * * *\" },\n\t{ label: \"Every hour\", value: \"0 * * * *\" },\n\t{ label: \"Every day at midnight\", value: \"0 0 * * *\" },\n\t{ label: \"Every Sunday at midnight\", value: \"0 0 * * 0\" },\n\t{ label: \"Every month on the 1st at midnight\", value: \"0 0 1 * *\" },\n\t{ label: \"Every 15 minutes\", value: \"*/15 * * * *\" },\n\t{ label: \"Every weekday at midnight\", value: \"0 0 * * 1-5\" },\n\t{ label: \"Custom\", value: \"custom\" },\n];\n\nconst formSchema = z\n\t.object({\n\t\tname: z.string().min(1, \"Name is required\"),\n\t\tcronExpression: z.string().min(1, \"Cron expression is required\"),\n\t\tshellType: z.enum([\"bash\", \"sh\"]).default(\"bash\"),\n\t\tcommand: z.string(),\n\t\tenabled: z.boolean().default(true),\n\t\tserviceName: z.string(),\n\t\tscheduleType: z.enum([\n\t\t\t\"application\",\n\t\t\t\"compose\",\n\t\t\t\"server\",\n\t\t\t\"dokploy-server\",\n\t\t]),\n\t\tscript: z.string(),\n\t\ttimezone: z.string().optional(),\n\t})\n\t.superRefine((data, ctx) => {\n\t\tif (data.scheduleType === \"compose\" && !data.serviceName) {\n\t\t\tctx.addIssue({\n\t\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\t\tmessage: \"Service name is required\",\n\t\t\t\tpath: [\"serviceName\"],\n\t\t\t});\n\t\t}\n\n\t\tif (\n\t\t\t(data.scheduleType === \"dokploy-server\" ||\n\t\t\t\tdata.scheduleType === \"server\") &&\n\t\t\t!data.script\n\t\t) {\n\t\t\tctx.addIssue({\n\t\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\t\tmessage: \"Script is required\",\n\t\t\t\tpath: [\"script\"],\n\t\t\t});\n\t\t}\n\n\t\tif (\n\t\t\t(data.scheduleType === \"application\" ||\n\t\t\t\tdata.scheduleType === \"compose\") &&\n\t\t\t!data.command\n\t\t) {\n\t\t\tctx.addIssue({\n\t\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\t\tmessage: \"Command is required\",\n\t\t\t\tpath: [\"command\"],\n\t\t\t});\n\t\t}\n\t});\n\ninterface Props {\n\tid?: string;\n\tscheduleId?: string;\n\tscheduleType?: \"application\" | \"compose\" | \"server\" | \"dokploy-server\";\n}\n\nexport const ScheduleFormField = ({\n\tname,\n\tformControl,\n}: {\n\tname: string;\n\tformControl: Control<any>;\n}) => {\n\tconst [selectedOption, setSelectedOption] = useState(\"\");\n\n\treturn (\n\t\t<FormField\n\t\t\tcontrol={formControl}\n\t\t\tname={name}\n\t\t\trender={({ field }) => (\n\t\t\t\t<FormItem>\n\t\t\t\t\t<FormLabel className=\"flex items-center gap-2\">\n\t\t\t\t\t\tSchedule\n\t\t\t\t\t\t<TooltipProvider>\n\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t<Info className=\"w-4 h-4 text-muted-foreground cursor-help\" />\n\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t\t\t<p>Cron expression format: minute hour day month weekday</p>\n\t\t\t\t\t\t\t\t\t<p>Example: 0 0 * * * (daily at midnight)</p>\n\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t</FormLabel>\n\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\tvalue={selectedOption}\n\t\t\t\t\t\t\tonValueChange={(value) => {\n\t\t\t\t\t\t\t\tsetSelectedOption(value);\n\t\t\t\t\t\t\t\tfield.onChange(value === \"custom\" ? \"\" : value);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a predefined schedule\" />\n\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t{commonCronExpressions.map((expr) => (\n\t\t\t\t\t\t\t\t\t<SelectItem key={expr.value} value={expr.value}>\n\t\t\t\t\t\t\t\t\t\t{expr.label}\n\t\t\t\t\t\t\t\t\t\t{expr.value !== \"custom\" && ` (${expr.value})`}\n\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t<div className=\"relative\">\n\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\tplaceholder=\"Custom cron expression (e.g., 0 0 * * *)\"\n\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\t\t\tconst value = e.target.value;\n\t\t\t\t\t\t\t\t\t\tconst commonExpression = commonCronExpressions.find(\n\t\t\t\t\t\t\t\t\t\t\t(expression) => expression.value === value,\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\tif (commonExpression) {\n\t\t\t\t\t\t\t\t\t\t\tsetSelectedOption(commonExpression.value);\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tsetSelectedOption(\"custom\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tfield.onChange(e);\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\tChoose a predefined schedule or enter a custom cron expression\n\t\t\t\t\t</FormDescription>\n\t\t\t\t\t<FormMessage />\n\t\t\t\t</FormItem>\n\t\t\t)}\n\t\t/>\n\t);\n};\n\nexport const HandleSchedules = ({ id, scheduleId, scheduleType }: Props) => {\n\tconst [isOpen, setIsOpen] = useState(false);\n\tconst [cacheType, setCacheType] = useState<CacheType>(\"cache\");\n\tconst utils = api.useUtils();\n\tconst form = useForm({\n\t\tresolver: standardSchemaResolver(formSchema),\n\t\tdefaultValues: {\n\t\t\tname: \"\",\n\t\t\tcronExpression: \"\",\n\t\t\tshellType: \"bash\",\n\t\t\tcommand: \"\",\n\t\t\tenabled: true,\n\t\t\tserviceName: \"\",\n\t\t\tscheduleType: scheduleType || \"application\",\n\t\t\tscript: \"\",\n\t\t\ttimezone: undefined,\n\t\t},\n\t});\n\n\tconst scheduleTypeForm = form.watch(\"scheduleType\");\n\n\tconst { data: schedule } = api.schedule.one.useQuery(\n\t\t{ scheduleId: scheduleId || \"\" },\n\t\t{ enabled: !!scheduleId },\n\t);\n\n\tconst {\n\t\tdata: services,\n\t\tisFetching: isLoadingServices,\n\t\terror: errorServices,\n\t\trefetch: refetchServices,\n\t} = api.compose.loadServices.useQuery(\n\t\t{\n\t\t\tcomposeId: id || \"\",\n\t\t\ttype: cacheType,\n\t\t},\n\t\t{\n\t\t\tretry: false,\n\t\t\trefetchOnWindowFocus: false,\n\t\t\tenabled: !!id && scheduleType === \"compose\",\n\t\t},\n\t);\n\n\tuseEffect(() => {\n\t\tif (scheduleId && schedule) {\n\t\t\tform.reset({\n\t\t\t\tname: schedule.name,\n\t\t\t\tcronExpression: schedule.cronExpression,\n\t\t\t\tshellType: schedule.shellType,\n\t\t\t\tcommand: schedule.command,\n\t\t\t\tenabled: schedule.enabled,\n\t\t\t\tserviceName: schedule.serviceName || \"\",\n\t\t\t\tscheduleType: schedule.scheduleType,\n\t\t\t\tscript: schedule.script || \"\",\n\t\t\t\ttimezone: schedule.timezone || undefined,\n\t\t\t});\n\t\t}\n\t}, [form, schedule, scheduleId]);\n\n\tconst { mutateAsync, isPending } = scheduleId\n\t\t? api.schedule.update.useMutation()\n\t\t: api.schedule.create.useMutation();\n\n\tconst onSubmit = async (values: z.output<typeof formSchema>) => {\n\t\tif (!id && !scheduleId) return;\n\n\t\tawait mutateAsync({\n\t\t\t...values,\n\t\t\tscheduleId: scheduleId || \"\",\n\t\t\t...(scheduleType === \"application\" && {\n\t\t\t\tapplicationId: id || \"\",\n\t\t\t}),\n\t\t\t...(scheduleType === \"compose\" && {\n\t\t\t\tcomposeId: id || \"\",\n\t\t\t}),\n\t\t\t...(scheduleType === \"server\" && {\n\t\t\t\tserverId: id || \"\",\n\t\t\t}),\n\t\t\t...(scheduleType === \"dokploy-server\" && {\n\t\t\t\tuserId: id || \"\",\n\t\t\t}),\n\t\t})\n\t\t\t.then(() => {\n\t\t\t\ttoast.success(\n\t\t\t\t\t`Schedule ${scheduleId ? \"updated\" : \"created\"} successfully`,\n\t\t\t\t);\n\t\t\t\tutils.schedule.list.invalidate({\n\t\t\t\t\tid,\n\t\t\t\t\tscheduleType,\n\t\t\t\t});\n\t\t\t\tsetIsOpen(false);\n\t\t\t})\n\t\t\t.catch((error) => {\n\t\t\t\ttoast.error(\n\t\t\t\t\terror instanceof Error ? error.message : \"An unknown error occurred\",\n\t\t\t\t);\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t{scheduleId ? (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\tclassName=\"group hover:bg-blue-500/10\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<PenBoxIcon className=\"size-3.5 text-primary group-hover:text-blue-500\" />\n\t\t\t\t\t</Button>\n\t\t\t\t) : (\n\t\t\t\t\t<Button>\n\t\t\t\t\t\t<PlusCircle className=\"w-4 h-4 mr-2\" />\n\t\t\t\t\t\tAdd Schedule\n\t\t\t\t\t</Button>\n\t\t\t\t)}\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent\n\t\t\t\tclassName={cn(\n\t\t\t\t\tscheduleTypeForm === \"dokploy-server\" || scheduleTypeForm === \"server\"\n\t\t\t\t\t\t? \"sm:max-w-2xl\"\n\t\t\t\t\t\t: \"sm:max-w-lg\",\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>{scheduleId ? \"Edit\" : \"Create\"} Schedule</DialogTitle>\n\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\t{scheduleId ? \"Manage\" : \"Create\"} a schedule to run a task at a\n\t\t\t\t\t\tspecific time or interval.\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form onSubmit={form.handleSubmit(onSubmit)} className=\"space-y-6\">\n\t\t\t\t\t\t{scheduleTypeForm === \"compose\" && (\n\t\t\t\t\t\t\t<div className=\"flex flex-col w-full gap-4\">\n\t\t\t\t\t\t\t\t{errorServices && (\n\t\t\t\t\t\t\t\t\t<AlertBlock\n\t\t\t\t\t\t\t\t\t\ttype=\"warning\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"[overflow-wrap:anywhere]\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{errorServices?.message}\n\t\t\t\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"serviceName\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem className=\"w-full\">\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Service Name</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\t\t\t\tonValueChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t\tdefaultValue={field.value || \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a service name\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{services?.map((service, index) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={service}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={`${service}-${index}`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{service}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"none\" disabled>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tEmpty\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipProvider delayDuration={0}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisLoading={isLoadingServices}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (cacheType === \"fetch\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trefetchServices();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetCacheType(\"fetch\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<RefreshCw className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tside=\"left\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsideOffset={5}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"max-w-[10rem]\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFetch: Will clone the repository and load the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tservices\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipProvider delayDuration={0}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisLoading={isLoadingServices}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (cacheType === \"cache\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trefetchServices();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetCacheType(\"cache\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DatabaseZap className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tside=\"left\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsideOffset={5}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"max-w-[10rem]\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCache: If you previously deployed this compose,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tit will read the services from the last\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdeployment/fetch from the repository\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"name\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\tTask Name\n\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"Daily Database Backup\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\tA descriptive name for your scheduled task\n\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<ScheduleFormField\n\t\t\t\t\t\t\tname=\"cronExpression\"\n\t\t\t\t\t\t\tformControl={form.control}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"timezone\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\tTimezone\n\t\t\t\t\t\t\t\t\t\t<TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Info className=\"w-4 h-4 text-muted-foreground cursor-help\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSelect a timezone for the schedule. If not\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tspecified, UTC will be used.\n\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t<Popover>\n\t\t\t\t\t\t\t\t\t\t<PopoverTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"w-full justify-between !bg-input\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t!field.value && \"text-muted-foreground\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{getTimezoneLabel(field.value)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</PopoverTrigger>\n\t\t\t\t\t\t\t\t\t\t<PopoverContent className=\"w-[400px] p-0\" align=\"start\">\n\t\t\t\t\t\t\t\t\t\t\t<Command>\n\t\t\t\t\t\t\t\t\t\t\t\t<CommandInput\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Search timezone...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-9\"\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t<CommandList>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandEmpty>No timezone found.</CommandEmpty>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ScrollArea className=\"h-72\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{Object.entries(TIMEZONES).map(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t([region, zones]) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandGroup key={region} heading={region}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{zones.map((tz) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={tz.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={`${region} ${tz.label} ${tz.value}`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(tz.value);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{tz.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CheckIcon\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"ml-auto h-4 w-4\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.value === tz.value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"opacity-100\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"opacity-0\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</ScrollArea>\n\t\t\t\t\t\t\t\t\t\t\t\t</CommandList>\n\t\t\t\t\t\t\t\t\t\t\t</Command>\n\t\t\t\t\t\t\t\t\t\t</PopoverContent>\n\t\t\t\t\t\t\t\t\t</Popover>\n\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\tOptional: Choose a timezone for the schedule execution time\n\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t{(scheduleTypeForm === \"application\" ||\n\t\t\t\t\t\t\tscheduleTypeForm === \"compose\") && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"shellType\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\tShell Type\n\t\t\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\t\t\tonValueChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\tdefaultValue={field.value}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select shell type\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"bash\">Bash</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"sh\">Sh</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\tChoose the shell to execute your command\n\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"command\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\tCommand\n\t\t\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"npm run backup\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\tThe command to execute in your container\n\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{(scheduleTypeForm === \"dokploy-server\" ||\n\t\t\t\t\t\t\tscheduleTypeForm === \"server\") && (\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"script\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Script</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<CodeEditor\n\t\t\t\t\t\t\t\t\t\t\t\t\tlanguage=\"shell\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder={`# This is a comment\necho \"Hello, world!\"\n`}\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-96 font-mono\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"enabled\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\tEnabled\n\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<Button type=\"submit\" isLoading={isPending} className=\"w-full\">\n\t\t\t\t\t\t\t{scheduleId ? \"Update\" : \"Create\"} Schedule\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</form>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/schedules/show-schedules.tsx",
    "content": "import {\n\tClipboardList,\n\tClock,\n\tLoader2,\n\tPlay,\n\tTerminal,\n\tTrash2,\n} from \"lucide-react\";\nimport { useState } from \"react\";\nimport { toast } from \"sonner\";\nimport { DialogAction } from \"@/components/shared/dialog-action\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { api } from \"@/utils/api\";\nimport { ShowDeploymentsModal } from \"../deployments/show-deployments-modal\";\nimport { HandleSchedules } from \"./handle-schedules\";\n\ninterface Props {\n\tid: string;\n\tscheduleType?: \"application\" | \"compose\" | \"server\" | \"dokploy-server\";\n}\n\nexport const ShowSchedules = ({ id, scheduleType = \"application\" }: Props) => {\n\tconst [runningSchedules, setRunningSchedules] = useState<Set<string>>(\n\t\tnew Set(),\n\t);\n\tconst {\n\t\tdata: schedules,\n\t\tisLoading: isLoadingSchedules,\n\t\trefetch: refetchSchedules,\n\t} = api.schedule.list.useQuery(\n\t\t{\n\t\t\tid: id || \"\",\n\t\t\tscheduleType,\n\t\t},\n\t\t{\n\t\t\tenabled: !!id,\n\t\t},\n\t);\n\tconst utils = api.useUtils();\n\tconst { mutateAsync: deleteSchedule, isPending: isDeleting } =\n\t\tapi.schedule.delete.useMutation();\n\tconst { mutateAsync: runManually } = api.schedule.runManually.useMutation();\n\n\tconst handleRunManually = async (scheduleId: string) => {\n\t\tsetRunningSchedules((prev) => new Set(prev).add(scheduleId));\n\t\ttry {\n\t\t\tawait runManually({ scheduleId });\n\t\t\ttoast.success(\"Schedule run successfully\");\n\t\t\tawait refetchSchedules();\n\t\t} catch {\n\t\t\ttoast.error(\"Error running schedule\");\n\t\t} finally {\n\t\t\tsetRunningSchedules((prev) => {\n\t\t\t\tconst newSet = new Set(prev);\n\t\t\t\tnewSet.delete(scheduleId);\n\t\t\t\treturn newSet;\n\t\t\t});\n\t\t}\n\t};\n\n\treturn (\n\t\t<Card className=\"border px-6 shadow-none bg-transparent h-full min-h-[50vh]\">\n\t\t\t<CardHeader className=\"px-0\">\n\t\t\t\t<div className=\"flex justify-between items-center gap-y-2 flex-wrap\">\n\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t<CardTitle className=\"text-xl font-bold flex items-center gap-2\">\n\t\t\t\t\t\t\tScheduled Tasks\n\t\t\t\t\t\t</CardTitle>\n\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\tSchedule tasks to run automatically at specified intervals.\n\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t</div>\n\t\t\t\t\t{schedules && schedules.length > 0 && (\n\t\t\t\t\t\t<HandleSchedules id={id} scheduleType={scheduleType} />\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</CardHeader>\n\t\t\t<CardContent className=\"px-0\">\n\t\t\t\t{isLoadingSchedules ? (\n\t\t\t\t\t<div className=\"flex gap-4 w-full items-center justify-center text-center mx-auto min-h-[45vh]\">\n\t\t\t\t\t\t<Loader2 className=\"size-4 text-muted-foreground/70 transition-colors animate-spin self-center\" />\n\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground/70\">\n\t\t\t\t\t\t\tLoading scheduled tasks...\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t) : schedules && schedules.length > 0 ? (\n\t\t\t\t\t<div className=\"grid xl:grid-cols-2 gap-4 grid-cols-1 h-full\">\n\t\t\t\t\t\t{schedules.map((schedule) => {\n\t\t\t\t\t\t\tconst serverId =\n\t\t\t\t\t\t\t\tschedule.serverId ||\n\t\t\t\t\t\t\t\tschedule.application?.serverId ||\n\t\t\t\t\t\t\t\tschedule.compose?.serverId;\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tkey={schedule.scheduleId}\n\t\t\t\t\t\t\t\t\tclassName=\"flex flex-col sm:flex-row sm:items-center flex-wrap sm:flex-nowrap gap-y-2 justify-between rounded-lg border p-3 transition-colors bg-muted/50 w-full\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<div className=\"flex items-start gap-3 w-full sm:w-auto\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-shrink-0 h-9 w-9 items-center justify-center rounded-full bg-primary/5\">\n\t\t\t\t\t\t\t\t\t\t\t<Clock className=\"size-4 text-primary/70\" />\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-1.5 w-full sm:w-auto\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2 flex-wrap\">\n\t\t\t\t\t\t\t\t\t\t\t\t<h3 className=\"text-sm font-medium leading-none [overflow-wrap:anywhere] line-clamp-3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{schedule.name}\n\t\t\t\t\t\t\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant={schedule.enabled ? \"default\" : \"secondary\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-[10px] px-1 py-0\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{schedule.enabled ? \"Enabled\" : \"Disabled\"}\n\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2 text-sm text-muted-foreground flex-wrap\">\n\t\t\t\t\t\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"font-mono text-[10px] bg-transparent\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\tCron: {schedule.cronExpression}\n\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t\t{schedule.scheduleType !== \"server\" &&\n\t\t\t\t\t\t\t\t\t\t\t\t\tschedule.scheduleType !== \"dokploy-server\" && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-xs text-muted-foreground/50\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t•\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"font-mono text-[10px] bg-transparent\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{schedule.shellType}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t{schedule.command && (\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-start gap-2 max-w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Terminal className=\"size-3.5 text-muted-foreground/70 flex-shrink-0 mt-0.5\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t<code className=\"font-mono text-[10px] text-muted-foreground/70 break-all max-w-[calc(100%-20px)]\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{schedule.command}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</code>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-0.5 md:gap-1.5\">\n\t\t\t\t\t\t\t\t\t\t<ShowDeploymentsModal\n\t\t\t\t\t\t\t\t\t\t\tid={schedule.scheduleId}\n\t\t\t\t\t\t\t\t\t\t\ttype=\"schedule\"\n\t\t\t\t\t\t\t\t\t\t\tserverId={serverId || undefined}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<Button variant=\"ghost\" size=\"icon\">\n\t\t\t\t\t\t\t\t\t\t\t\t<ClipboardList className=\"size-4 transition-colors\" />\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t</ShowDeploymentsModal>\n\t\t\t\t\t\t\t\t\t\t<TooltipProvider delayDuration={0}>\n\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisabled={runningSchedules.has(schedule.scheduleId)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thandleRunManually(schedule.scheduleId)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{runningSchedules.has(schedule.scheduleId) ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Loader2 className=\"size-4 animate-spin\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Play className=\"size-4 transition-colors\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent>Run Manual Schedule</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t<HandleSchedules\n\t\t\t\t\t\t\t\t\t\t\tscheduleId={schedule.scheduleId}\n\t\t\t\t\t\t\t\t\t\t\tid={id}\n\t\t\t\t\t\t\t\t\t\t\tscheduleType={scheduleType}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\t\ttitle=\"Delete Schedule\"\n\t\t\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to delete this schedule?\"\n\t\t\t\t\t\t\t\t\t\t\ttype=\"destructive\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\tawait deleteSchedule({\n\t\t\t\t\t\t\t\t\t\t\t\t\tscheduleId: schedule.scheduleId,\n\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tutils.schedule.list.invalidate({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tid,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tscheduleType,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Schedule deleted successfully\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error deleting schedule\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"group hover:bg-red-500/10\"\n\t\t\t\t\t\t\t\t\t\t\t\tdisabled={isDeleting}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<Trash2 className=\"size-4 text-primary group-hover:text-red-500\" />\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t})}\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<div className=\"flex flex-col gap-2 items-center justify-center py-12 rounded-lg\">\n\t\t\t\t\t\t<Clock className=\"size-8 mb-4 text-muted-foreground\" />\n\t\t\t\t\t\t<p className=\"text-lg font-medium text-muted-foreground\">\n\t\t\t\t\t\t\tNo scheduled tasks\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground mt-1\">\n\t\t\t\t\t\t\tCreate your first scheduled task to automate your workflows\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<HandleSchedules id={id} scheduleType={scheduleType} />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</CardContent>\n\t\t</Card>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/schedules/timezones.ts",
    "content": "// Complete list of IANA timezones grouped by region\nexport const TIMEZONES: Record<\n\tstring,\n\tArray<{ label: string; value: string }>\n> = {\n\tCommon: [{ label: \"UTC (Coordinated Universal Time)\", value: \"UTC\" }],\n\tAfrica: [\n\t\t{ label: \"Abidjan\", value: \"Africa/Abidjan\" },\n\t\t{ label: \"Accra\", value: \"Africa/Accra\" },\n\t\t{ label: \"Addis Ababa\", value: \"Africa/Addis_Ababa\" },\n\t\t{ label: \"Algiers\", value: \"Africa/Algiers\" },\n\t\t{ label: \"Asmara\", value: \"Africa/Asmara\" },\n\t\t{ label: \"Bamako\", value: \"Africa/Bamako\" },\n\t\t{ label: \"Bangui\", value: \"Africa/Bangui\" },\n\t\t{ label: \"Banjul\", value: \"Africa/Banjul\" },\n\t\t{ label: \"Bissau\", value: \"Africa/Bissau\" },\n\t\t{ label: \"Blantyre\", value: \"Africa/Blantyre\" },\n\t\t{ label: \"Brazzaville\", value: \"Africa/Brazzaville\" },\n\t\t{ label: \"Bujumbura\", value: \"Africa/Bujumbura\" },\n\t\t{ label: \"Cairo\", value: \"Africa/Cairo\" },\n\t\t{ label: \"Casablanca\", value: \"Africa/Casablanca\" },\n\t\t{ label: \"Ceuta\", value: \"Africa/Ceuta\" },\n\t\t{ label: \"Conakry\", value: \"Africa/Conakry\" },\n\t\t{ label: \"Dakar\", value: \"Africa/Dakar\" },\n\t\t{ label: \"Dar es Salaam\", value: \"Africa/Dar_es_Salaam\" },\n\t\t{ label: \"Djibouti\", value: \"Africa/Djibouti\" },\n\t\t{ label: \"Douala\", value: \"Africa/Douala\" },\n\t\t{ label: \"El Aaiun\", value: \"Africa/El_Aaiun\" },\n\t\t{ label: \"Freetown\", value: \"Africa/Freetown\" },\n\t\t{ label: \"Gaborone\", value: \"Africa/Gaborone\" },\n\t\t{ label: \"Harare\", value: \"Africa/Harare\" },\n\t\t{ label: \"Johannesburg\", value: \"Africa/Johannesburg\" },\n\t\t{ label: \"Juba\", value: \"Africa/Juba\" },\n\t\t{ label: \"Kampala\", value: \"Africa/Kampala\" },\n\t\t{ label: \"Khartoum\", value: \"Africa/Khartoum\" },\n\t\t{ label: \"Kigali\", value: \"Africa/Kigali\" },\n\t\t{ label: \"Kinshasa\", value: \"Africa/Kinshasa\" },\n\t\t{ label: \"Lagos\", value: \"Africa/Lagos\" },\n\t\t{ label: \"Libreville\", value: \"Africa/Libreville\" },\n\t\t{ label: \"Lome\", value: \"Africa/Lome\" },\n\t\t{ label: \"Luanda\", value: \"Africa/Luanda\" },\n\t\t{ label: \"Lubumbashi\", value: \"Africa/Lubumbashi\" },\n\t\t{ label: \"Lusaka\", value: \"Africa/Lusaka\" },\n\t\t{ label: \"Malabo\", value: \"Africa/Malabo\" },\n\t\t{ label: \"Maputo\", value: \"Africa/Maputo\" },\n\t\t{ label: \"Maseru\", value: \"Africa/Maseru\" },\n\t\t{ label: \"Mbabane\", value: \"Africa/Mbabane\" },\n\t\t{ label: \"Mogadishu\", value: \"Africa/Mogadishu\" },\n\t\t{ label: \"Monrovia\", value: \"Africa/Monrovia\" },\n\t\t{ label: \"Nairobi\", value: \"Africa/Nairobi\" },\n\t\t{ label: \"Ndjamena\", value: \"Africa/Ndjamena\" },\n\t\t{ label: \"Niamey\", value: \"Africa/Niamey\" },\n\t\t{ label: \"Nouakchott\", value: \"Africa/Nouakchott\" },\n\t\t{ label: \"Ouagadougou\", value: \"Africa/Ouagadougou\" },\n\t\t{ label: \"Porto-Novo\", value: \"Africa/Porto-Novo\" },\n\t\t{ label: \"Sao Tome\", value: \"Africa/Sao_Tome\" },\n\t\t{ label: \"Tripoli\", value: \"Africa/Tripoli\" },\n\t\t{ label: \"Tunis\", value: \"Africa/Tunis\" },\n\t\t{ label: \"Windhoek\", value: \"Africa/Windhoek\" },\n\t],\n\tAmerica: [\n\t\t{ label: \"Adak\", value: \"America/Adak\" },\n\t\t{ label: \"Anchorage\", value: \"America/Anchorage\" },\n\t\t{ label: \"Anguilla\", value: \"America/Anguilla\" },\n\t\t{ label: \"Antigua\", value: \"America/Antigua\" },\n\t\t{ label: \"Araguaina\", value: \"America/Araguaina\" },\n\t\t{\n\t\t\tlabel: \"Argentina/Buenos Aires\",\n\t\t\tvalue: \"America/Argentina/Buenos_Aires\",\n\t\t},\n\t\t{ label: \"Argentina/Catamarca\", value: \"America/Argentina/Catamarca\" },\n\t\t{ label: \"Argentina/Cordoba\", value: \"America/Argentina/Cordoba\" },\n\t\t{ label: \"Argentina/Jujuy\", value: \"America/Argentina/Jujuy\" },\n\t\t{ label: \"Argentina/La Rioja\", value: \"America/Argentina/La_Rioja\" },\n\t\t{ label: \"Argentina/Mendoza\", value: \"America/Argentina/Mendoza\" },\n\t\t{\n\t\t\tlabel: \"Argentina/Rio Gallegos\",\n\t\t\tvalue: \"America/Argentina/Rio_Gallegos\",\n\t\t},\n\t\t{ label: \"Argentina/Salta\", value: \"America/Argentina/Salta\" },\n\t\t{ label: \"Argentina/San Juan\", value: \"America/Argentina/San_Juan\" },\n\t\t{ label: \"Argentina/San Luis\", value: \"America/Argentina/San_Luis\" },\n\t\t{ label: \"Argentina/Tucuman\", value: \"America/Argentina/Tucuman\" },\n\t\t{ label: \"Argentina/Ushuaia\", value: \"America/Argentina/Ushuaia\" },\n\t\t{ label: \"Aruba\", value: \"America/Aruba\" },\n\t\t{ label: \"Asuncion\", value: \"America/Asuncion\" },\n\t\t{ label: \"Atikokan\", value: \"America/Atikokan\" },\n\t\t{ label: \"Bahia\", value: \"America/Bahia\" },\n\t\t{ label: \"Bahia Banderas\", value: \"America/Bahia_Banderas\" },\n\t\t{ label: \"Barbados\", value: \"America/Barbados\" },\n\t\t{ label: \"Belem\", value: \"America/Belem\" },\n\t\t{ label: \"Belize\", value: \"America/Belize\" },\n\t\t{ label: \"Blanc-Sablon\", value: \"America/Blanc-Sablon\" },\n\t\t{ label: \"Boa Vista\", value: \"America/Boa_Vista\" },\n\t\t{ label: \"Bogota\", value: \"America/Bogota\" },\n\t\t{ label: \"Boise\", value: \"America/Boise\" },\n\t\t{ label: \"Cambridge Bay\", value: \"America/Cambridge_Bay\" },\n\t\t{ label: \"Campo Grande\", value: \"America/Campo_Grande\" },\n\t\t{ label: \"Cancun\", value: \"America/Cancun\" },\n\t\t{ label: \"Caracas\", value: \"America/Caracas\" },\n\t\t{ label: \"Cayenne\", value: \"America/Cayenne\" },\n\t\t{ label: \"Cayman\", value: \"America/Cayman\" },\n\t\t{ label: \"Chicago (Central Time)\", value: \"America/Chicago\" },\n\t\t{ label: \"Chihuahua\", value: \"America/Chihuahua\" },\n\t\t{ label: \"Ciudad Juarez\", value: \"America/Ciudad_Juarez\" },\n\t\t{ label: \"Costa Rica\", value: \"America/Costa_Rica\" },\n\t\t{ label: \"Creston\", value: \"America/Creston\" },\n\t\t{ label: \"Cuiaba\", value: \"America/Cuiaba\" },\n\t\t{ label: \"Curacao\", value: \"America/Curacao\" },\n\t\t{ label: \"Danmarkshavn\", value: \"America/Danmarkshavn\" },\n\t\t{ label: \"Dawson\", value: \"America/Dawson\" },\n\t\t{ label: \"Dawson Creek\", value: \"America/Dawson_Creek\" },\n\t\t{ label: \"Denver (Mountain Time)\", value: \"America/Denver\" },\n\t\t{ label: \"Detroit\", value: \"America/Detroit\" },\n\t\t{ label: \"Dominica\", value: \"America/Dominica\" },\n\t\t{ label: \"Edmonton\", value: \"America/Edmonton\" },\n\t\t{ label: \"Eirunepe\", value: \"America/Eirunepe\" },\n\t\t{ label: \"El Salvador\", value: \"America/El_Salvador\" },\n\t\t{ label: \"Fort Nelson\", value: \"America/Fort_Nelson\" },\n\t\t{ label: \"Fortaleza\", value: \"America/Fortaleza\" },\n\t\t{ label: \"Glace Bay\", value: \"America/Glace_Bay\" },\n\t\t{ label: \"Goose Bay\", value: \"America/Goose_Bay\" },\n\t\t{ label: \"Grand Turk\", value: \"America/Grand_Turk\" },\n\t\t{ label: \"Grenada\", value: \"America/Grenada\" },\n\t\t{ label: \"Guadeloupe\", value: \"America/Guadeloupe\" },\n\t\t{ label: \"Guatemala\", value: \"America/Guatemala\" },\n\t\t{ label: \"Guayaquil\", value: \"America/Guayaquil\" },\n\t\t{ label: \"Guyana\", value: \"America/Guyana\" },\n\t\t{ label: \"Halifax\", value: \"America/Halifax\" },\n\t\t{ label: \"Havana\", value: \"America/Havana\" },\n\t\t{ label: \"Hermosillo\", value: \"America/Hermosillo\" },\n\t\t{ label: \"Indiana/Indianapolis\", value: \"America/Indiana/Indianapolis\" },\n\t\t{ label: \"Indiana/Knox\", value: \"America/Indiana/Knox\" },\n\t\t{ label: \"Indiana/Marengo\", value: \"America/Indiana/Marengo\" },\n\t\t{ label: \"Indiana/Petersburg\", value: \"America/Indiana/Petersburg\" },\n\t\t{ label: \"Indiana/Tell City\", value: \"America/Indiana/Tell_City\" },\n\t\t{ label: \"Indiana/Vevay\", value: \"America/Indiana/Vevay\" },\n\t\t{ label: \"Indiana/Vincennes\", value: \"America/Indiana/Vincennes\" },\n\t\t{ label: \"Indiana/Winamac\", value: \"America/Indiana/Winamac\" },\n\t\t{ label: \"Inuvik\", value: \"America/Inuvik\" },\n\t\t{ label: \"Iqaluit\", value: \"America/Iqaluit\" },\n\t\t{ label: \"Jamaica\", value: \"America/Jamaica\" },\n\t\t{ label: \"Juneau\", value: \"America/Juneau\" },\n\t\t{ label: \"Kentucky/Louisville\", value: \"America/Kentucky/Louisville\" },\n\t\t{ label: \"Kentucky/Monticello\", value: \"America/Kentucky/Monticello\" },\n\t\t{ label: \"Kralendijk\", value: \"America/Kralendijk\" },\n\t\t{ label: \"La Paz\", value: \"America/La_Paz\" },\n\t\t{ label: \"Lima\", value: \"America/Lima\" },\n\t\t{ label: \"Los Angeles (Pacific Time)\", value: \"America/Los_Angeles\" },\n\t\t{ label: \"Lower Princes\", value: \"America/Lower_Princes\" },\n\t\t{ label: \"Maceio\", value: \"America/Maceio\" },\n\t\t{ label: \"Managua\", value: \"America/Managua\" },\n\t\t{ label: \"Manaus\", value: \"America/Manaus\" },\n\t\t{ label: \"Marigot\", value: \"America/Marigot\" },\n\t\t{ label: \"Martinique\", value: \"America/Martinique\" },\n\t\t{ label: \"Matamoros\", value: \"America/Matamoros\" },\n\t\t{ label: \"Mazatlan\", value: \"America/Mazatlan\" },\n\t\t{ label: \"Menominee\", value: \"America/Menominee\" },\n\t\t{ label: \"Merida\", value: \"America/Merida\" },\n\t\t{ label: \"Metlakatla\", value: \"America/Metlakatla\" },\n\t\t{ label: \"Mexico City (Central Mexico)\", value: \"America/Mexico_City\" },\n\t\t{ label: \"Miquelon\", value: \"America/Miquelon\" },\n\t\t{ label: \"Moncton\", value: \"America/Moncton\" },\n\t\t{ label: \"Monterrey\", value: \"America/Monterrey\" },\n\t\t{ label: \"Montevideo\", value: \"America/Montevideo\" },\n\t\t{ label: \"Montserrat\", value: \"America/Montserrat\" },\n\t\t{ label: \"Nassau\", value: \"America/Nassau\" },\n\t\t{ label: \"New York (Eastern Time)\", value: \"America/New_York\" },\n\t\t{ label: \"Nome\", value: \"America/Nome\" },\n\t\t{ label: \"Noronha\", value: \"America/Noronha\" },\n\t\t{ label: \"North Dakota/Beulah\", value: \"America/North_Dakota/Beulah\" },\n\t\t{ label: \"North Dakota/Center\", value: \"America/North_Dakota/Center\" },\n\t\t{\n\t\t\tlabel: \"North Dakota/New Salem\",\n\t\t\tvalue: \"America/North_Dakota/New_Salem\",\n\t\t},\n\t\t{ label: \"Nuuk\", value: \"America/Nuuk\" },\n\t\t{ label: \"Ojinaga\", value: \"America/Ojinaga\" },\n\t\t{ label: \"Panama\", value: \"America/Panama\" },\n\t\t{ label: \"Paramaribo\", value: \"America/Paramaribo\" },\n\t\t{ label: \"Phoenix\", value: \"America/Phoenix\" },\n\t\t{ label: \"Port-au-Prince\", value: \"America/Port-au-Prince\" },\n\t\t{ label: \"Port of Spain\", value: \"America/Port_of_Spain\" },\n\t\t{ label: \"Porto Velho\", value: \"America/Porto_Velho\" },\n\t\t{ label: \"Puerto Rico\", value: \"America/Puerto_Rico\" },\n\t\t{ label: \"Punta Arenas\", value: \"America/Punta_Arenas\" },\n\t\t{ label: \"Rankin Inlet\", value: \"America/Rankin_Inlet\" },\n\t\t{ label: \"Recife\", value: \"America/Recife\" },\n\t\t{ label: \"Regina\", value: \"America/Regina\" },\n\t\t{ label: \"Resolute\", value: \"America/Resolute\" },\n\t\t{ label: \"Rio Branco\", value: \"America/Rio_Branco\" },\n\t\t{ label: \"Santarem\", value: \"America/Santarem\" },\n\t\t{ label: \"Santiago\", value: \"America/Santiago\" },\n\t\t{ label: \"Santo Domingo\", value: \"America/Santo_Domingo\" },\n\t\t{ label: \"Sao Paulo (Brasilia Time)\", value: \"America/Sao_Paulo\" },\n\t\t{ label: \"Scoresbysund\", value: \"America/Scoresbysund\" },\n\t\t{ label: \"Sitka\", value: \"America/Sitka\" },\n\t\t{ label: \"St Barthelemy\", value: \"America/St_Barthelemy\" },\n\t\t{ label: \"St Johns\", value: \"America/St_Johns\" },\n\t\t{ label: \"St Kitts\", value: \"America/St_Kitts\" },\n\t\t{ label: \"St Lucia\", value: \"America/St_Lucia\" },\n\t\t{ label: \"St Thomas\", value: \"America/St_Thomas\" },\n\t\t{ label: \"St Vincent\", value: \"America/St_Vincent\" },\n\t\t{ label: \"Swift Current\", value: \"America/Swift_Current\" },\n\t\t{ label: \"Tegucigalpa\", value: \"America/Tegucigalpa\" },\n\t\t{ label: \"Thule\", value: \"America/Thule\" },\n\t\t{ label: \"Tijuana\", value: \"America/Tijuana\" },\n\t\t{ label: \"Toronto\", value: \"America/Toronto\" },\n\t\t{ label: \"Tortola\", value: \"America/Tortola\" },\n\t\t{ label: \"Vancouver\", value: \"America/Vancouver\" },\n\t\t{ label: \"Whitehorse\", value: \"America/Whitehorse\" },\n\t\t{ label: \"Winnipeg\", value: \"America/Winnipeg\" },\n\t\t{ label: \"Yakutat\", value: \"America/Yakutat\" },\n\t],\n\tAntarctica: [\n\t\t{ label: \"Casey\", value: \"Antarctica/Casey\" },\n\t\t{ label: \"Davis\", value: \"Antarctica/Davis\" },\n\t\t{ label: \"DumontDUrville\", value: \"Antarctica/DumontDUrville\" },\n\t\t{ label: \"Macquarie\", value: \"Antarctica/Macquarie\" },\n\t\t{ label: \"Mawson\", value: \"Antarctica/Mawson\" },\n\t\t{ label: \"McMurdo\", value: \"Antarctica/McMurdo\" },\n\t\t{ label: \"Palmer\", value: \"Antarctica/Palmer\" },\n\t\t{ label: \"Rothera\", value: \"Antarctica/Rothera\" },\n\t\t{ label: \"Syowa\", value: \"Antarctica/Syowa\" },\n\t\t{ label: \"Troll\", value: \"Antarctica/Troll\" },\n\t\t{ label: \"Vostok\", value: \"Antarctica/Vostok\" },\n\t],\n\tArctic: [{ label: \"Longyearbyen\", value: \"Arctic/Longyearbyen\" }],\n\tAsia: [\n\t\t{ label: \"Aden\", value: \"Asia/Aden\" },\n\t\t{ label: \"Almaty\", value: \"Asia/Almaty\" },\n\t\t{ label: \"Amman\", value: \"Asia/Amman\" },\n\t\t{ label: \"Anadyr\", value: \"Asia/Anadyr\" },\n\t\t{ label: \"Aqtau\", value: \"Asia/Aqtau\" },\n\t\t{ label: \"Aqtobe\", value: \"Asia/Aqtobe\" },\n\t\t{ label: \"Ashgabat\", value: \"Asia/Ashgabat\" },\n\t\t{ label: \"Atyrau\", value: \"Asia/Atyrau\" },\n\t\t{ label: \"Baghdad\", value: \"Asia/Baghdad\" },\n\t\t{ label: \"Bahrain\", value: \"Asia/Bahrain\" },\n\t\t{ label: \"Baku\", value: \"Asia/Baku\" },\n\t\t{ label: \"Bangkok\", value: \"Asia/Bangkok\" },\n\t\t{ label: \"Barnaul\", value: \"Asia/Barnaul\" },\n\t\t{ label: \"Beirut\", value: \"Asia/Beirut\" },\n\t\t{ label: \"Bishkek\", value: \"Asia/Bishkek\" },\n\t\t{ label: \"Brunei\", value: \"Asia/Brunei\" },\n\t\t{ label: \"Chita\", value: \"Asia/Chita\" },\n\t\t{ label: \"Choibalsan\", value: \"Asia/Choibalsan\" },\n\t\t{ label: \"Colombo\", value: \"Asia/Colombo\" },\n\t\t{ label: \"Damascus\", value: \"Asia/Damascus\" },\n\t\t{ label: \"Dhaka\", value: \"Asia/Dhaka\" },\n\t\t{ label: \"Dili\", value: \"Asia/Dili\" },\n\t\t{ label: \"Dubai (Gulf Standard Time)\", value: \"Asia/Dubai\" },\n\t\t{ label: \"Dushanbe\", value: \"Asia/Dushanbe\" },\n\t\t{ label: \"Famagusta\", value: \"Asia/Famagusta\" },\n\t\t{ label: \"Gaza\", value: \"Asia/Gaza\" },\n\t\t{ label: \"Hebron\", value: \"Asia/Hebron\" },\n\t\t{ label: \"Ho Chi Minh\", value: \"Asia/Ho_Chi_Minh\" },\n\t\t{ label: \"Hong Kong\", value: \"Asia/Hong_Kong\" },\n\t\t{ label: \"Hovd\", value: \"Asia/Hovd\" },\n\t\t{ label: \"Irkutsk\", value: \"Asia/Irkutsk\" },\n\t\t{ label: \"Jakarta\", value: \"Asia/Jakarta\" },\n\t\t{ label: \"Jayapura\", value: \"Asia/Jayapura\" },\n\t\t{ label: \"Jerusalem\", value: \"Asia/Jerusalem\" },\n\t\t{ label: \"Kabul\", value: \"Asia/Kabul\" },\n\t\t{ label: \"Kamchatka\", value: \"Asia/Kamchatka\" },\n\t\t{ label: \"Karachi\", value: \"Asia/Karachi\" },\n\t\t{ label: \"Kathmandu\", value: \"Asia/Kathmandu\" },\n\t\t{ label: \"Khandyga\", value: \"Asia/Khandyga\" },\n\t\t{ label: \"Kolkata (India Standard Time)\", value: \"Asia/Kolkata\" },\n\t\t{ label: \"Krasnoyarsk\", value: \"Asia/Krasnoyarsk\" },\n\t\t{ label: \"Kuala Lumpur\", value: \"Asia/Kuala_Lumpur\" },\n\t\t{ label: \"Kuching\", value: \"Asia/Kuching\" },\n\t\t{ label: \"Kuwait\", value: \"Asia/Kuwait\" },\n\t\t{ label: \"Macau\", value: \"Asia/Macau\" },\n\t\t{ label: \"Magadan\", value: \"Asia/Magadan\" },\n\t\t{ label: \"Makassar\", value: \"Asia/Makassar\" },\n\t\t{ label: \"Manila\", value: \"Asia/Manila\" },\n\t\t{ label: \"Muscat\", value: \"Asia/Muscat\" },\n\t\t{ label: \"Nicosia\", value: \"Asia/Nicosia\" },\n\t\t{ label: \"Novokuznetsk\", value: \"Asia/Novokuznetsk\" },\n\t\t{ label: \"Novosibirsk\", value: \"Asia/Novosibirsk\" },\n\t\t{ label: \"Omsk\", value: \"Asia/Omsk\" },\n\t\t{ label: \"Oral\", value: \"Asia/Oral\" },\n\t\t{ label: \"Phnom Penh\", value: \"Asia/Phnom_Penh\" },\n\t\t{ label: \"Pontianak\", value: \"Asia/Pontianak\" },\n\t\t{ label: \"Pyongyang\", value: \"Asia/Pyongyang\" },\n\t\t{ label: \"Qatar\", value: \"Asia/Qatar\" },\n\t\t{ label: \"Qostanay\", value: \"Asia/Qostanay\" },\n\t\t{ label: \"Qyzylorda\", value: \"Asia/Qyzylorda\" },\n\t\t{ label: \"Riyadh\", value: \"Asia/Riyadh\" },\n\t\t{ label: \"Sakhalin\", value: \"Asia/Sakhalin\" },\n\t\t{ label: \"Samarkand\", value: \"Asia/Samarkand\" },\n\t\t{ label: \"Seoul\", value: \"Asia/Seoul\" },\n\t\t{ label: \"Shanghai (China Standard Time)\", value: \"Asia/Shanghai\" },\n\t\t{ label: \"Singapore\", value: \"Asia/Singapore\" },\n\t\t{ label: \"Srednekolymsk\", value: \"Asia/Srednekolymsk\" },\n\t\t{ label: \"Taipei\", value: \"Asia/Taipei\" },\n\t\t{ label: \"Tashkent\", value: \"Asia/Tashkent\" },\n\t\t{ label: \"Tbilisi\", value: \"Asia/Tbilisi\" },\n\t\t{ label: \"Tehran\", value: \"Asia/Tehran\" },\n\t\t{ label: \"Thimphu\", value: \"Asia/Thimphu\" },\n\t\t{ label: \"Tokyo (Japan Standard Time)\", value: \"Asia/Tokyo\" },\n\t\t{ label: \"Tomsk\", value: \"Asia/Tomsk\" },\n\t\t{ label: \"Ulaanbaatar\", value: \"Asia/Ulaanbaatar\" },\n\t\t{ label: \"Urumqi\", value: \"Asia/Urumqi\" },\n\t\t{ label: \"Ust-Nera\", value: \"Asia/Ust-Nera\" },\n\t\t{ label: \"Vientiane\", value: \"Asia/Vientiane\" },\n\t\t{ label: \"Vladivostok\", value: \"Asia/Vladivostok\" },\n\t\t{ label: \"Yakutsk\", value: \"Asia/Yakutsk\" },\n\t\t{ label: \"Yangon\", value: \"Asia/Yangon\" },\n\t\t{ label: \"Yekaterinburg\", value: \"Asia/Yekaterinburg\" },\n\t\t{ label: \"Yerevan\", value: \"Asia/Yerevan\" },\n\t],\n\tAtlantic: [\n\t\t{ label: \"Azores\", value: \"Atlantic/Azores\" },\n\t\t{ label: \"Bermuda\", value: \"Atlantic/Bermuda\" },\n\t\t{ label: \"Canary\", value: \"Atlantic/Canary\" },\n\t\t{ label: \"Cape Verde\", value: \"Atlantic/Cape_Verde\" },\n\t\t{ label: \"Faroe\", value: \"Atlantic/Faroe\" },\n\t\t{ label: \"Madeira\", value: \"Atlantic/Madeira\" },\n\t\t{ label: \"Reykjavik\", value: \"Atlantic/Reykjavik\" },\n\t\t{ label: \"South Georgia\", value: \"Atlantic/South_Georgia\" },\n\t\t{ label: \"St Helena\", value: \"Atlantic/St_Helena\" },\n\t\t{ label: \"Stanley\", value: \"Atlantic/Stanley\" },\n\t],\n\tAustralia: [\n\t\t{ label: \"Adelaide\", value: \"Australia/Adelaide\" },\n\t\t{ label: \"Brisbane\", value: \"Australia/Brisbane\" },\n\t\t{ label: \"Broken Hill\", value: \"Australia/Broken_Hill\" },\n\t\t{ label: \"Darwin\", value: \"Australia/Darwin\" },\n\t\t{ label: \"Eucla\", value: \"Australia/Eucla\" },\n\t\t{ label: \"Hobart\", value: \"Australia/Hobart\" },\n\t\t{ label: \"Lindeman\", value: \"Australia/Lindeman\" },\n\t\t{ label: \"Lord Howe\", value: \"Australia/Lord_Howe\" },\n\t\t{ label: \"Melbourne\", value: \"Australia/Melbourne\" },\n\t\t{ label: \"Perth\", value: \"Australia/Perth\" },\n\t\t{ label: \"Sydney (Australian Eastern Time)\", value: \"Australia/Sydney\" },\n\t],\n\tEurope: [\n\t\t{ label: \"Amsterdam\", value: \"Europe/Amsterdam\" },\n\t\t{ label: \"Andorra\", value: \"Europe/Andorra\" },\n\t\t{ label: \"Astrakhan\", value: \"Europe/Astrakhan\" },\n\t\t{ label: \"Athens\", value: \"Europe/Athens\" },\n\t\t{ label: \"Belgrade\", value: \"Europe/Belgrade\" },\n\t\t{ label: \"Berlin (Central European Time)\", value: \"Europe/Berlin\" },\n\t\t{ label: \"Bratislava\", value: \"Europe/Bratislava\" },\n\t\t{ label: \"Brussels\", value: \"Europe/Brussels\" },\n\t\t{ label: \"Bucharest\", value: \"Europe/Bucharest\" },\n\t\t{ label: \"Budapest\", value: \"Europe/Budapest\" },\n\t\t{ label: \"Busingen\", value: \"Europe/Busingen\" },\n\t\t{ label: \"Chisinau\", value: \"Europe/Chisinau\" },\n\t\t{ label: \"Copenhagen\", value: \"Europe/Copenhagen\" },\n\t\t{ label: \"Dublin\", value: \"Europe/Dublin\" },\n\t\t{ label: \"Gibraltar\", value: \"Europe/Gibraltar\" },\n\t\t{ label: \"Guernsey\", value: \"Europe/Guernsey\" },\n\t\t{ label: \"Helsinki\", value: \"Europe/Helsinki\" },\n\t\t{ label: \"Isle of Man\", value: \"Europe/Isle_of_Man\" },\n\t\t{ label: \"Istanbul\", value: \"Europe/Istanbul\" },\n\t\t{ label: \"Jersey\", value: \"Europe/Jersey\" },\n\t\t{ label: \"Kaliningrad\", value: \"Europe/Kaliningrad\" },\n\t\t{ label: \"Kirov\", value: \"Europe/Kirov\" },\n\t\t{ label: \"Kyiv\", value: \"Europe/Kyiv\" },\n\t\t{ label: \"Lisbon\", value: \"Europe/Lisbon\" },\n\t\t{ label: \"Ljubljana\", value: \"Europe/Ljubljana\" },\n\t\t{ label: \"London (Greenwich Mean Time)\", value: \"Europe/London\" },\n\t\t{ label: \"Luxembourg\", value: \"Europe/Luxembourg\" },\n\t\t{ label: \"Madrid\", value: \"Europe/Madrid\" },\n\t\t{ label: \"Malta\", value: \"Europe/Malta\" },\n\t\t{ label: \"Mariehamn\", value: \"Europe/Mariehamn\" },\n\t\t{ label: \"Minsk\", value: \"Europe/Minsk\" },\n\t\t{ label: \"Monaco\", value: \"Europe/Monaco\" },\n\t\t{ label: \"Moscow\", value: \"Europe/Moscow\" },\n\t\t{ label: \"Oslo\", value: \"Europe/Oslo\" },\n\t\t{ label: \"Paris (Central European Time)\", value: \"Europe/Paris\" },\n\t\t{ label: \"Podgorica\", value: \"Europe/Podgorica\" },\n\t\t{ label: \"Prague\", value: \"Europe/Prague\" },\n\t\t{ label: \"Riga\", value: \"Europe/Riga\" },\n\t\t{ label: \"Rome\", value: \"Europe/Rome\" },\n\t\t{ label: \"Samara\", value: \"Europe/Samara\" },\n\t\t{ label: \"San Marino\", value: \"Europe/San_Marino\" },\n\t\t{ label: \"Sarajevo\", value: \"Europe/Sarajevo\" },\n\t\t{ label: \"Saratov\", value: \"Europe/Saratov\" },\n\t\t{ label: \"Simferopol\", value: \"Europe/Simferopol\" },\n\t\t{ label: \"Skopje\", value: \"Europe/Skopje\" },\n\t\t{ label: \"Sofia\", value: \"Europe/Sofia\" },\n\t\t{ label: \"Stockholm\", value: \"Europe/Stockholm\" },\n\t\t{ label: \"Tallinn\", value: \"Europe/Tallinn\" },\n\t\t{ label: \"Tirane\", value: \"Europe/Tirane\" },\n\t\t{ label: \"Ulyanovsk\", value: \"Europe/Ulyanovsk\" },\n\t\t{ label: \"Vaduz\", value: \"Europe/Vaduz\" },\n\t\t{ label: \"Vatican\", value: \"Europe/Vatican\" },\n\t\t{ label: \"Vienna\", value: \"Europe/Vienna\" },\n\t\t{ label: \"Vilnius\", value: \"Europe/Vilnius\" },\n\t\t{ label: \"Volgograd\", value: \"Europe/Volgograd\" },\n\t\t{ label: \"Warsaw\", value: \"Europe/Warsaw\" },\n\t\t{ label: \"Zagreb\", value: \"Europe/Zagreb\" },\n\t\t{ label: \"Zurich\", value: \"Europe/Zurich\" },\n\t],\n\tIndian: [\n\t\t{ label: \"Antananarivo\", value: \"Indian/Antananarivo\" },\n\t\t{ label: \"Chagos\", value: \"Indian/Chagos\" },\n\t\t{ label: \"Christmas\", value: \"Indian/Christmas\" },\n\t\t{ label: \"Cocos\", value: \"Indian/Cocos\" },\n\t\t{ label: \"Comoro\", value: \"Indian/Comoro\" },\n\t\t{ label: \"Kerguelen\", value: \"Indian/Kerguelen\" },\n\t\t{ label: \"Mahe\", value: \"Indian/Mahe\" },\n\t\t{ label: \"Maldives\", value: \"Indian/Maldives\" },\n\t\t{ label: \"Mauritius\", value: \"Indian/Mauritius\" },\n\t\t{ label: \"Mayotte\", value: \"Indian/Mayotte\" },\n\t\t{ label: \"Reunion\", value: \"Indian/Reunion\" },\n\t],\n\tPacific: [\n\t\t{ label: \"Apia\", value: \"Pacific/Apia\" },\n\t\t{ label: \"Auckland\", value: \"Pacific/Auckland\" },\n\t\t{ label: \"Bougainville\", value: \"Pacific/Bougainville\" },\n\t\t{ label: \"Chatham\", value: \"Pacific/Chatham\" },\n\t\t{ label: \"Chuuk\", value: \"Pacific/Chuuk\" },\n\t\t{ label: \"Easter\", value: \"Pacific/Easter\" },\n\t\t{ label: \"Efate\", value: \"Pacific/Efate\" },\n\t\t{ label: \"Fakaofo\", value: \"Pacific/Fakaofo\" },\n\t\t{ label: \"Fiji\", value: \"Pacific/Fiji\" },\n\t\t{ label: \"Funafuti\", value: \"Pacific/Funafuti\" },\n\t\t{ label: \"Galapagos\", value: \"Pacific/Galapagos\" },\n\t\t{ label: \"Gambier\", value: \"Pacific/Gambier\" },\n\t\t{ label: \"Guadalcanal\", value: \"Pacific/Guadalcanal\" },\n\t\t{ label: \"Guam\", value: \"Pacific/Guam\" },\n\t\t{ label: \"Honolulu\", value: \"Pacific/Honolulu\" },\n\t\t{ label: \"Kanton\", value: \"Pacific/Kanton\" },\n\t\t{ label: \"Kiritimati\", value: \"Pacific/Kiritimati\" },\n\t\t{ label: \"Kosrae\", value: \"Pacific/Kosrae\" },\n\t\t{ label: \"Kwajalein\", value: \"Pacific/Kwajalein\" },\n\t\t{ label: \"Majuro\", value: \"Pacific/Majuro\" },\n\t\t{ label: \"Marquesas\", value: \"Pacific/Marquesas\" },\n\t\t{ label: \"Midway\", value: \"Pacific/Midway\" },\n\t\t{ label: \"Nauru\", value: \"Pacific/Nauru\" },\n\t\t{ label: \"Niue\", value: \"Pacific/Niue\" },\n\t\t{ label: \"Norfolk\", value: \"Pacific/Norfolk\" },\n\t\t{ label: \"Noumea\", value: \"Pacific/Noumea\" },\n\t\t{ label: \"Pago Pago\", value: \"Pacific/Pago_Pago\" },\n\t\t{ label: \"Palau\", value: \"Pacific/Palau\" },\n\t\t{ label: \"Pitcairn\", value: \"Pacific/Pitcairn\" },\n\t\t{ label: \"Pohnpei\", value: \"Pacific/Pohnpei\" },\n\t\t{ label: \"Port Moresby\", value: \"Pacific/Port_Moresby\" },\n\t\t{ label: \"Rarotonga\", value: \"Pacific/Rarotonga\" },\n\t\t{ label: \"Saipan\", value: \"Pacific/Saipan\" },\n\t\t{ label: \"Tahiti\", value: \"Pacific/Tahiti\" },\n\t\t{ label: \"Tarawa\", value: \"Pacific/Tarawa\" },\n\t\t{ label: \"Tongatapu\", value: \"Pacific/Tongatapu\" },\n\t\t{ label: \"Wake\", value: \"Pacific/Wake\" },\n\t\t{ label: \"Wallis\", value: \"Pacific/Wallis\" },\n\t],\n};\n\n// Helper to get display label for a timezone value\nexport function getTimezoneLabel(value: string | undefined): string {\n\tif (!value) return \"UTC (default)\";\n\treturn value;\n}\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/update-application.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { PenBoxIcon } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { Textarea } from \"@/components/ui/textarea\";\nimport { api } from \"@/utils/api\";\n\nconst updateApplicationSchema = z.object({\n\tname: z.string().min(1, {\n\t\tmessage: \"Name is required\",\n\t}),\n\tdescription: z.string().optional(),\n});\n\ntype UpdateApplication = z.infer<typeof updateApplicationSchema>;\n\ninterface Props {\n\tapplicationId: string;\n}\n\nexport const UpdateApplication = ({ applicationId }: Props) => {\n\tconst [isOpen, setIsOpen] = useState(false);\n\tconst utils = api.useUtils();\n\tconst { mutateAsync, error, isError, isPending } =\n\t\tapi.application.update.useMutation();\n\tconst { data } = api.application.one.useQuery(\n\t\t{\n\t\t\tapplicationId,\n\t\t},\n\t\t{\n\t\t\tenabled: !!applicationId,\n\t\t},\n\t);\n\tconst form = useForm<UpdateApplication>({\n\t\tdefaultValues: {\n\t\t\tdescription: data?.description ?? \"\",\n\t\t\tname: data?.name ?? \"\",\n\t\t},\n\t\tresolver: zodResolver(updateApplicationSchema),\n\t});\n\tuseEffect(() => {\n\t\tif (data) {\n\t\t\tform.reset({\n\t\t\t\tdescription: data.description ?? \"\",\n\t\t\t\tname: data.name,\n\t\t\t});\n\t\t}\n\t}, [data, form, form.reset]);\n\n\tconst onSubmit = async (formData: UpdateApplication) => {\n\t\tawait mutateAsync({\n\t\t\tname: formData.name,\n\t\t\tapplicationId: applicationId,\n\t\t\tdescription: formData.description || \"\",\n\t\t})\n\t\t\t.then(() => {\n\t\t\t\ttoast.success(\"Application updated successfully\");\n\t\t\t\tutils.application.one.invalidate({\n\t\t\t\t\tapplicationId: applicationId,\n\t\t\t\t});\n\t\t\t\tsetIsOpen(false);\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error updating the Application\");\n\t\t\t})\n\t\t\t.finally(() => {});\n\t};\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\tclassName=\"group hover:bg-blue-500/10 \"\n\t\t\t\t>\n\t\t\t\t\t<PenBoxIcon className=\"size-3.5  text-primary group-hover:text-blue-500\" />\n\t\t\t\t</Button>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-lg\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Modify Application</DialogTitle>\n\t\t\t\t\t<DialogDescription>Update the application data</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t{isError && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\n\t\t\t\t<div className=\"grid gap-4\">\n\t\t\t\t\t<div className=\"grid items-center gap-4\">\n\t\t\t\t\t\t<Form {...form}>\n\t\t\t\t\t\t\t<form\n\t\t\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\t\t\tid=\"hook-form-update-application\"\n\t\t\t\t\t\t\t\tclassName=\"grid w-full gap-4 \"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"name\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Name</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"Vandelay Industries\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"description\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Description</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Textarea\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Description about your project...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"resize-none\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tisLoading={isPending}\n\t\t\t\t\t\t\t\t\t\tform=\"hook-form-update-application\"\n\t\t\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tUpdate\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</DialogFooter>\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t</Form>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/volume-backups/handle-volume-backups.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { DatabaseZap, PenBoxIcon, PlusCircle, RefreshCw } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { Switch } from \"@/components/ui/switch\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { cn } from \"@/lib/utils\";\nimport { api } from \"@/utils/api\";\nimport type { CacheType } from \"../domains/handle-domain\";\nimport { ScheduleFormField } from \"../schedules/handle-schedules\";\n\nconst formSchema = z\n\t.object({\n\t\tname: z.string().min(1, \"Name is required\"),\n\t\tcronExpression: z.string().min(1, \"Cron expression is required\"),\n\t\tvolumeName: z\n\t\t\t.string()\n\t\t\t.min(1, \"Volume name is required\")\n\t\t\t.regex(\n\t\t\t\t/^[a-zA-Z0-9][a-zA-Z0-9_.-]*$/,\n\t\t\t\t\"Invalid volume name. Use letters, numbers, '._-' and start with a letter/number.\",\n\t\t\t),\n\t\tprefix: z.string(),\n\t\tkeepLatestCount: z.coerce\n\t\t\t.number()\n\t\t\t.int()\n\t\t\t.gte(1, \"Must be at least 1\")\n\t\t\t.optional()\n\t\t\t.nullable(),\n\t\tturnOff: z.boolean().default(false),\n\t\tenabled: z.boolean().default(true),\n\t\tserviceType: z.enum([\n\t\t\t\"application\",\n\t\t\t\"compose\",\n\t\t\t\"postgres\",\n\t\t\t\"mariadb\",\n\t\t\t\"mongo\",\n\t\t\t\"mysql\",\n\t\t\t\"redis\",\n\t\t]),\n\t\tserviceName: z.string(),\n\t\tdestinationId: z.string().min(1, \"Destination required\"),\n\t})\n\t.superRefine((data, ctx) => {\n\t\tif (data.serviceType === \"compose\" && !data.serviceName) {\n\t\t\tctx.addIssue({\n\t\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\t\tmessage: \"Service name is required\",\n\t\t\t\tpath: [\"serviceName\"],\n\t\t\t});\n\t\t}\n\n\t\tif (data.serviceType === \"compose\" && !data.serviceName) {\n\t\t\tctx.addIssue({\n\t\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\t\tmessage: \"Service name is required\",\n\t\t\t\tpath: [\"serviceName\"],\n\t\t\t});\n\t\t}\n\t});\n\ninterface Props {\n\tid?: string;\n\tvolumeBackupId?: string;\n\tvolumeBackupType?:\n\t\t| \"application\"\n\t\t| \"compose\"\n\t\t| \"postgres\"\n\t\t| \"mariadb\"\n\t\t| \"mongo\"\n\t\t| \"mysql\"\n\t\t| \"redis\";\n}\n\nexport const HandleVolumeBackups = ({\n\tid,\n\tvolumeBackupId,\n\tvolumeBackupType,\n}: Props) => {\n\tconst [isOpen, setIsOpen] = useState(false);\n\tconst [cacheType, setCacheType] = useState<CacheType>(\"cache\");\n\tconst [keepLatestCountInput, setKeepLatestCountInput] = useState(\"\");\n\n\tconst utils = api.useUtils();\n\tconst form = useForm({\n\t\tresolver: zodResolver(formSchema),\n\t\tdefaultValues: {\n\t\t\tname: \"\",\n\t\t\tcronExpression: \"\",\n\t\t\tvolumeName: \"\",\n\t\t\tprefix: \"\",\n\t\t\tkeepLatestCount: undefined,\n\t\t\tturnOff: false,\n\t\t\tenabled: true,\n\t\t\tserviceName: \"\",\n\t\t\tserviceType: volumeBackupType,\n\t\t},\n\t});\n\n\tconst serviceTypeForm = volumeBackupType;\n\tconst { data: destinations } = api.destination.all.useQuery();\n\tconst { data: volumeBackup } = api.volumeBackups.one.useQuery(\n\t\t{ volumeBackupId: volumeBackupId || \"\" },\n\t\t{ enabled: !!volumeBackupId },\n\t);\n\n\tconst { data: mounts } = api.mounts.allNamedByApplicationId.useQuery(\n\t\t{ applicationId: id || \"\" },\n\t\t{ enabled: !!id && volumeBackupType === \"application\" },\n\t);\n\n\tconst {\n\t\tdata: services,\n\t\tisFetching: isLoadingServices,\n\t\terror: errorServices,\n\t\trefetch: refetchServices,\n\t} = api.compose.loadServices.useQuery(\n\t\t{\n\t\t\tcomposeId: id || \"\",\n\t\t\ttype: cacheType,\n\t\t},\n\t\t{\n\t\t\tretry: false,\n\t\t\trefetchOnWindowFocus: false,\n\t\t\tenabled: !!id && volumeBackupType === \"compose\",\n\t\t},\n\t);\n\n\tconst serviceName = form.watch(\"serviceName\");\n\n\tconst { data: mountsByService } = api.compose.loadMountsByService.useQuery(\n\t\t{\n\t\t\tcomposeId: id || \"\",\n\t\t\tserviceName,\n\t\t},\n\t\t{\n\t\t\tenabled: !!id && volumeBackupType === \"compose\" && !!serviceName,\n\t\t},\n\t);\n\n\tuseEffect(() => {\n\t\tif (volumeBackupId && volumeBackup) {\n\t\t\tform.reset({\n\t\t\t\tname: volumeBackup.name,\n\t\t\t\tcronExpression: volumeBackup.cronExpression,\n\t\t\t\tvolumeName: volumeBackup.volumeName || \"\",\n\t\t\t\tprefix: volumeBackup.prefix,\n\t\t\t\tkeepLatestCount: volumeBackup.keepLatestCount || undefined,\n\t\t\t\tturnOff: volumeBackup.turnOff,\n\t\t\t\tenabled: volumeBackup.enabled || false,\n\t\t\t\tserviceName: volumeBackup.serviceName || \"\",\n\t\t\t\tdestinationId: volumeBackup.destinationId,\n\t\t\t\tserviceType: volumeBackup.serviceType,\n\t\t\t});\n\t\t\tsetKeepLatestCountInput(\n\t\t\t\tvolumeBackup.keepLatestCount !== null &&\n\t\t\t\t\tvolumeBackup.keepLatestCount !== undefined\n\t\t\t\t\t? String(volumeBackup.keepLatestCount)\n\t\t\t\t\t: \"\",\n\t\t\t);\n\t\t}\n\t}, [form, volumeBackup, volumeBackupId]);\n\n\tconst { mutateAsync, isPending } = volumeBackupId\n\t\t? api.volumeBackups.update.useMutation()\n\t\t: api.volumeBackups.create.useMutation();\n\n\tconst onSubmit = async (values: z.infer<typeof formSchema>) => {\n\t\tif (!id && !volumeBackupId) return;\n\n\t\tconst preparedKeepLatestCount =\n\t\t\tkeepLatestCountInput === \"\" ? null : (values.keepLatestCount ?? null);\n\n\t\tawait mutateAsync({\n\t\t\t...values,\n\t\t\tkeepLatestCount: preparedKeepLatestCount ?? undefined,\n\t\t\tdestinationId: values.destinationId,\n\t\t\tvolumeBackupId: volumeBackupId || \"\",\n\t\t\tserviceType: volumeBackupType,\n\t\t\t...(volumeBackupType === \"application\" && {\n\t\t\t\tapplicationId: id || \"\",\n\t\t\t}),\n\t\t\t...(volumeBackupType === \"compose\" && {\n\t\t\t\tcomposeId: id || \"\",\n\t\t\t}),\n\t\t\t...(volumeBackupType === \"postgres\" && {\n\t\t\t\tserverId: id || \"\",\n\t\t\t}),\n\t\t\t...(volumeBackupType === \"postgres\" && {\n\t\t\t\tpostgresId: id || \"\",\n\t\t\t}),\n\t\t\t...(volumeBackupType === \"mariadb\" && {\n\t\t\t\tmariadbId: id || \"\",\n\t\t\t}),\n\t\t\t...(volumeBackupType === \"mongo\" && {\n\t\t\t\tmongoId: id || \"\",\n\t\t\t}),\n\t\t\t...(volumeBackupType === \"mysql\" && {\n\t\t\t\tmysqlId: id || \"\",\n\t\t\t}),\n\t\t\t...(volumeBackupType === \"redis\" && {\n\t\t\t\tredisId: id || \"\",\n\t\t\t}),\n\t\t})\n\t\t\t.then(() => {\n\t\t\t\ttoast.success(\n\t\t\t\t\t`Volume backup ${volumeBackupId ? \"updated\" : \"created\"} successfully`,\n\t\t\t\t);\n\t\t\t\tutils.volumeBackups.list.invalidate({\n\t\t\t\t\tid,\n\t\t\t\t\tvolumeBackupType,\n\t\t\t\t});\n\t\t\t\tsetIsOpen(false);\n\t\t\t})\n\t\t\t.catch((error) => {\n\t\t\t\ttoast.error(\n\t\t\t\t\terror instanceof Error ? error.message : \"An unknown error occurred\",\n\t\t\t\t);\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t{volumeBackupId ? (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\tclassName=\"group hover:bg-blue-500/10\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<PenBoxIcon className=\"size-3.5 text-primary group-hover:text-blue-500\" />\n\t\t\t\t\t</Button>\n\t\t\t\t) : (\n\t\t\t\t\t<Button>\n\t\t\t\t\t\t<PlusCircle className=\"w-4 h-4 mr-2\" />\n\t\t\t\t\t\tAdd Volume Backup\n\t\t\t\t\t</Button>\n\t\t\t\t)}\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent\n\t\t\t\tclassName={cn(\n\t\t\t\t\tvolumeBackupType === \"compose\" || volumeBackupType === \"application\"\n\t\t\t\t\t\t? \"sm:max-w-2xl\"\n\t\t\t\t\t\t: \" sm:max-w-lg\",\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>\n\t\t\t\t\t\t{volumeBackupId ? \"Edit\" : \"Create\"} Volume Backup\n\t\t\t\t\t</DialogTitle>\n\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\tCreate a volume backup to backup your volume to a destination\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form onSubmit={form.handleSubmit(onSubmit)} className=\"space-y-6\">\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"name\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\tTask Name\n\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"Daily Database Backup\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\tA descriptive name for your scheduled task\n\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ScheduleFormField\n\t\t\t\t\t\t\tname=\"cronExpression\"\n\t\t\t\t\t\t\tformControl={form.control}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"destinationId\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Destination</FormLabel>\n\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\tonValueChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\tdefaultValue={field.value}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a destination\" />\n\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t{destinations?.map((destination) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={destination.destinationId}\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={destination.destinationId}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{destination.name}\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\tChoose the backup destination where files will be stored\n\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{serviceTypeForm === \"compose\" && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<div className=\"flex flex-col w-full gap-4\">\n\t\t\t\t\t\t\t\t\t{errorServices && (\n\t\t\t\t\t\t\t\t\t\t<AlertBlock\n\t\t\t\t\t\t\t\t\t\t\ttype=\"warning\"\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"[overflow-wrap:anywhere]\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{errorServices?.message}\n\t\t\t\t\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\tname=\"serviceName\"\n\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t<FormItem className=\"w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Service Name</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonValueChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdefaultValue={field.value || \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a service name\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{services?.map((service, index) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={service}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={`${service}-${index}`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{service}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"none\" disabled>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tEmpty\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipProvider delayDuration={0}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisLoading={isLoadingServices}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (cacheType === \"fetch\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trefetchServices();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetCacheType(\"fetch\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<RefreshCw className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tside=\"left\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsideOffset={5}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"max-w-[10rem]\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFetch: Will clone the repository and load the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tservices\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipProvider delayDuration={0}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisLoading={isLoadingServices}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (cacheType === \"cache\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trefetchServices();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetCacheType(\"cache\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DatabaseZap className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tside=\"left\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsideOffset={5}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"max-w-[10rem]\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCache: If you previously deployed this\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcompose, it will read the services from the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlast deployment/fetch from the repository\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t{mountsByService && mountsByService.length > 0 && (\n\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\tname=\"volumeName\"\n\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Volumes</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\t\t\t\tonValueChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t\tdefaultValue={field.value || \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a volume name\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{mountsByService?.map((volume) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={volume.Name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={volume.Name || \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{volume.Name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\tChoose the volume to backup, if you dont see the\n\t\t\t\t\t\t\t\t\t\t\t\t\tvolume here, you can type the volume name manually\n\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{serviceTypeForm === \"application\" && (\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"volumeName\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Volumes</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\t\tonValueChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\tdefaultValue={field.value || \"\"}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a volume name\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t{mounts?.map((mount) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem key={mount.Name} value={mount.Name || \"\"}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{mount.Name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\tChoose the volume to backup, if you dont see the volume\n\t\t\t\t\t\t\t\t\t\t\there, you can type the volume name manually\n\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"volumeName\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Volume Name</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"my-volume-name\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\tThe name of the Docker volume to backup\n\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"prefix\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Backup Prefix</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"backup-\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\tPrefix for backup files (optional)\n\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"keepLatestCount\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Keep Latest Backups</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\t\t\t\t\t\tmin={1}\n\t\t\t\t\t\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Leave empty to keep all\"\n\t\t\t\t\t\t\t\t\t\t\tvalue={keepLatestCountInput}\n\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\tconst raw = e.target.value;\n\t\t\t\t\t\t\t\t\t\t\t\tsetKeepLatestCountInput(raw);\n\t\t\t\t\t\t\t\t\t\t\t\tif (raw === \"\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(undefined);\n\t\t\t\t\t\t\t\t\t\t\t\t} else if (/^\\d+$/.test(raw)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(Number(raw));\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\tHow many recent backups to keep. Empty means no cleanup.\n\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"turnOff\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\tTurn Off Container During Backup\n\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormDescription className=\"text-amber-600 dark:text-amber-400\">\n\t\t\t\t\t\t\t\t\t\t⚠️ The container will be temporarily stopped during backup to\n\t\t\t\t\t\t\t\t\t\tprevent file corruption. This ensures data integrity but may\n\t\t\t\t\t\t\t\t\t\tcause temporary service interruption.\n\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"enabled\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\tEnabled\n\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<Button type=\"submit\" isLoading={isPending} className=\"w-full\">\n\t\t\t\t\t\t\t{volumeBackupId ? \"Update\" : \"Create\"} Volume Backup\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</form>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/volume-backups/restore-volume-backups.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport copy from \"copy-to-clipboard\";\nimport debounce from \"lodash/debounce\";\nimport { CheckIcon, ChevronsUpDown, Copy, RotateCcw } from \"lucide-react\";\nimport { useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { DrawerLogs } from \"@/components/shared/drawer-logs\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCommand,\n\tCommandEmpty,\n\tCommandGroup,\n\tCommandInput,\n\tCommandItem,\n} from \"@/components/ui/command\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport {\n\tPopover,\n\tPopoverContent,\n\tPopoverTrigger,\n} from \"@/components/ui/popover\";\nimport { ScrollArea } from \"@/components/ui/scroll-area\";\nimport { cn } from \"@/lib/utils\";\nimport { api } from \"@/utils/api\";\nimport { formatBytes } from \"../../database/backups/restore-backup\";\nimport { type LogLine, parseLogs } from \"../../docker/logs/utils\";\n\ninterface Props {\n\tid: string;\n\ttype: \"application\" | \"compose\";\n\tserverId?: string;\n}\n\nconst RestoreBackupSchema = z.object({\n\tdestinationId: z.string().min(1, {\n\t\tmessage: \"Destination is required\",\n\t}),\n\tbackupFile: z.string().min(1, {\n\t\tmessage: \"Backup file is required\",\n\t}),\n\tvolumeName: z.string().min(1, {\n\t\tmessage: \"Volume name is required\",\n\t}),\n});\n\nexport const RestoreVolumeBackups = ({ id, type, serverId }: Props) => {\n\tconst [isOpen, setIsOpen] = useState(false);\n\tconst [search, setSearch] = useState(\"\");\n\tconst [debouncedSearchTerm, setDebouncedSearchTerm] = useState(\"\");\n\n\tconst { data: destinations = [] } = api.destination.all.useQuery();\n\n\tconst form = useForm({\n\t\tdefaultValues: {\n\t\t\tdestinationId: \"\",\n\t\t\tbackupFile: \"\",\n\t\t\tvolumeName: \"\",\n\t\t},\n\t\tresolver: zodResolver(RestoreBackupSchema),\n\t});\n\n\tconst destinationId = form.watch(\"destinationId\");\n\tconst volumeName = form.watch(\"volumeName\");\n\tconst backupFile = form.watch(\"backupFile\");\n\n\tconst debouncedSetSearch = debounce((value: string) => {\n\t\tsetDebouncedSearchTerm(value);\n\t}, 350);\n\n\tconst handleSearchChange = (value: string) => {\n\t\tsetSearch(value);\n\t\tdebouncedSetSearch(value);\n\t};\n\n\tconst { data: files = [], isPending } = api.backup.listBackupFiles.useQuery(\n\t\t{\n\t\t\tdestinationId: destinationId,\n\t\t\tsearch: debouncedSearchTerm,\n\t\t\tserverId: serverId ?? \"\",\n\t\t},\n\t\t{\n\t\t\tenabled: isOpen && !!destinationId,\n\t\t},\n\t);\n\n\tconst [isDrawerOpen, setIsDrawerOpen] = useState(false);\n\tconst [filteredLogs, setFilteredLogs] = useState<LogLine[]>([]);\n\tconst [isDeploying, setIsDeploying] = useState(false);\n\n\tapi.volumeBackups.restoreVolumeBackupWithLogs.useSubscription(\n\t\t{\n\t\t\tid,\n\t\t\tserviceType: type,\n\t\t\tserverId,\n\t\t\tdestinationId,\n\t\t\tvolumeName,\n\t\t\tbackupFileName: backupFile,\n\t\t},\n\t\t{\n\t\t\tenabled: isDeploying,\n\t\t\tonData(log) {\n\t\t\t\tif (!isDrawerOpen) {\n\t\t\t\t\tsetIsDrawerOpen(true);\n\t\t\t\t}\n\n\t\t\t\tif (log === \"Restore completed successfully!\") {\n\t\t\t\t\tsetIsDeploying(false);\n\t\t\t\t}\n\t\t\t\tconst parsedLogs = parseLogs(log);\n\t\t\t\tsetFilteredLogs((prev) => [...prev, ...parsedLogs]);\n\t\t\t},\n\t\t\tonError(error) {\n\t\t\t\tconsole.error(\"Restore logs error:\", error);\n\t\t\t\tsetIsDeploying(false);\n\t\t\t},\n\t\t},\n\t);\n\n\tconst onSubmit = async () => {\n\t\tsetIsDeploying(true);\n\t};\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t<Button variant=\"outline\">\n\t\t\t\t\t<RotateCcw className=\"mr-2 size-4\" />\n\t\t\t\t\tRestore Volume Backup\n\t\t\t\t</Button>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-lg\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle className=\"flex items-center\">\n\t\t\t\t\t\t<RotateCcw className=\"mr-2 size-4\" />\n\t\t\t\t\t\tRestore Volume Backup\n\t\t\t\t\t</DialogTitle>\n\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\tSelect a destination and search for volume backup files\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t\t<AlertBlock>\n\t\t\t\t\t\tMake sure the volume name is not being used by another container.\n\t\t\t\t\t</AlertBlock>\n\t\t\t\t</DialogHeader>\n\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tid=\"hook-form-restore-backup\"\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\tclassName=\"grid w-full gap-4\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"destinationId\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"\">\n\t\t\t\t\t\t\t\t\t<FormLabel>Destination</FormLabel>\n\t\t\t\t\t\t\t\t\t<Popover>\n\t\t\t\t\t\t\t\t\t\t<PopoverTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"w-full justify-between !bg-input\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t!field.value && \"text-muted-foreground\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{field.value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? destinations.find(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(d) => d.destinationId === field.value,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)?.name\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Select Destination\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</PopoverTrigger>\n\t\t\t\t\t\t\t\t\t\t<PopoverContent className=\"p-0\" align=\"start\">\n\t\t\t\t\t\t\t\t\t\t\t<Command>\n\t\t\t\t\t\t\t\t\t\t\t\t<CommandInput\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Search destinations...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-9\"\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t<CommandEmpty>No destinations found.</CommandEmpty>\n\t\t\t\t\t\t\t\t\t\t\t\t<ScrollArea className=\"h-64\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{destinations.map((destination) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={destination.destinationId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={destination.destinationId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"destinationId\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdestination.destinationId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{destination.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CheckIcon\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"ml-auto h-4 w-4\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdestination.destinationId === field.value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"opacity-100\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"opacity-0\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t</ScrollArea>\n\t\t\t\t\t\t\t\t\t\t\t</Command>\n\t\t\t\t\t\t\t\t\t\t</PopoverContent>\n\t\t\t\t\t\t\t\t\t</Popover>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"backupFile\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"\">\n\t\t\t\t\t\t\t\t\t<FormLabel className=\"flex items-center\">\n\t\t\t\t\t\t\t\t\t\tSearch Backup Files\n\t\t\t\t\t\t\t\t\t\t{field.value && (\n\t\t\t\t\t\t\t\t\t\t\t<Badge variant=\"outline\" className=\"truncate w-52\">\n\t\t\t\t\t\t\t\t\t\t\t\t{field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t<Copy\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"ml-2 size-4 cursor-pointer\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcopy(field.value);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Backup file copied to clipboard\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t<Popover modal>\n\t\t\t\t\t\t\t\t\t\t<PopoverTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"w-full justify-between !bg-input\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t!field.value && \"text-muted-foreground\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"truncate text-left flex-1 w-52\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{field.value || \"Search and select a backup file\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</PopoverTrigger>\n\t\t\t\t\t\t\t\t\t\t<PopoverContent className=\"p-0\" align=\"start\">\n\t\t\t\t\t\t\t\t\t\t\t<Command>\n\t\t\t\t\t\t\t\t\t\t\t\t<CommandInput\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Search backup files...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={search}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonValueChange={handleSearchChange}\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-9\"\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t{isPending ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"py-6 text-center text-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLoading backup files...\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t) : files.length === 0 && search ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"py-6 text-center text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tNo backup files found for \"{search}\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t) : files.length === 0 ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"py-6 text-center text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tNo backup files available\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ScrollArea className=\"h-64\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandGroup className=\"w-96\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{files?.map((file) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={file.Path}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={file.Path}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"backupFile\", file.Path);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (file.IsDir) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetSearch(`${file.Path}/`);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetDebouncedSearchTerm(`${file.Path}/`);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetSearch(file.Path);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetDebouncedSearchTerm(file.Path);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex w-full flex-col gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex w-full justify-between\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-medium\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{file.Path}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CheckIcon\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"ml-auto h-4 w-4\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfile.Path === field.value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"opacity-100\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"opacity-0\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-4 text-xs text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSize: {formatBytes(file.Size)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{file.IsDir && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-blue-500\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDirectory\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{file.Hashes?.MD5 && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>MD5: {file.Hashes.MD5}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</ScrollArea>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t</Command>\n\t\t\t\t\t\t\t\t\t\t</PopoverContent>\n\t\t\t\t\t\t\t\t\t</Popover>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"volumeName\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Volume Name</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"Enter volume name\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tisLoading={isDeploying}\n\t\t\t\t\t\t\t\tform=\"hook-form-restore-backup\"\n\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t\t// disabled={\n\t\t\t\t\t\t\t\t// \t!form.watch(\"backupFile\") ||\n\t\t\t\t\t\t\t\t// \t(backupType === \"compose\" && !form.watch(\"databaseType\"))\n\t\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tRestore\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</DialogFooter>\n\t\t\t\t\t</form>\n\t\t\t\t</Form>\n\n\t\t\t\t<DrawerLogs\n\t\t\t\t\tisOpen={isDrawerOpen}\n\t\t\t\t\tonClose={() => {\n\t\t\t\t\t\tsetIsDrawerOpen(false);\n\t\t\t\t\t\tsetFilteredLogs([]);\n\t\t\t\t\t\tsetIsDeploying(false);\n\t\t\t\t\t\t// refetch();\n\t\t\t\t\t}}\n\t\t\t\t\tfilteredLogs={filteredLogs}\n\t\t\t\t/>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/application/volume-backups/show-volume-backups.tsx",
    "content": "import {\n\tClipboardList,\n\tDatabaseBackup,\n\tLoader2,\n\tPlay,\n\tTrash2,\n} from \"lucide-react\";\nimport { useState } from \"react\";\nimport { toast } from \"sonner\";\nimport { DialogAction } from \"@/components/shared/dialog-action\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { api } from \"@/utils/api\";\nimport { ShowDeploymentsModal } from \"../deployments/show-deployments-modal\";\nimport { HandleVolumeBackups } from \"./handle-volume-backups\";\nimport { RestoreVolumeBackups } from \"./restore-volume-backups\";\n\ninterface Props {\n\tid: string;\n\ttype?: \"application\" | \"compose\";\n\tserverId?: string;\n}\n\nexport const ShowVolumeBackups = ({\n\tid,\n\ttype = \"application\",\n\tserverId,\n}: Props) => {\n\tconst [runningBackups, setRunningBackups] = useState<Set<string>>(new Set());\n\tconst {\n\t\tdata: volumeBackups,\n\t\tisLoading: isLoadingVolumeBackups,\n\t\trefetch: refetchVolumeBackups,\n\t} = api.volumeBackups.list.useQuery(\n\t\t{\n\t\t\tid: id || \"\",\n\t\t\tvolumeBackupType: type,\n\t\t},\n\t\t{\n\t\t\tenabled: !!id,\n\t\t},\n\t);\n\tconst utils = api.useUtils();\n\tconst { mutateAsync: deleteVolumeBackup, isPending: isDeleting } =\n\t\tapi.volumeBackups.delete.useMutation();\n\tconst { mutateAsync: runManually } =\n\t\tapi.volumeBackups.runManually.useMutation();\n\n\tconst handleRunManually = async (volumeBackupId: string) => {\n\t\tsetRunningBackups((prev) => new Set(prev).add(volumeBackupId));\n\t\ttry {\n\t\t\tawait runManually({ volumeBackupId });\n\t\t\ttoast.success(\"Volume backup run successfully\");\n\t\t\tawait refetchVolumeBackups();\n\t\t} catch {\n\t\t\ttoast.error(\"Error running volume backup\");\n\t\t} finally {\n\t\t\tsetRunningBackups((prev) => {\n\t\t\t\tconst newSet = new Set(prev);\n\t\t\t\tnewSet.delete(volumeBackupId);\n\t\t\t\treturn newSet;\n\t\t\t});\n\t\t}\n\t};\n\n\treturn (\n\t\t<Card className=\"border px-6 shadow-none bg-transparent h-full min-h-[50vh]\">\n\t\t\t<CardHeader className=\"px-0\">\n\t\t\t\t<div className=\"flex justify-between items-center flex-wrap gap-2\">\n\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t<CardTitle className=\"text-xl font-bold flex items-center gap-2\">\n\t\t\t\t\t\t\tVolume Backups\n\t\t\t\t\t\t</CardTitle>\n\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\tSchedule volume backups to run automatically at specified\n\t\t\t\t\t\t\tintervals\n\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"flex items-center gap-2 flex-wrap\">\n\t\t\t\t\t\t{volumeBackups && volumeBackups.length > 0 && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<HandleVolumeBackups id={id} volumeBackupType={type} />\n\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t<RestoreVolumeBackups\n\t\t\t\t\t\t\t\t\t\tid={id}\n\t\t\t\t\t\t\t\t\t\ttype={type}\n\t\t\t\t\t\t\t\t\t\tserverId={serverId}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</CardHeader>\n\t\t\t<CardContent className=\"px-0\">\n\t\t\t\t{isLoadingVolumeBackups ? (\n\t\t\t\t\t<div className=\"flex gap-4 w-full items-center justify-center text-center mx-auto min-h-[45vh]\">\n\t\t\t\t\t\t<Loader2 className=\"size-4 text-muted-foreground/70 transition-colors animate-spin self-center\" />\n\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground/70\">\n\t\t\t\t\t\t\tLoading volume backups...\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t) : volumeBackups && volumeBackups.length > 0 ? (\n\t\t\t\t\t<div className=\"grid xl:grid-cols-2 gap-4 grid-cols-1 h-full\">\n\t\t\t\t\t\t{volumeBackups.map((volumeBackup) => {\n\t\t\t\t\t\t\tconst serverId =\n\t\t\t\t\t\t\t\tvolumeBackup.application?.serverId ||\n\t\t\t\t\t\t\t\tvolumeBackup.postgres?.serverId ||\n\t\t\t\t\t\t\t\tvolumeBackup.mysql?.serverId ||\n\t\t\t\t\t\t\t\tvolumeBackup.mariadb?.serverId ||\n\t\t\t\t\t\t\t\tvolumeBackup.mongo?.serverId ||\n\t\t\t\t\t\t\t\tvolumeBackup.redis?.serverId ||\n\t\t\t\t\t\t\t\tvolumeBackup.compose?.serverId;\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tkey={volumeBackup.volumeBackupId}\n\t\t\t\t\t\t\t\t\tclassName=\"flex flex-col sm:flex-row sm:items-center flex-wrap sm:flex-nowrap gap-y-2 justify-between rounded-lg border p-3 transition-colors bg-muted/50 w-full\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<div className=\"flex items-start gap-3 w-full sm:w-auto\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex h-9 w-9 items-center justify-center rounded-full bg-primary/5\">\n\t\t\t\t\t\t\t\t\t\t\t<DatabaseBackup className=\"size-4 text-primary/70\" />\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-1.5 w-full sm:w-auto\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t<h3 className=\"text-sm font-medium leading-none\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{volumeBackup.name}\n\t\t\t\t\t\t\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvolumeBackup.enabled ? \"default\" : \"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-[10px] px-1 py-0\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{volumeBackup.enabled ? \"Enabled\" : \"Disabled\"}\n\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2 text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"font-mono text-[10px] bg-transparent\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\tCron: {volumeBackup.cronExpression}\n\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-1.5 mt-2 sm:mt-0 sm:ml-3\">\n\t\t\t\t\t\t\t\t\t\t<ShowDeploymentsModal\n\t\t\t\t\t\t\t\t\t\t\tid={volumeBackup.volumeBackupId}\n\t\t\t\t\t\t\t\t\t\t\ttype=\"volumeBackup\"\n\t\t\t\t\t\t\t\t\t\t\tserverId={serverId || undefined}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<Button variant=\"ghost\" size=\"icon\">\n\t\t\t\t\t\t\t\t\t\t\t\t<ClipboardList className=\"size-4 transition-colors\" />\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t</ShowDeploymentsModal>\n\t\t\t\t\t\t\t\t\t\t<TooltipProvider delayDuration={0}>\n\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisabled={runningBackups.has(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvolumeBackup.volumeBackupId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thandleRunManually(volumeBackup.volumeBackupId)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{runningBackups.has(volumeBackup.volumeBackupId) ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Loader2 className=\"size-4 animate-spin\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Play className=\"size-4 transition-colors\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\tRun Manual Volume Backup\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t<HandleVolumeBackups\n\t\t\t\t\t\t\t\t\t\t\tvolumeBackupId={volumeBackup.volumeBackupId}\n\t\t\t\t\t\t\t\t\t\t\tid={id}\n\t\t\t\t\t\t\t\t\t\t\tvolumeBackupType={type}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\t\ttitle=\"Delete Volume Backup\"\n\t\t\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to delete this volume backup?\"\n\t\t\t\t\t\t\t\t\t\t\ttype=\"destructive\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\tawait deleteVolumeBackup({\n\t\t\t\t\t\t\t\t\t\t\t\t\tvolumeBackupId: volumeBackup.volumeBackupId,\n\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tutils.volumeBackups.list.invalidate({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tid,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvolumeBackupType: type,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Volume backup deleted successfully\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error deleting volume backup\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"group hover:bg-red-500/10\"\n\t\t\t\t\t\t\t\t\t\t\t\tisLoading={isDeleting}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<Trash2 className=\"size-4 text-primary group-hover:text-red-500\" />\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t})}\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<div className=\"flex flex-col gap-2 items-center justify-center py-12 rounded-lg\">\n\t\t\t\t\t\t<DatabaseBackup className=\"size-8 mb-4 text-muted-foreground\" />\n\t\t\t\t\t\t<p className=\"text-lg font-medium text-muted-foreground\">\n\t\t\t\t\t\t\tNo volume backups\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground mt-1\">\n\t\t\t\t\t\t\tCreate your first volume backup to automate your workflows\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t<HandleVolumeBackups id={id} volumeBackupType={type} />\n\t\t\t\t\t\t\t<RestoreVolumeBackups id={id} type={type} serverId={serverId} />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</CardContent>\n\t\t</Card>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/compose/advanced/add-command.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { useEffect } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { api } from \"@/utils/api\";\n\ninterface Props {\n\tcomposeId: string;\n}\n\nconst AddRedirectSchema = z.object({\n\tcommand: z.string(),\n});\n\ntype AddCommand = z.infer<typeof AddRedirectSchema>;\n\nexport const AddCommandCompose = ({ composeId }: Props) => {\n\tconst { data } = api.compose.one.useQuery(\n\t\t{\n\t\t\tcomposeId,\n\t\t},\n\t\t{ enabled: !!composeId },\n\t);\n\n\tconst { data: defaultCommand, refetch } =\n\t\tapi.compose.getDefaultCommand.useQuery(\n\t\t\t{\n\t\t\t\tcomposeId,\n\t\t\t},\n\t\t\t{ enabled: !!composeId },\n\t\t);\n\n\tconst utils = api.useUtils();\n\n\tconst { mutateAsync, isPending } = api.compose.update.useMutation();\n\n\tconst form = useForm<AddCommand>({\n\t\tdefaultValues: {\n\t\t\tcommand: \"\",\n\t\t},\n\t\tresolver: zodResolver(AddRedirectSchema),\n\t});\n\n\tuseEffect(() => {\n\t\tif (data?.command) {\n\t\t\tform.reset({\n\t\t\t\tcommand: data?.command || \"\",\n\t\t\t});\n\t\t}\n\t}, [form, form.reset, form.formState.isSubmitSuccessful, data?.command]);\n\n\tconst onSubmit = async (data: AddCommand) => {\n\t\tawait mutateAsync({\n\t\t\tcomposeId,\n\t\t\tcommand: data?.command,\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(\"Command Updated\");\n\t\t\t\trefetch();\n\t\t\t\tawait utils.compose.one.invalidate({\n\t\t\t\t\tcomposeId,\n\t\t\t\t});\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error updating the command\");\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<Card className=\"bg-background\">\n\t\t\t<CardHeader className=\"flex flex-row justify-between\">\n\t\t\t\t<div>\n\t\t\t\t\t<CardTitle className=\"text-xl\">Run Command</CardTitle>\n\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\tOverride a custom command to the compose file\n\t\t\t\t\t</CardDescription>\n\t\t\t\t</div>\n\t\t\t</CardHeader>\n\t\t\t<CardContent className=\"flex flex-col gap-4\">\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\tclassName=\"grid w-full gap-4\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<AlertBlock type=\"warning\">\n\t\t\t\t\t\t\tModifying the default command may affect deployment stability,\n\t\t\t\t\t\t\timpacting logs and monitoring. Proceed carefully and test\n\t\t\t\t\t\t\tthoroughly. By default, the command starts with{\" \"}\n\t\t\t\t\t\t\t<strong>docker</strong>.\n\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"command\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Command</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"Custom command\" {...field} />\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\tDefault Command ({defaultCommand})\n\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"flex justify-end\">\n\t\t\t\t\t\t\t<Button isLoading={isPending} type=\"submit\" className=\"w-fit\">\n\t\t\t\t\t\t\t\tSave\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</form>\n\t\t\t\t</Form>\n\t\t\t</CardContent>\n\t\t</Card>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/compose/advanced/add-isolation.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { AlertTriangle, Loader2 } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { CodeEditor } from \"@/components/shared/code-editor\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogHeader,\n\tDialogTitle,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n} from \"@/components/ui/form\";\n\nimport { Switch } from \"@/components/ui/switch\";\nimport { api } from \"@/utils/api\";\n\ninterface Props {\n\tcomposeId: string;\n}\n\n// Schema for Isolated Deployment\nconst isolatedSchema = z.object({\n\tisolatedDeployment: z.boolean().optional(),\n});\n\ntype IsolatedSchema = z.infer<typeof isolatedSchema>;\n\nexport const IsolatedDeploymentTab = ({ composeId }: Props) => {\n\tconst utils = api.useUtils();\n\tconst [compose, setCompose] = useState<string>(\"\");\n\tconst [isPreviewLoading, setIsPreviewLoading] = useState<boolean>(false);\n\tconst { mutateAsync, error, isError } =\n\t\tapi.compose.isolatedDeployment.useMutation();\n\n\tconst [isOpenPreview, setIsOpenPreview] = useState<boolean>(false);\n\n\tconst { mutateAsync: updateCompose } = api.compose.update.useMutation();\n\n\tconst { data, refetch } = api.compose.one.useQuery(\n\t\t{ composeId },\n\t\t{ enabled: !!composeId },\n\t);\n\n\tconst form = useForm<IsolatedSchema>({\n\t\tdefaultValues: {\n\t\t\tisolatedDeployment: false,\n\t\t},\n\t\tresolver: zodResolver(isolatedSchema),\n\t});\n\n\tuseEffect(() => {\n\t\tif (data) {\n\t\t\tform.reset({\n\t\t\t\tisolatedDeployment: data?.isolatedDeployment || false,\n\t\t\t});\n\t\t}\n\t}, [form, form.reset, form.formState.isSubmitSuccessful, data]);\n\n\tconst onSubmit = async (formData: IsolatedSchema) => {\n\t\tawait updateCompose({\n\t\t\tcomposeId,\n\t\t\tisolatedDeployment: formData?.isolatedDeployment || false,\n\t\t})\n\t\t\t.then(async (_data) => {\n\t\t\t\tawait refetch();\n\t\t\t\ttoast.success(\"Compose updated\");\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error updating the compose\");\n\t\t\t});\n\t};\n\n\tconst generatePreview = async () => {\n\t\tsetIsOpenPreview(true);\n\t\tsetIsPreviewLoading(true);\n\t\ttry {\n\t\t\tawait mutateAsync({\n\t\t\t\tcomposeId,\n\t\t\t\tsuffix: data?.appName || \"\",\n\t\t\t}).then(async (data) => {\n\t\t\t\tawait utils.project.all.invalidate();\n\t\t\t\tsetCompose(data);\n\t\t\t});\n\t\t} catch {\n\t\t\ttoast.error(\"Error generating preview\");\n\t\t\tsetIsOpenPreview(false);\n\t\t} finally {\n\t\t\tsetIsPreviewLoading(false);\n\t\t}\n\t};\n\n\treturn (\n\t\t<Card className=\"bg-background\">\n\t\t\t<CardHeader>\n\t\t\t\t<CardTitle className=\"text-xl\">Enable Isolated Deployment</CardTitle>\n\t\t\t\t<CardDescription>\n\t\t\t\t\tConfigure isolated deployment to the compose file.\n\t\t\t\t\t<div className=\"text-sm text-muted-foreground flex flex-col gap-2\">\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\tThis feature creates an isolated environment for your deployment\n\t\t\t\t\t\t\tby adding unique prefixes to all resources. It establishes a\n\t\t\t\t\t\t\tdedicated network based on your compose file's name, ensuring your\n\t\t\t\t\t\t\tservices run in isolation. This prevents conflicts when running\n\t\t\t\t\t\t\tmultiple instances of the same template or services with identical\n\t\t\t\t\t\t\tnames.\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<div className=\"space-y-4\">\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<h4 className=\"font-medium mb-2\">\n\t\t\t\t\t\t\t\t\tResources that will be isolated:\n\t\t\t\t\t\t\t\t</h4>\n\t\t\t\t\t\t\t\t<ul className=\"list-disc list-inside\">\n\t\t\t\t\t\t\t\t\t<li>Docker networks</li>\n\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</CardDescription>\n\t\t\t</CardHeader>\n\t\t\t<CardContent>\n\t\t\t\t<div className=\"space-y-4\">\n\t\t\t\t\t{isError && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\t\t\t\t\t<Form {...form}>\n\t\t\t\t\t\t<form\n\t\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\t\tid=\"isolated-deployment-form\"\n\t\t\t\t\t\t\tclassName=\"grid w-full gap-4\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{isError && (\n\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-4 rounded-lg items-center bg-red-50 p-2 dark:bg-red-950\">\n\t\t\t\t\t\t\t\t\t<AlertTriangle className=\"text-red-600 dark:text-red-400\" />\n\t\t\t\t\t\t\t\t\t<span className=\"text-sm text-red-600 dark:text-red-400\">\n\t\t\t\t\t\t\t\t\t\t{error?.message}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t<div className=\"flex flex-col lg:flex-col gap-4 w-full\">\n\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\tname=\"isolatedDeployment\"\n\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t<FormItem className=\"mt-4 flex flex-row items-center justify-between rounded-lg border p-3 shadow-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tEnable Isolated Deployment ({data?.appName})\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tEnable isolated deployment to the compose file.\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t<div className=\"flex flex-col lg:flex-row gap-4 w-full items-end justify-end\">\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tform=\"isolated-deployment-form\"\n\t\t\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"lg:w-fit\"\n\t\t\t\t\t\t\t\t\t\tisLoading={form.formState.isSubmitting}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tSave\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div className=\"flex flex-col lg:flex-row gap-4 w-full items-end justify-end\">\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tonClick={generatePreview}\n\t\t\t\t\t\t\t\t\tisLoading={isPreviewLoading}\n\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\tclassName=\"lg:w-fit\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tPreview Compose\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t<Dialog open={isOpenPreview} onOpenChange={setIsOpenPreview}>\n\t\t\t\t\t\t\t\t\t<DialogContent className=\"sm:max-w-6xl max-h-[80vh]\">\n\t\t\t\t\t\t\t\t\t\t<DialogHeader>\n\t\t\t\t\t\t\t\t\t\t\t<DialogTitle>Isolated Deployment Preview</DialogTitle>\n\t\t\t\t\t\t\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\t\t\t\t\t\t\tPreview of the compose file with isolated deployment\n\t\t\t\t\t\t\t\t\t\t\t\tconfiguration\n\t\t\t\t\t\t\t\t\t\t\t</DialogDescription>\n\t\t\t\t\t\t\t\t\t\t</DialogHeader>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-4 overflow-auto\">\n\t\t\t\t\t\t\t\t\t\t\t{isPreviewLoading ? (\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col items-center justify-center py-12 gap-4\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Loader2 className=\"w-8 h-8 animate-spin text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGenerating compose preview...\n\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t<pre>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CodeEditor\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={compose || \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlanguage=\"yaml\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treadOnly\n\t\t\t\t\t\t\t\t\t\t\t\t\t\theight=\"60vh\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t</pre>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</DialogContent>\n\t\t\t\t\t\t\t\t</Dialog>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</form>\n\t\t\t\t\t</Form>\n\t\t\t\t</div>\n\t\t\t</CardContent>\n\t\t</Card>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/compose/delete-service.tsx",
    "content": "import type { ServiceType } from \"@dokploy/server/db/schema\";\nimport { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport copy from \"copy-to-clipboard\";\nimport { Copy, Trash2 } from \"lucide-react\";\nimport { useRouter } from \"next/router\";\nimport { useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport { Checkbox } from \"@/components/ui/checkbox\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { api } from \"@/utils/api\";\n\nconst deleteComposeSchema = z.object({\n\tprojectName: z.string().min(1, {\n\t\tmessage: \"Compose name is required\",\n\t}),\n\tdeleteVolumes: z.boolean(),\n});\n\ntype DeleteCompose = z.infer<typeof deleteComposeSchema>;\n\ninterface Props {\n\tid: string;\n\ttype: ServiceType | \"application\";\n}\n\nexport const DeleteService = ({ id, type }: Props) => {\n\tconst { data: permissions } = api.user.getPermissions.useQuery();\n\tconst canDelete = permissions?.service.delete ?? false;\n\tconst [isOpen, setIsOpen] = useState(false);\n\n\tconst queryMap = {\n\t\tpostgres: () =>\n\t\t\tapi.postgres.one.useQuery({ postgresId: id }, { enabled: !!id }),\n\t\tredis: () => api.redis.one.useQuery({ redisId: id }, { enabled: !!id }),\n\t\tmysql: () => api.mysql.one.useQuery({ mysqlId: id }, { enabled: !!id }),\n\t\tmariadb: () =>\n\t\t\tapi.mariadb.one.useQuery({ mariadbId: id }, { enabled: !!id }),\n\t\tapplication: () =>\n\t\t\tapi.application.one.useQuery({ applicationId: id }, { enabled: !!id }),\n\t\tmongo: () => api.mongo.one.useQuery({ mongoId: id }, { enabled: !!id }),\n\t\tcompose: () =>\n\t\t\tapi.compose.one.useQuery({ composeId: id }, { enabled: !!id }),\n\t};\n\tconst { data } = queryMap[type]\n\t\t? queryMap[type]()\n\t\t: api.mongo.one.useQuery({ mongoId: id }, { enabled: !!id });\n\n\tconst mutationMap = {\n\t\tpostgres: () => api.postgres.remove.useMutation(),\n\t\tredis: () => api.redis.remove.useMutation(),\n\t\tmysql: () => api.mysql.remove.useMutation(),\n\t\tmariadb: () => api.mariadb.remove.useMutation(),\n\t\tapplication: () => api.application.delete.useMutation(),\n\t\tmongo: () => api.mongo.remove.useMutation(),\n\t\tcompose: () => api.compose.delete.useMutation(),\n\t};\n\tconst { mutateAsync, isPending } = mutationMap[type]\n\t\t? mutationMap[type]()\n\t\t: api.mongo.remove.useMutation();\n\tconst { push } = useRouter();\n\tconst form = useForm<DeleteCompose>({\n\t\tdefaultValues: {\n\t\t\tprojectName: \"\",\n\t\t\tdeleteVolumes: false,\n\t\t},\n\t\tresolver: zodResolver(deleteComposeSchema),\n\t});\n\n\tconst onSubmit = async (formData: DeleteCompose) => {\n\t\tconst expectedName = `${data?.name}/${data?.appName}`;\n\t\tif (formData.projectName === expectedName) {\n\t\t\tconst { deleteVolumes } = formData;\n\t\t\tawait mutateAsync({\n\t\t\t\tmongoId: id || \"\",\n\t\t\t\tpostgresId: id || \"\",\n\t\t\t\tredisId: id || \"\",\n\t\t\t\tmysqlId: id || \"\",\n\t\t\t\tmariadbId: id || \"\",\n\t\t\t\tapplicationId: id || \"\",\n\t\t\t\tcomposeId: id || \"\",\n\t\t\t\tdeleteVolumes,\n\t\t\t})\n\t\t\t\t.then((result) => {\n\t\t\t\t\tpush(\n\t\t\t\t\t\t`/dashboard/project/${result?.environment?.projectId}/environment/${result?.environment?.environmentId}`,\n\t\t\t\t\t);\n\t\t\t\t\ttoast.success(\"Service deleted successfully\");\n\t\t\t\t\tsetIsOpen(false);\n\t\t\t\t})\n\t\t\t\t.catch(() => {\n\t\t\t\t\ttoast.error(\"Error deleting the service\");\n\t\t\t\t});\n\t\t} else {\n\t\t\tform.setError(\"projectName\", {\n\t\t\t\tmessage: `Project name must match \"${expectedName}\"`,\n\t\t\t});\n\t\t}\n\t};\n\n\tconst isDisabled =\n\t\t(data &&\n\t\t\t\"applicationStatus\" in data &&\n\t\t\tdata?.applicationStatus === \"running\") ||\n\t\t(data && \"composeStatus\" in data && data?.composeStatus === \"running\");\n\n\tif (!canDelete) return null;\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\tclassName=\"group hover:bg-red-500/10 \"\n\t\t\t\t\tisLoading={isPending}\n\t\t\t\t>\n\t\t\t\t\t<Trash2 className=\"size-4 text-primary group-hover:text-red-500\" />\n\t\t\t\t</Button>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-lg\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Are you absolutely sure?</DialogTitle>\n\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\tThis action cannot be undone. This will permanently delete the\n\t\t\t\t\t\tservice. If you are sure please enter the service name to delete\n\t\t\t\t\t\tthis service.\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t<div className=\"grid gap-4\">\n\t\t\t\t\t<Form {...form}>\n\t\t\t\t\t\t<form\n\t\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\t\tid=\"hook-form-delete-compose\"\n\t\t\t\t\t\t\tclassName=\"grid w-full gap-4\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"projectName\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t\t\t\tTo confirm, type{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"p-2 rounded-md ml-1 mr-1 hover:border-primary hover:text-primary-foreground hover:bg-primary hover:cursor-pointer\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (data?.name && data?.appName) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcopy(`${data.name}/${data.appName}`);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Copied to clipboard. Be careful!\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{data?.name}/{data?.appName}&nbsp;\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Copy className=\"h-4 w-4 ml-1 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</Badge>{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\tin the box below:\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Enter compose name to confirm\"\n\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{type === \"compose\" && (\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"deleteVolumes\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Checkbox\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel className=\"ml-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\tDelete volumes associated with this compose\n\t\t\t\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</form>\n\t\t\t\t\t</Form>\n\t\t\t\t</div>\n\t\t\t\t{isDisabled && (\n\t\t\t\t\t<AlertBlock type=\"warning\" className=\"w-full mt-5\">\n\t\t\t\t\t\tCannot delete the service while it is running. Please wait for the\n\t\t\t\t\t\tbuild to finish and then try again.\n\t\t\t\t\t</AlertBlock>\n\t\t\t\t)}\n\t\t\t\t<DialogFooter>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tsetIsOpen(false);\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tCancel\n\t\t\t\t\t</Button>\n\n\t\t\t\t\t<Button\n\t\t\t\t\t\tisLoading={isPending}\n\t\t\t\t\t\tdisabled={isDisabled}\n\t\t\t\t\t\tform=\"hook-form-delete-compose\"\n\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\tvariant=\"destructive\"\n\t\t\t\t\t>\n\t\t\t\t\t\tConfirm\n\t\t\t\t\t</Button>\n\t\t\t\t</DialogFooter>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/compose/general/actions.tsx",
    "content": "import * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport { Ban, CheckCircle2, RefreshCcw, Rocket, Terminal } from \"lucide-react\";\nimport { useRouter } from \"next/router\";\nimport { toast } from \"sonner\";\nimport { DialogAction } from \"@/components/shared/dialog-action\";\nimport { Button } from \"@/components/ui/button\";\nimport { Switch } from \"@/components/ui/switch\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { api } from \"@/utils/api\";\nimport { DockerTerminalModal } from \"../../settings/web-server/docker-terminal-modal\";\n\ninterface Props {\n\tcomposeId: string;\n}\nexport const ComposeActions = ({ composeId }: Props) => {\n\tconst router = useRouter();\n\tconst { data: permissions } = api.user.getPermissions.useQuery();\n\tconst canDeploy = permissions?.deployment.create ?? false;\n\tconst canUpdateService = permissions?.service.create ?? false;\n\tconst { data, refetch } = api.compose.one.useQuery(\n\t\t{\n\t\t\tcomposeId,\n\t\t},\n\t\t{ enabled: !!composeId },\n\t);\n\tconst { mutateAsync: update } = api.compose.update.useMutation();\n\tconst { mutateAsync: deploy } = api.compose.deploy.useMutation();\n\tconst { mutateAsync: redeploy } = api.compose.redeploy.useMutation();\n\tconst { mutateAsync: start, isPending: isStarting } =\n\t\tapi.compose.start.useMutation();\n\tconst { mutateAsync: stop, isPending: isStopping } =\n\t\tapi.compose.stop.useMutation();\n\treturn (\n\t\t<div className=\"flex flex-row gap-4 w-full flex-wrap \">\n\t\t\t<TooltipProvider delayDuration={0} disableHoverableContent={false}>\n\t\t\t\t{canDeploy && (\n\t\t\t\t\t<DialogAction\n\t\t\t\t\t\ttitle=\"Deploy Compose\"\n\t\t\t\t\t\tdescription=\"Are you sure you want to deploy this compose?\"\n\t\t\t\t\t\ttype=\"default\"\n\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\tawait deploy({\n\t\t\t\t\t\t\t\tcomposeId: composeId,\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\ttoast.success(\"Compose deployed successfully\");\n\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\trouter.push(\n\t\t\t\t\t\t\t\t\t\t`/dashboard/project/${data?.environment.projectId}/environment/${data?.environmentId}/services/compose/${composeId}?tab=deployments`,\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\ttoast.error(\"Error deploying compose\");\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"default\"\n\t\t\t\t\t\t\tisLoading={data?.composeStatus === \"running\"}\n\t\t\t\t\t\t\tclassName=\"flex items-center gap-1.5 group focus-visible:ring-2 focus-visible:ring-offset-2\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t<div className=\"flex items-center\">\n\t\t\t\t\t\t\t\t\t\t<Rocket className=\"size-4 mr-1\" />\n\t\t\t\t\t\t\t\t\t\tDeploy\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t<TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t<TooltipContent sideOffset={5} className=\"z-[60]\">\n\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\tDownloads the source code and performs a complete build\n\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t</TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</DialogAction>\n\t\t\t\t)}\n\t\t\t\t{canDeploy && (\n\t\t\t\t\t<DialogAction\n\t\t\t\t\t\ttitle=\"Reload Compose\"\n\t\t\t\t\t\tdescription=\"Are you sure you want to reload this compose?\"\n\t\t\t\t\t\ttype=\"default\"\n\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\tawait redeploy({\n\t\t\t\t\t\t\t\tcomposeId: composeId,\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\ttoast.success(\"Compose reloaded successfully\");\n\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\ttoast.error(\"Error reloading compose\");\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\tisLoading={data?.composeStatus === \"running\"}\n\t\t\t\t\t\t\tclassName=\"flex items-center gap-1.5 group focus-visible:ring-2 focus-visible:ring-offset-2\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t<div className=\"flex items-center\">\n\t\t\t\t\t\t\t\t\t\t<RefreshCcw className=\"size-4 mr-1\" />\n\t\t\t\t\t\t\t\t\t\tReload\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t<TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t<TooltipContent sideOffset={5} className=\"z-[60]\">\n\t\t\t\t\t\t\t\t\t\t<p>Reload the compose without rebuilding it</p>\n\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t</TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</DialogAction>\n\t\t\t\t)}\n\t\t\t\t{canDeploy &&\n\t\t\t\t\t(data?.composeType === \"docker-compose\" &&\n\t\t\t\t\tdata?.composeStatus === \"idle\" ? (\n\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\ttitle=\"Start Compose\"\n\t\t\t\t\t\t\tdescription=\"Are you sure you want to start this compose?\"\n\t\t\t\t\t\t\ttype=\"default\"\n\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\tawait start({\n\t\t\t\t\t\t\t\t\tcomposeId: composeId,\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\ttoast.success(\"Compose started successfully\");\n\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error starting compose\");\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\tisLoading={isStarting}\n\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1.5 group focus-visible:ring-2 focus-visible:ring-offset-2\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center\">\n\t\t\t\t\t\t\t\t\t\t\t<CheckCircle2 className=\"size-4 mr-1\" />\n\t\t\t\t\t\t\t\t\t\t\tStart\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t<TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t<TooltipContent sideOffset={5} className=\"z-[60]\">\n\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\tStart the compose (requires a previous successful build)\n\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t</TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\ttitle=\"Stop Compose\"\n\t\t\t\t\t\t\tdescription=\"Are you sure you want to stop this compose?\"\n\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\tawait stop({\n\t\t\t\t\t\t\t\t\tcomposeId: composeId,\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\ttoast.success(\"Compose stopped successfully\");\n\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error stopping compose\");\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant=\"destructive\"\n\t\t\t\t\t\t\t\tisLoading={isStopping}\n\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1.5 group focus-visible:ring-2 focus-visible:ring-offset-2\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center\">\n\t\t\t\t\t\t\t\t\t\t\t<Ban className=\"size-4 mr-1\" />\n\t\t\t\t\t\t\t\t\t\t\tStop\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t<TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t<TooltipContent sideOffset={5} className=\"z-[60]\">\n\t\t\t\t\t\t\t\t\t\t\t<p>Stop the currently running compose</p>\n\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t</TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t))}\n\t\t\t</TooltipProvider>\n\t\t\t<DockerTerminalModal\n\t\t\t\tappName={data?.appName || \"\"}\n\t\t\t\tserverId={data?.serverId || \"\"}\n\t\t\t\tappType={data?.composeType || \"docker-compose\"}\n\t\t\t>\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\tclassName=\"flex items-center gap-1.5 focus-visible:ring-2 focus-visible:ring-offset-2\"\n\t\t\t\t>\n\t\t\t\t\t<Terminal className=\"size-4 mr-1\" />\n\t\t\t\t\tOpen Terminal\n\t\t\t\t</Button>\n\t\t\t</DockerTerminalModal>\n\t\t\t{canUpdateService && (\n\t\t\t\t<div className=\"flex flex-row items-center gap-2 rounded-md px-4 py-2 border\">\n\t\t\t\t\t<span className=\"text-sm font-medium\">Autodeploy</span>\n\t\t\t\t\t<Switch\n\t\t\t\t\t\taria-label=\"Toggle autodeploy\"\n\t\t\t\t\t\tchecked={data?.autoDeploy || false}\n\t\t\t\t\t\tonCheckedChange={async (enabled) => {\n\t\t\t\t\t\t\tawait update({\n\t\t\t\t\t\t\t\tcomposeId,\n\t\t\t\t\t\t\t\tautoDeploy: enabled,\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.then(async () => {\n\t\t\t\t\t\t\t\t\ttoast.success(\"Auto Deploy Updated\");\n\t\t\t\t\t\t\t\t\tawait refetch();\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\ttoast.error(\"Error updating Auto Deploy\");\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tclassName=\"flex flex-row gap-2 items-center data-[state=checked]:bg-primary\"\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/compose/general/compose-file-editor.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { CodeEditor } from \"@/components/shared/code-editor\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { api } from \"@/utils/api\";\nimport { validateAndFormatYAML } from \"../../application/advanced/traefik/update-traefik-config\";\n\ninterface Props {\n\tcomposeId: string;\n}\n\nconst AddComposeFile = z.object({\n\tcomposeFile: z.string(),\n});\n\ntype AddComposeFile = z.infer<typeof AddComposeFile>;\n\nexport const ComposeFileEditor = ({ composeId }: Props) => {\n\tconst { data: permissions } = api.user.getPermissions.useQuery();\n\tconst canUpdate = permissions?.service.create ?? false;\n\tconst utils = api.useUtils();\n\tconst { data, refetch } = api.compose.one.useQuery(\n\t\t{\n\t\t\tcomposeId,\n\t\t},\n\t\t{ enabled: !!composeId },\n\t);\n\n\tconst { mutateAsync, isPending } = api.compose.update.useMutation();\n\tconst [hasUnsavedChanges, setHasUnsavedChanges] = useState(false);\n\n\tconst form = useForm<AddComposeFile>({\n\t\tdefaultValues: {\n\t\t\tcomposeFile: \"\",\n\t\t},\n\t\tresolver: zodResolver(AddComposeFile),\n\t});\n\n\tconst composeFile = form.watch(\"composeFile\");\n\n\tuseEffect(() => {\n\t\tif (data && !composeFile) {\n\t\t\tform.reset({\n\t\t\t\tcomposeFile: data.composeFile || \"\",\n\t\t\t});\n\t\t}\n\t}, [form, form.reset, data]);\n\n\tuseEffect(() => {\n\t\tif (data?.composeFile !== undefined) {\n\t\t\tsetHasUnsavedChanges(composeFile !== data.composeFile);\n\t\t}\n\t}, [composeFile, data?.composeFile]);\n\n\tconst onSubmit = async (data: AddComposeFile) => {\n\t\tconst { valid, error } = validateAndFormatYAML(data.composeFile);\n\t\tif (!valid) {\n\t\t\tform.setError(\"composeFile\", {\n\t\t\t\ttype: \"manual\",\n\t\t\t\tmessage: error || \"Invalid YAML\",\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tform.clearErrors(\"composeFile\");\n\t\tawait mutateAsync({\n\t\t\tcomposeId,\n\t\t\tcomposeFile: data.composeFile,\n\t\t\tcomposePath: \"./docker-compose.yml\",\n\t\t\tsourceType: \"raw\",\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(\"Compose config Updated\");\n\t\t\t\tsetHasUnsavedChanges(false);\n\t\t\t\trefetch();\n\t\t\t\tawait utils.compose.getConvertedCompose.invalidate({\n\t\t\t\t\tcomposeId,\n\t\t\t\t});\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error updating the Compose config\");\n\t\t\t});\n\t};\n\n\t// Add keyboard shortcut for Ctrl+S/Cmd+S\n\tuseEffect(() => {\n\t\tconst handleKeyDown = (e: KeyboardEvent) => {\n\t\t\tif ((e.ctrlKey || e.metaKey) && e.key === \"s\" && !isPending) {\n\t\t\t\te.preventDefault();\n\t\t\t\tform.handleSubmit(onSubmit)();\n\t\t\t}\n\t\t};\n\n\t\tdocument.addEventListener(\"keydown\", handleKeyDown);\n\t\treturn () => {\n\t\t\tdocument.removeEventListener(\"keydown\", handleKeyDown);\n\t\t};\n\t}, [form, onSubmit, isPending]);\n\n\treturn (\n\t\t<>\n\t\t\t<div className=\"w-full flex flex-col gap-4 \">\n\t\t\t\t<div className=\"flex items-center justify-between\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<h3 className=\"text-lg font-medium\">Compose File</h3>\n\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\tConfigure your Docker Compose file for this service.\n\t\t\t\t\t\t\t{hasUnsavedChanges && (\n\t\t\t\t\t\t\t\t<span className=\"text-yellow-500 ml-2\">\n\t\t\t\t\t\t\t\t\t(You have unsaved changes)\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tid=\"hook-form-save-compose-file\"\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\tclassName=\"w-full relative space-y-4\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"composeFile\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"overflow-auto\">\n\t\t\t\t\t\t\t\t\t<FormControl className=\"\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-4 w-full outline-none focus:outline-none overflow-auto\">\n\t\t\t\t\t\t\t\t\t\t\t<CodeEditor\n\t\t\t\t\t\t\t\t\t\t\t\t// disabled\n\t\t\t\t\t\t\t\t\t\t\t\tlanguage=\"yaml\"\n\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"font-mono\"\n\t\t\t\t\t\t\t\t\t\t\t\twrapperClassName=\"compose-file-editor\"\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder={`version: '3'\nservices:\n    web:\n    image: nginx\n    ports:\n        - \"80:80\"\n    \n    `}\n\t\t\t\t\t\t\t\t\t\t\t\tonChange={(value) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(value);\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<pre>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</pre>\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</form>\n\t\t\t\t</Form>\n\t\t\t\t<div className=\"flex justify-between flex-col lg:flex-row gap-2\">\n\t\t\t\t\t<div className=\"w-full flex flex-col lg:flex-row gap-4 items-end\" />\n\t\t\t\t\t{canUpdate && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\tform=\"hook-form-save-compose-file\"\n\t\t\t\t\t\t\tisLoading={isPending}\n\t\t\t\t\t\t\tclassName=\"lg:w-fit w-full\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tSave\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/compose/general/generic/save-bitbucket-provider-compose.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { CheckIcon, ChevronsUpDown, X } from \"lucide-react\";\nimport Link from \"next/link\";\nimport { useEffect } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { BitbucketIcon } from \"@/components/icons/data-tools-icons\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCommand,\n\tCommandEmpty,\n\tCommandGroup,\n\tCommandInput,\n\tCommandItem,\n} from \"@/components/ui/command\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport {\n\tPopover,\n\tPopoverContent,\n\tPopoverTrigger,\n} from \"@/components/ui/popover\";\nimport { ScrollArea } from \"@/components/ui/scroll-area\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { Switch } from \"@/components/ui/switch\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { cn } from \"@/lib/utils\";\nimport { api } from \"@/utils/api\";\n\nconst BitbucketProviderSchema = z.object({\n\tcomposePath: z.string().min(1),\n\trepository: z\n\t\t.object({\n\t\t\trepo: z.string().min(1, \"Repo is required\"),\n\t\t\towner: z.string().min(1, \"Owner is required\"),\n\t\t\tslug: z.string().optional(),\n\t\t})\n\t\t.required(),\n\tbranch: z.string().min(1, \"Branch is required\"),\n\tbitbucketId: z.string().min(1, \"Bitbucket Provider is required\"),\n\twatchPaths: z.array(z.string()).optional(),\n\tenableSubmodules: z.boolean().default(false),\n});\n\ntype BitbucketProvider = z.infer<typeof BitbucketProviderSchema>;\n\ninterface Props {\n\tcomposeId: string;\n}\n\nexport const SaveBitbucketProviderCompose = ({ composeId }: Props) => {\n\tconst { data: bitbucketProviders } =\n\t\tapi.bitbucket.bitbucketProviders.useQuery();\n\tconst { data, refetch } = api.compose.one.useQuery({ composeId });\n\n\tconst { mutateAsync, isPending: isSavingBitbucketProvider } =\n\t\tapi.compose.update.useMutation();\n\n\tconst form = useForm({\n\t\tdefaultValues: {\n\t\t\tcomposePath: \"./docker-compose.yml\",\n\t\t\trepository: {\n\t\t\t\towner: \"\",\n\t\t\t\trepo: \"\",\n\t\t\t\tslug: \"\",\n\t\t\t},\n\t\t\tbitbucketId: \"\",\n\t\t\tbranch: \"\",\n\t\t\twatchPaths: [],\n\t\t\tenableSubmodules: false,\n\t\t},\n\t\tresolver: zodResolver(BitbucketProviderSchema),\n\t});\n\n\tconst repository = form.watch(\"repository\");\n\tconst bitbucketId = form.watch(\"bitbucketId\");\n\n\tconst {\n\t\tdata: repositories,\n\t\tisLoading: isLoadingRepositories,\n\t\terror,\n\t} = api.bitbucket.getBitbucketRepositories.useQuery(\n\t\t{\n\t\t\tbitbucketId,\n\t\t},\n\t\t{\n\t\t\tenabled: !!bitbucketId,\n\t\t},\n\t);\n\n\tconst {\n\t\tdata: branches,\n\t\tfetchStatus,\n\t\tstatus,\n\t} = api.bitbucket.getBitbucketBranches.useQuery(\n\t\t{\n\t\t\towner: repository?.owner,\n\t\t\trepo: repository?.slug || repository?.repo || \"\",\n\t\t\tbitbucketId,\n\t\t},\n\t\t{\n\t\t\tenabled:\n\t\t\t\t!!repository?.owner &&\n\t\t\t\t!!(repository?.slug || repository?.repo) &&\n\t\t\t\t!!bitbucketId,\n\t\t},\n\t);\n\n\tuseEffect(() => {\n\t\tif (data) {\n\t\t\tform.reset({\n\t\t\t\tbranch: data.bitbucketBranch || \"\",\n\t\t\t\trepository: {\n\t\t\t\t\trepo: data.bitbucketRepository || \"\",\n\t\t\t\t\towner: data.bitbucketOwner || \"\",\n\t\t\t\t\tslug: data.bitbucketRepositorySlug || \"\",\n\t\t\t\t},\n\t\t\t\tcomposePath: data.composePath,\n\t\t\t\tbitbucketId: data.bitbucketId || \"\",\n\t\t\t\twatchPaths: data.watchPaths || [],\n\t\t\t\tenableSubmodules: data.enableSubmodules ?? false,\n\t\t\t});\n\t\t}\n\t}, [form.reset, data?.composeId, form]);\n\n\tconst onSubmit = async (data: BitbucketProvider) => {\n\t\tawait mutateAsync({\n\t\t\tbitbucketBranch: data.branch,\n\t\t\tbitbucketRepository: data.repository.repo,\n\t\t\tbitbucketRepositorySlug: data.repository.slug || data.repository.repo,\n\t\t\tbitbucketOwner: data.repository.owner,\n\t\t\tbitbucketId: data.bitbucketId,\n\t\t\tcomposePath: data.composePath,\n\t\t\tcomposeId,\n\t\t\tsourceType: \"bitbucket\",\n\t\t\tcomposeStatus: \"idle\",\n\t\t\twatchPaths: data.watchPaths,\n\t\t\tenableSubmodules: data.enableSubmodules,\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(\"Service Provider Saved\");\n\t\t\t\tawait refetch();\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error saving the Bitbucket provider\");\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<div>\n\t\t\t<Form {...form}>\n\t\t\t\t<form\n\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\tclassName=\"grid w-full gap-4 py-3\"\n\t\t\t\t>\n\t\t\t\t\t{error && (\n\t\t\t\t\t\t<AlertBlock type=\"error\">Repositories: {error.message}</AlertBlock>\n\t\t\t\t\t)}\n\t\t\t\t\t<div className=\"grid md:grid-cols-2 gap-4\">\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"bitbucketId\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"md:col-span-2 flex flex-col\">\n\t\t\t\t\t\t\t\t\t<FormLabel>Bitbucket Account</FormLabel>\n\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\tonValueChange={(value) => {\n\t\t\t\t\t\t\t\t\t\t\tfield.onChange(value);\n\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"repository\", {\n\t\t\t\t\t\t\t\t\t\t\t\towner: \"\",\n\t\t\t\t\t\t\t\t\t\t\t\trepo: \"\",\n\t\t\t\t\t\t\t\t\t\t\t\tslug: \"\",\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"branch\", \"\");\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tdefaultValue={field.value}\n\t\t\t\t\t\t\t\t\t\tvalue={field.value}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a Bitbucket Account\" />\n\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t{bitbucketProviders?.map((bitbucketProvider) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={bitbucketProvider.bitbucketId}\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={bitbucketProvider.bitbucketId}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{bitbucketProvider.gitProvider.name}\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"repository\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"md:col-span-2 flex flex-col\">\n\t\t\t\t\t\t\t\t\t<div className=\"flex items-center justify-between\">\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Repository</FormLabel>\n\t\t\t\t\t\t\t\t\t\t{field.value.owner && field.value.repo && (\n\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\thref={`https://bitbucket.org/${field.value.owner}/${field.value.slug || field.value.repo}`}\n\t\t\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1 text-sm text-muted-foreground hover:text-primary\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<BitbucketIcon className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t<span>View Repository</span>\n\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<Popover>\n\t\t\t\t\t\t\t\t\t\t<PopoverTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"w-full justify-between !bg-input\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t!field.value && \"text-muted-foreground\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{!field.value.owner\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Select repository\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: isLoadingRepositories\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Loading....\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: (repositories?.find(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(repo) => repo.name === field.value.repo,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)?.name ?? \"Select repository\")}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</PopoverTrigger>\n\t\t\t\t\t\t\t\t\t\t<PopoverContent className=\"p-0\" align=\"start\">\n\t\t\t\t\t\t\t\t\t\t\t<Command>\n\t\t\t\t\t\t\t\t\t\t\t\t<CommandInput\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Search repository...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-9\"\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t{!bitbucketId ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"py-6 text-center text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSelect a Bitbucket account first\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t) : isLoadingRepositories ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"py-6 text-center text-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLoading Repositories....\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t\t\t\t<CommandEmpty>No repositories found.</CommandEmpty>\n\t\t\t\t\t\t\t\t\t\t\t\t<ScrollArea className=\"h-96\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{repositories?.map((repo) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={repo.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={repo.url}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"repository\", {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\towner: repo.owner.username as string,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trepo: repo.name,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tslug: repo.slug,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"branch\", \"\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>{repo.name}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground text-xs\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{repo.owner.username}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CheckIcon\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"ml-auto h-4 w-4\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trepo.name === field.value.repo\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"opacity-100\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"opacity-0\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t</ScrollArea>\n\t\t\t\t\t\t\t\t\t\t\t</Command>\n\t\t\t\t\t\t\t\t\t\t</PopoverContent>\n\t\t\t\t\t\t\t\t\t</Popover>\n\t\t\t\t\t\t\t\t\t{form.formState.errors.repository && (\n\t\t\t\t\t\t\t\t\t\t<p className={cn(\"text-sm font-medium text-destructive\")}>\n\t\t\t\t\t\t\t\t\t\t\tRepository is required\n\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"branch\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"block w-full\">\n\t\t\t\t\t\t\t\t\t<FormLabel>Branch</FormLabel>\n\t\t\t\t\t\t\t\t\t<Popover>\n\t\t\t\t\t\t\t\t\t\t<PopoverTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\" w-full justify-between !bg-input\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t!field.value && \"text-muted-foreground\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{status === \"pending\" && fetchStatus === \"fetching\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Loading....\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: field.value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? branches?.find(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(branch) => branch.name === field.value,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)?.name\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Select branch\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</PopoverTrigger>\n\t\t\t\t\t\t\t\t\t\t<PopoverContent className=\"p-0\" align=\"start\">\n\t\t\t\t\t\t\t\t\t\t\t<Command>\n\t\t\t\t\t\t\t\t\t\t\t\t<CommandInput\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Search branch...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-9\"\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t{status === \"pending\" && fetchStatus === \"fetching\" && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"py-6 text-center text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLoading Branches....\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t{!repository?.owner && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"py-6 text-center text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSelect a repository\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t<ScrollArea className=\"h-96\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandEmpty>No branch found.</CommandEmpty>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{branches?.map((branch) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={branch.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={branch.commit.sha}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"branch\", branch.name);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{branch.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CheckIcon\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"ml-auto h-4 w-4\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbranch.name === field.value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"opacity-100\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"opacity-0\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t</ScrollArea>\n\t\t\t\t\t\t\t\t\t\t\t</Command>\n\t\t\t\t\t\t\t\t\t\t</PopoverContent>\n\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</Popover>\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"composePath\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Compose Path</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"docker-compose.yml\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"watchPaths\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"md:col-span-2\">\n\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Watch Paths</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"size-4 rounded-full bg-muted flex items-center justify-center text-[10px] font-bold\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t?\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tAdd paths to watch for changes. When files in these\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpaths change, a new deployment will be triggered.\n\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-wrap gap-2 mb-2\">\n\t\t\t\t\t\t\t\t\t\t{field.value?.map((path, index) => (\n\t\t\t\t\t\t\t\t\t\t\t<Badge key={index} variant=\"secondary\">\n\t\t\t\t\t\t\t\t\t\t\t\t{path}\n\t\t\t\t\t\t\t\t\t\t\t\t<X\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"ml-1 size-3 cursor-pointer\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst newPaths = [...(field.value || [])];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnewPaths.splice(index, 1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"watchPaths\", newPaths);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Enter a path to watch (e.g., src/**, dist/*.js)\"\n\t\t\t\t\t\t\t\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (e.key === \"Enter\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst input = e.currentTarget;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst value = input.value.trim();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (value) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst newPaths = [...(field.value || []), value];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"watchPaths\", newPaths);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tinput.value = \"\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst input = document.querySelector(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'input[placeholder=\"Enter a path to watch (e.g., src/**, dist/*.js)\"]',\n\t\t\t\t\t\t\t\t\t\t\t\t\t) as HTMLInputElement;\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst value = input.value.trim();\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (value) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst newPaths = [...(field.value || []), value];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"watchPaths\", newPaths);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tinput.value = \"\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\tAdd\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"enableSubmodules\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"flex items-center space-x-2\">\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormLabel className=\"!mt-0\">Enable Submodules</FormLabel>\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"flex w-full justify-end\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tisLoading={isSavingBitbucketProvider}\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\tclassName=\"w-fit\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tSave\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\t\t\t\t</form>\n\t\t\t</Form>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/compose/general/generic/save-git-provider-compose.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { HelpCircle, KeyRoundIcon, LockIcon, X } from \"lucide-react\";\nimport Link from \"next/link\";\nimport { useRouter } from \"next/router\";\nimport { useEffect } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { GitIcon } from \"@/components/icons/data-tools-icons\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectGroup,\n\tSelectItem,\n\tSelectLabel,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { Switch } from \"@/components/ui/switch\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { api } from \"@/utils/api\";\n\nconst GitProviderSchema = z.object({\n\tcomposePath: z.string().min(1),\n\trepositoryURL: z.string().min(1, {\n\t\tmessage: \"Repository URL is required\",\n\t}),\n\tbranch: z.string().min(1, \"Branch required\"),\n\tsshKey: z.string().optional(),\n\twatchPaths: z.array(z.string()).optional(),\n\tenableSubmodules: z.boolean().default(false),\n});\n\ntype GitProvider = z.infer<typeof GitProviderSchema>;\n\ninterface Props {\n\tcomposeId: string;\n}\n\nexport const SaveGitProviderCompose = ({ composeId }: Props) => {\n\tconst { data, refetch } = api.compose.one.useQuery({ composeId });\n\tconst { data: sshKeys } = api.sshKey.all.useQuery();\n\tconst router = useRouter();\n\n\tconst { mutateAsync, isPending } = api.compose.update.useMutation();\n\n\tconst form = useForm({\n\t\tdefaultValues: {\n\t\t\tbranch: \"\",\n\t\t\trepositoryURL: \"\",\n\t\t\tcomposePath: \"./docker-compose.yml\",\n\t\t\tsshKey: undefined,\n\t\t\twatchPaths: [],\n\t\t\tenableSubmodules: false,\n\t\t},\n\t\tresolver: zodResolver(GitProviderSchema),\n\t});\n\n\tuseEffect(() => {\n\t\tif (data) {\n\t\t\tform.reset({\n\t\t\t\tsshKey: data.customGitSSHKeyId || undefined,\n\t\t\t\tbranch: data.customGitBranch || \"\",\n\t\t\t\trepositoryURL: data.customGitUrl || \"\",\n\t\t\t\tcomposePath: data.composePath,\n\t\t\t\twatchPaths: data.watchPaths || [],\n\t\t\t\tenableSubmodules: data.enableSubmodules ?? false,\n\t\t\t});\n\t\t}\n\t}, [form.reset, data, form]);\n\n\tconst onSubmit = async (values: GitProvider) => {\n\t\tawait mutateAsync({\n\t\t\tcustomGitBranch: values.branch,\n\t\t\tcustomGitUrl: values.repositoryURL,\n\t\t\tcustomGitSSHKeyId: values.sshKey === \"none\" ? null : values.sshKey,\n\t\t\tcomposeId,\n\t\t\tsourceType: \"git\",\n\t\t\tcomposePath: values.composePath,\n\t\t\tcomposeStatus: \"idle\",\n\t\t\twatchPaths: values.watchPaths || [],\n\t\t\tenableSubmodules: values.enableSubmodules,\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(\"Git Provider Saved\");\n\t\t\t\tawait refetch();\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error saving the Git provider\");\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<Form {...form}>\n\t\t\t<form\n\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\tclassName=\"flex flex-col gap-4\"\n\t\t\t>\n\t\t\t\t<div className=\"grid md:grid-cols-2 gap-4 \">\n\t\t\t\t\t<div className=\"flex items-end col-span-2 gap-4\">\n\t\t\t\t\t\t<div className=\"grow\">\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"repositoryURL\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center justify-between\">\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Repository URL</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t{field.value?.startsWith(\"https://\") && (\n\t\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\t\thref={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1 text-sm text-muted-foreground hover:text-primary\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GitIcon className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span>View Repository</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"Repository URL\" {...field} />\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{sshKeys && sshKeys.length > 0 ? (\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"sshKey\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem className=\"basis-40\">\n\t\t\t\t\t\t\t\t\t\t<FormLabel className=\"w-full inline-flex justify-between\">\n\t\t\t\t\t\t\t\t\t\t\tSSH Key\n\t\t\t\t\t\t\t\t\t\t\t<LockIcon className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\t\t\tkey={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\tonValueChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\tdefaultValue={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a key\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{sshKeys?.map((sshKey) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={sshKey.sshKeyId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={sshKey.sshKeyId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{sshKey.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"none\">None</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectLabel>Keys ({sshKeys?.length})</SelectLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\tonClick={() => router.push(\"/dashboard/settings/ssh-keys\")}\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<KeyRoundIcon className=\"size-4\" /> Add SSH Key\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"space-y-4\">\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"branch\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Branch</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"Branch\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<FormField\n\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\tname=\"composePath\"\n\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t<FormLabel>Compose Path</FormLabel>\n\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t<Input placeholder=\"docker-compose.yml\" {...field} />\n\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t)}\n\t\t\t\t\t/>\n\t\t\t\t\t<FormField\n\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\tname=\"watchPaths\"\n\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t<FormItem className=\"md:col-span-2\">\n\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t<FormLabel>Watch Paths</FormLabel>\n\t\t\t\t\t\t\t\t\t<TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t<HelpCircle className=\"size-4 text-muted-foreground hover:text-foreground transition-colors cursor-pointer\" />\n\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t<TooltipContent className=\"max-w-[300px]\">\n\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\tAdd paths to watch for changes. When files in these\n\t\t\t\t\t\t\t\t\t\t\t\t\tpaths change, a new deployment will be triggered. This\n\t\t\t\t\t\t\t\t\t\t\t\t\twill work only when manual webhook is setup.\n\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div className=\"flex flex-wrap gap-2 mb-2\">\n\t\t\t\t\t\t\t\t\t{field.value?.map((path, index) => (\n\t\t\t\t\t\t\t\t\t\t<Badge key={index} variant=\"secondary\">\n\t\t\t\t\t\t\t\t\t\t\t{path}\n\t\t\t\t\t\t\t\t\t\t\t<X\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"ml-1 size-3 cursor-pointer\"\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst newPaths = [...(field.value || [])];\n\t\t\t\t\t\t\t\t\t\t\t\t\tnewPaths.splice(index, 1);\n\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"watchPaths\", newPaths);\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t<div className=\"flex gap-2\">\n\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Enter a path to watch (e.g., src/**, dist/*.js)\"\n\t\t\t\t\t\t\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\tif (e.key === \"Enter\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst input = e.currentTarget;\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst value = input.value.trim();\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (value) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst newPaths = [...(field.value || []), value];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"watchPaths\", newPaths);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tinput.value = \"\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\tconst input = document.querySelector(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'input[placeholder=\"Enter a path to watch (e.g., src/**, dist/*.js)\"]',\n\t\t\t\t\t\t\t\t\t\t\t\t) as HTMLInputElement;\n\t\t\t\t\t\t\t\t\t\t\t\tconst value = input.value.trim();\n\t\t\t\t\t\t\t\t\t\t\t\tif (value) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst newPaths = [...(field.value || []), value];\n\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"watchPaths\", newPaths);\n\t\t\t\t\t\t\t\t\t\t\t\t\tinput.value = \"\";\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\tAdd\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t)}\n\t\t\t\t\t/>\n\t\t\t\t\t<FormField\n\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\tname=\"enableSubmodules\"\n\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t<FormItem className=\"flex items-center space-x-2\">\n\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t<FormLabel className=\"!mt-0\">Enable Submodules</FormLabel>\n\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t)}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"flex flex-row justify-end\">\n\t\t\t\t\t<Button type=\"submit\" className=\"w-fit\" isLoading={isPending}>\n\t\t\t\t\t\tSave{\" \"}\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t</form>\n\t\t</Form>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/compose/general/generic/save-gitea-provider-compose.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { CheckIcon, ChevronsUpDown, Plus, X } from \"lucide-react\";\nimport Link from \"next/link\";\nimport { useEffect } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { GiteaIcon } from \"@/components/icons/data-tools-icons\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCommand,\n\tCommandEmpty,\n\tCommandGroup,\n\tCommandInput,\n\tCommandItem,\n} from \"@/components/ui/command\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport {\n\tPopover,\n\tPopoverContent,\n\tPopoverTrigger,\n} from \"@/components/ui/popover\";\nimport { ScrollArea } from \"@/components/ui/scroll-area\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { Switch } from \"@/components/ui/switch\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { cn } from \"@/lib/utils\";\nimport { api } from \"@/utils/api\";\nimport type { Repository } from \"@/utils/gitea-utils\";\n\nconst GiteaProviderSchema = z.object({\n\tcomposePath: z.string().min(1),\n\trepository: z\n\t\t.object({\n\t\t\trepo: z.string().min(1, \"Repo is required\"),\n\t\t\towner: z.string().min(1, \"Owner is required\"),\n\t\t})\n\t\t.required(),\n\tbranch: z.string().min(1, \"Branch is required\"),\n\tgiteaId: z.string().min(1, \"Gitea Provider is required\"),\n\twatchPaths: z.array(z.string()).optional(),\n\tenableSubmodules: z.boolean().default(false),\n});\n\ntype GiteaProvider = z.infer<typeof GiteaProviderSchema>;\n\ninterface Props {\n\tcomposeId: string;\n}\n\nexport const SaveGiteaProviderCompose = ({ composeId }: Props) => {\n\tconst { data: giteaProviders } = api.gitea.giteaProviders.useQuery();\n\tconst { data, refetch } = api.compose.one.useQuery({ composeId });\n\tconst { mutateAsync, isPending: isSavingGiteaProvider } =\n\t\tapi.compose.update.useMutation();\n\n\tconst form = useForm({\n\t\tdefaultValues: {\n\t\t\tcomposePath: \"./docker-compose.yml\",\n\t\t\trepository: {\n\t\t\t\towner: \"\",\n\t\t\t\trepo: \"\",\n\t\t\t},\n\t\t\tgiteaId: \"\",\n\t\t\tbranch: \"\",\n\t\t\twatchPaths: [],\n\t\t\tenableSubmodules: false,\n\t\t},\n\t\tresolver: zodResolver(GiteaProviderSchema),\n\t});\n\n\tconst repository = form.watch(\"repository\");\n\tconst giteaId = form.watch(\"giteaId\");\n\n\tconst { data: giteaUrl } = api.gitea.getGiteaUrl.useQuery(\n\t\t{ giteaId },\n\t\t{\n\t\t\tenabled: !!giteaId,\n\t\t},\n\t);\n\n\tconst {\n\t\tdata: repositories,\n\t\tisLoading: isLoadingRepositories,\n\t\terror,\n\t} = api.gitea.getGiteaRepositories.useQuery<Repository[]>(\n\t\t{\n\t\t\tgiteaId,\n\t\t},\n\t\t{\n\t\t\tenabled: !!giteaId,\n\t\t},\n\t);\n\n\tconst {\n\t\tdata: branches,\n\t\tfetchStatus,\n\t\tstatus,\n\t} = api.gitea.getGiteaBranches.useQuery(\n\t\t{\n\t\t\towner: repository?.owner,\n\t\t\trepositoryName: repository?.repo,\n\t\t\tgiteaId: giteaId,\n\t\t},\n\t\t{\n\t\t\tenabled: !!repository?.owner && !!repository?.repo && !!giteaId,\n\t\t},\n\t);\n\n\tuseEffect(() => {\n\t\tif (data) {\n\t\t\tform.reset({\n\t\t\t\tbranch: data.giteaBranch || \"\",\n\t\t\t\trepository: {\n\t\t\t\t\trepo: data.giteaRepository || \"\",\n\t\t\t\t\towner: data.giteaOwner || \"\",\n\t\t\t\t},\n\t\t\t\tcomposePath: data.composePath || \"./docker-compose.yml\",\n\t\t\t\tgiteaId: data.giteaId || \"\",\n\t\t\t\twatchPaths: data.watchPaths || [],\n\t\t\t\tenableSubmodules: data.enableSubmodules ?? false,\n\t\t\t});\n\t\t}\n\t}, [form.reset, data?.composeId, form]);\n\n\tconst onSubmit = async (data: GiteaProvider) => {\n\t\tawait mutateAsync({\n\t\t\tgiteaBranch: data.branch,\n\t\t\tgiteaRepository: data.repository.repo,\n\t\t\tgiteaOwner: data.repository.owner,\n\t\t\tcomposePath: data.composePath,\n\t\t\tgiteaId: data.giteaId,\n\t\t\tcomposeId,\n\t\t\tsourceType: \"gitea\",\n\t\t\tcomposeStatus: \"idle\",\n\t\t\twatchPaths: data.watchPaths,\n\t\t\tenableSubmodules: data.enableSubmodules,\n\t\t} as any)\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(\"Service Provider Saved\");\n\t\t\t\tawait refetch();\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error saving the Gitea provider\");\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<div>\n\t\t\t<Form {...form}>\n\t\t\t\t<form\n\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\tclassName=\"grid w-full gap-4 py-3\"\n\t\t\t\t>\n\t\t\t\t\t{error && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\n\t\t\t\t\t<div className=\"grid md:grid-cols-2 gap-4\">\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"giteaId\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"md:col-span-2 flex flex-col\">\n\t\t\t\t\t\t\t\t\t<FormLabel>Gitea Account</FormLabel>\n\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\tonValueChange={(value) => {\n\t\t\t\t\t\t\t\t\t\t\tfield.onChange(value);\n\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"repository\", {\n\t\t\t\t\t\t\t\t\t\t\t\towner: \"\",\n\t\t\t\t\t\t\t\t\t\t\t\trepo: \"\",\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"branch\", \"\");\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tdefaultValue={field.value}\n\t\t\t\t\t\t\t\t\t\tvalue={field.value}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a Gitea Account\" />\n\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t{giteaProviders?.map((giteaProvider) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={giteaProvider.giteaId}\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={giteaProvider.giteaId}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{giteaProvider.gitProvider.name}\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"repository\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"md:col-span-2 flex flex-col\">\n\t\t\t\t\t\t\t\t\t<div className=\"flex items-center justify-between\">\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Repository</FormLabel>\n\t\t\t\t\t\t\t\t\t\t{field.value.owner && field.value.repo && (\n\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\thref={`${giteaUrl}/${field.value.owner}/${field.value.repo}`}\n\t\t\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1 text-sm text-muted-foreground hover:text-primary\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<GiteaIcon className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t<span>View Repository</span>\n\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<Popover>\n\t\t\t\t\t\t\t\t\t\t<PopoverTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"w-full justify-between !bg-input\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t!field.value && \"text-muted-foreground\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{!field.value.owner\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Select repository\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: isLoadingRepositories\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Loading....\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: (repositories?.find(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(repo) => repo.name === field.value.repo,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)?.name ?? \"Select repository\")}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</PopoverTrigger>\n\t\t\t\t\t\t\t\t\t\t<PopoverContent className=\"p-0\" align=\"start\">\n\t\t\t\t\t\t\t\t\t\t\t<Command>\n\t\t\t\t\t\t\t\t\t\t\t\t<CommandInput\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Search repository...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-9\"\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t{!giteaId ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"py-6 text-center text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSelect a Gitea account first\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t) : isLoadingRepositories ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"py-6 text-center text-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLoading Repositories....\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t\t\t\t<CommandEmpty>No repositories found.</CommandEmpty>\n\t\t\t\t\t\t\t\t\t\t\t\t<ScrollArea className=\"h-96\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{repositories?.map((repo) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={repo.url}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={repo.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"repository\", {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\towner: repo.owner.username,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trepo: repo.name,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"branch\", \"\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>{repo.name}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground text-xs\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{repo.owner.username}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CheckIcon\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"ml-auto h-4 w-4\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trepo.name === field.value.repo\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"opacity-100\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"opacity-0\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t</ScrollArea>\n\t\t\t\t\t\t\t\t\t\t\t</Command>\n\t\t\t\t\t\t\t\t\t\t</PopoverContent>\n\t\t\t\t\t\t\t\t\t</Popover>\n\t\t\t\t\t\t\t\t\t{form.formState.errors.repository && (\n\t\t\t\t\t\t\t\t\t\t<p className={cn(\"text-sm font-medium text-destructive\")}>\n\t\t\t\t\t\t\t\t\t\t\tRepository is required\n\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"branch\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"block w-full\">\n\t\t\t\t\t\t\t\t\t<FormLabel>Branch</FormLabel>\n\t\t\t\t\t\t\t\t\t<Popover>\n\t\t\t\t\t\t\t\t\t\t<PopoverTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"w-full justify-between !bg-input\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t!field.value && \"text-muted-foreground\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{status === \"pending\" && fetchStatus === \"fetching\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Loading....\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: field.value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? branches?.find(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(branch) => branch.name === field.value,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)?.name\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Select branch\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</PopoverTrigger>\n\t\t\t\t\t\t\t\t\t\t<PopoverContent className=\"p-0\" align=\"start\">\n\t\t\t\t\t\t\t\t\t\t\t<Command>\n\t\t\t\t\t\t\t\t\t\t\t\t<CommandInput\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Search branches...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-9\"\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t<CommandEmpty>No branches found.</CommandEmpty>\n\t\t\t\t\t\t\t\t\t\t\t\t<ScrollArea className=\"h-96\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{branches?.map((branch) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={branch.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={branch.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonSelect={() =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"branch\", branch.name)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{branch.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CheckIcon\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"ml-auto h-4 w-4\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbranch.name === field.value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"opacity-100\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"opacity-0\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t</ScrollArea>\n\t\t\t\t\t\t\t\t\t\t\t</Command>\n\t\t\t\t\t\t\t\t\t\t</PopoverContent>\n\t\t\t\t\t\t\t\t\t</Popover>\n\t\t\t\t\t\t\t\t\t{form.formState.errors.branch && (\n\t\t\t\t\t\t\t\t\t\t<p className={cn(\"text-sm font-medium text-destructive\")}>\n\t\t\t\t\t\t\t\t\t\t\tBranch is required\n\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"composePath\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Compose Path</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"docker-compose.yml\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"watchPaths\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"md:col-span-2\">\n\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Watch Paths</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"size-4 rounded-full bg-muted flex items-center justify-center text-[10px] font-bold\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t?\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tAdd paths to watch for changes. When files in these\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpaths change, a new deployment will be triggered.\n\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-wrap gap-2 mb-2\">\n\t\t\t\t\t\t\t\t\t\t{field.value?.map((path, index) => (\n\t\t\t\t\t\t\t\t\t\t\t<Badge key={index} variant=\"secondary\">\n\t\t\t\t\t\t\t\t\t\t\t\t{path}\n\t\t\t\t\t\t\t\t\t\t\t\t<X\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"ml-1 size-3 cursor-pointer\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst newPaths = [...(field.value || [])];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnewPaths.splice(index, 1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"watchPaths\", newPaths);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Enter a path to watch (e.g., src/**, dist/*.js)\"\n\t\t\t\t\t\t\t\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (e.key === \"Enter\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst input = e.currentTarget;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst value = input.value.trim();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (value) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst newPaths = [...(field.value || []), value];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"watchPaths\", newPaths);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tinput.value = \"\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst input = document.querySelector(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'input[placeholder*=\"Enter a path\"]',\n\t\t\t\t\t\t\t\t\t\t\t\t\t) as HTMLInputElement;\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst path = input.value.trim();\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (path) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange([...(field.value || []), path]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tinput.value = \"\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<Plus className=\"size-4\" />\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"enableSubmodules\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"flex items-center space-x-2\">\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormLabel className=\"!mt-0\">Enable Submodules</FormLabel>\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div className=\"flex justify-end\">\n\t\t\t\t\t\t<Button type=\"submit\" isLoading={isSavingGiteaProvider}>\n\t\t\t\t\t\t\tSave\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\t\t\t\t</form>\n\t\t\t</Form>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/compose/general/generic/save-github-provider-compose.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { CheckIcon, ChevronsUpDown, HelpCircle, X } from \"lucide-react\";\nimport Link from \"next/link\";\nimport { useEffect } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { GithubIcon } from \"@/components/icons/data-tools-icons\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCommand,\n\tCommandEmpty,\n\tCommandGroup,\n\tCommandInput,\n\tCommandItem,\n} from \"@/components/ui/command\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport {\n\tPopover,\n\tPopoverContent,\n\tPopoverTrigger,\n} from \"@/components/ui/popover\";\nimport { ScrollArea } from \"@/components/ui/scroll-area\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { Switch } from \"@/components/ui/switch\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { cn } from \"@/lib/utils\";\nimport { api } from \"@/utils/api\";\n\nconst GithubProviderSchema = z.object({\n\tcomposePath: z.string().min(1),\n\trepository: z\n\t\t.object({\n\t\t\trepo: z.string().min(1, \"Repo is required\"),\n\t\t\towner: z.string().min(1, \"Owner is required\"),\n\t\t})\n\t\t.required(),\n\tbranch: z.string().min(1, \"Branch is required\"),\n\tgithubId: z.string().min(1, \"Github Provider is required\"),\n\twatchPaths: z.array(z.string()).optional(),\n\ttriggerType: z.enum([\"push\", \"tag\"]).default(\"push\"),\n\tenableSubmodules: z.boolean().default(false),\n});\n\ntype GithubProvider = z.infer<typeof GithubProviderSchema>;\n\ninterface Props {\n\tcomposeId: string;\n}\n\nexport const SaveGithubProviderCompose = ({ composeId }: Props) => {\n\tconst { data: githubProviders } = api.github.githubProviders.useQuery();\n\tconst { data, refetch } = api.compose.one.useQuery({ composeId });\n\n\tconst { mutateAsync, isPending: isSavingGithubProvider } =\n\t\tapi.compose.update.useMutation();\n\n\tconst form = useForm({\n\t\tdefaultValues: {\n\t\t\tcomposePath: \"./docker-compose.yml\",\n\t\t\trepository: {\n\t\t\t\towner: \"\",\n\t\t\t\trepo: \"\",\n\t\t\t},\n\t\t\tgithubId: \"\",\n\t\t\tbranch: \"\",\n\t\t\twatchPaths: [],\n\t\t\ttriggerType: \"push\",\n\t\t\tenableSubmodules: false,\n\t\t},\n\t\tresolver: zodResolver(GithubProviderSchema),\n\t});\n\n\tconst repository = form.watch(\"repository\");\n\tconst githubId = form.watch(\"githubId\");\n\tconst triggerType = form.watch(\"triggerType\");\n\tconst { data: repositories, isPending: isLoadingRepositories } =\n\t\tapi.github.getGithubRepositories.useQuery(\n\t\t\t{\n\t\t\t\tgithubId,\n\t\t\t},\n\t\t\t{\n\t\t\t\tenabled: !!githubId,\n\t\t\t},\n\t\t);\n\n\tconst {\n\t\tdata: branches,\n\t\tfetchStatus,\n\t\tstatus,\n\t} = api.github.getGithubBranches.useQuery(\n\t\t{\n\t\t\towner: repository?.owner,\n\t\t\trepo: repository?.repo,\n\t\t\tgithubId,\n\t\t},\n\t\t{\n\t\t\tenabled: !!repository?.owner && !!repository?.repo && !!githubId,\n\t\t},\n\t);\n\n\tuseEffect(() => {\n\t\tif (data) {\n\t\t\tform.reset({\n\t\t\t\tbranch: data.branch || \"\",\n\t\t\t\trepository: {\n\t\t\t\t\trepo: data.repository || \"\",\n\t\t\t\t\towner: data.owner || \"\",\n\t\t\t\t},\n\t\t\t\tcomposePath: data.composePath,\n\t\t\t\tgithubId: data.githubId || \"\",\n\t\t\t\twatchPaths: data.watchPaths || [],\n\t\t\t\ttriggerType: data.triggerType || \"push\",\n\t\t\t\tenableSubmodules: data.enableSubmodules ?? false,\n\t\t\t});\n\t\t}\n\t}, [form.reset, data?.composeId, form]);\n\n\tconst onSubmit = async (data: GithubProvider) => {\n\t\tawait mutateAsync({\n\t\t\tbranch: data.branch,\n\t\t\trepository: data.repository.repo,\n\t\t\tcomposeId,\n\t\t\towner: data.repository.owner,\n\t\t\tcomposePath: data.composePath,\n\t\t\tgithubId: data.githubId,\n\t\t\tsourceType: \"github\",\n\t\t\tcomposeStatus: \"idle\",\n\t\t\twatchPaths: data.watchPaths,\n\t\t\tenableSubmodules: data.enableSubmodules,\n\t\t\ttriggerType: data.triggerType,\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(\"Service Provider Saved\");\n\t\t\t\tawait refetch();\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error saving the Github provider\");\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<div>\n\t\t\t<Form {...form}>\n\t\t\t\t<form\n\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\tclassName=\"grid w-full gap-4 py-3\"\n\t\t\t\t>\n\t\t\t\t\t<div className=\"grid md:grid-cols-2 gap-4\">\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"githubId\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"md:col-span-2 flex flex-col\">\n\t\t\t\t\t\t\t\t\t<FormLabel>Github Account</FormLabel>\n\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\tonValueChange={(value) => {\n\t\t\t\t\t\t\t\t\t\t\tfield.onChange(value);\n\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"repository\", {\n\t\t\t\t\t\t\t\t\t\t\t\towner: \"\",\n\t\t\t\t\t\t\t\t\t\t\t\trepo: \"\",\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"branch\", \"\");\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tdefaultValue={field.value}\n\t\t\t\t\t\t\t\t\t\tvalue={field.value}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a Github Account\" />\n\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t{githubProviders?.map((githubProvider) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={githubProvider.githubId}\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={githubProvider.githubId}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{githubProvider.gitProvider.name}\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"repository\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"md:col-span-2 flex flex-col\">\n\t\t\t\t\t\t\t\t\t<div className=\"flex items-center justify-between\">\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Repository</FormLabel>\n\t\t\t\t\t\t\t\t\t\t{field.value.owner && field.value.repo && (\n\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\thref={`https://github.com/${field.value.owner}/${field.value.repo}`}\n\t\t\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1 text-sm text-muted-foreground hover:text-primary\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<GithubIcon className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t<span>View Repository</span>\n\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<Popover>\n\t\t\t\t\t\t\t\t\t\t<PopoverTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"w-full justify-between !bg-input\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t!field.value && \"text-muted-foreground\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{!field.value.owner\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Select repository\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: isLoadingRepositories\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Loading....\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: (repositories?.find(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(repo) => repo.name === field.value.repo,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)?.name ?? \"Select repository\")}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</PopoverTrigger>\n\t\t\t\t\t\t\t\t\t\t<PopoverContent className=\"p-0\" align=\"start\">\n\t\t\t\t\t\t\t\t\t\t\t<Command>\n\t\t\t\t\t\t\t\t\t\t\t\t<CommandInput\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Search repository...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-9\"\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t{!githubId ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"py-6 text-center text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSelect a GitHub account first\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t) : isLoadingRepositories ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"py-6 text-center text-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLoading Repositories....\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t\t\t\t<CommandEmpty>No repositories found.</CommandEmpty>\n\t\t\t\t\t\t\t\t\t\t\t\t<ScrollArea className=\"h-96\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{repositories?.map((repo) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={repo.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={repo.url}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"repository\", {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\towner: repo.owner.login as string,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trepo: repo.name,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"branch\", \"\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>{repo.name}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground text-xs\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{repo.owner.login}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CheckIcon\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"ml-auto h-4 w-4\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trepo.name === field.value.repo\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"opacity-100\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"opacity-0\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t</ScrollArea>\n\t\t\t\t\t\t\t\t\t\t\t</Command>\n\t\t\t\t\t\t\t\t\t\t</PopoverContent>\n\t\t\t\t\t\t\t\t\t</Popover>\n\t\t\t\t\t\t\t\t\t{form.formState.errors.repository && (\n\t\t\t\t\t\t\t\t\t\t<p className={cn(\"text-sm font-medium text-destructive\")}>\n\t\t\t\t\t\t\t\t\t\t\tRepository is required\n\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"branch\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"block w-full\">\n\t\t\t\t\t\t\t\t\t<FormLabel>Branch</FormLabel>\n\t\t\t\t\t\t\t\t\t<Popover>\n\t\t\t\t\t\t\t\t\t\t<PopoverTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\" w-full justify-between !bg-input\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t!field.value && \"text-muted-foreground\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{status === \"pending\" && fetchStatus === \"fetching\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Loading....\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: field.value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? branches?.find(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(branch) => branch.name === field.value,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)?.name\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Select branch\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</PopoverTrigger>\n\t\t\t\t\t\t\t\t\t\t<PopoverContent className=\"p-0\" align=\"start\">\n\t\t\t\t\t\t\t\t\t\t\t<Command>\n\t\t\t\t\t\t\t\t\t\t\t\t<CommandInput\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Search branch...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-9\"\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t{status === \"pending\" && fetchStatus === \"fetching\" && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"py-6 text-center text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLoading Branches....\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t{!repository?.owner && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"py-6 text-center text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSelect a repository\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t<ScrollArea className=\"h-96\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandEmpty>No branch found.</CommandEmpty>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{branches?.map((branch) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={branch.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={branch.commit.sha}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"branch\", branch.name);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{branch.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CheckIcon\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"ml-auto h-4 w-4\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbranch.name === field.value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"opacity-100\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"opacity-0\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t</ScrollArea>\n\t\t\t\t\t\t\t\t\t\t\t</Command>\n\t\t\t\t\t\t\t\t\t\t</PopoverContent>\n\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</Popover>\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"composePath\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Compose Path</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"docker-compose.yml\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"triggerType\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"md:col-span-2\">\n\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Trigger Type</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<HelpCircle className=\"size-4 text-muted-foreground hover:text-foreground transition-colors cursor-pointer\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tChoose when to trigger deployments: on push to the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tselected branch or when a new tag is created.\n\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\tonValueChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\tdefaultValue={field.value}\n\t\t\t\t\t\t\t\t\t\tvalue={field.value}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a trigger type\" />\n\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"push\">On Push</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"tag\">On Tag</SelectItem>\n\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{triggerType === \"push\" && (\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"watchPaths\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem className=\"md:col-span-2\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Watch Paths</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"size-4 rounded-full bg-muted flex items-center justify-center text-[10px] font-bold\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t?\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAdd paths to watch for changes. When files in\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthese paths change, a new deployment will be\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttriggered.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-wrap gap-2 mb-2\">\n\t\t\t\t\t\t\t\t\t\t\t{field.value?.map((path, index) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<Badge key={index} variant=\"secondary\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{path}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<X\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"ml-1 size-3 cursor-pointer\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst newPaths = [...(field.value || [])];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnewPaths.splice(index, 1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"watchPaths\", newPaths);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Enter a path to watch (e.g., src/**, dist/*.js)\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (e.key === \"Enter\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst input = e.currentTarget;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst value = input.value.trim();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (value) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst newPaths = [\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t...(field.value || []),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"watchPaths\", newPaths);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tinput.value = \"\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst input = document.querySelector(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'input[placeholder=\"Enter a path to watch (e.g., src/**, dist/*.js)\"]',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t) as HTMLInputElement;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst value = input.value.trim();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (value) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst newPaths = [...(field.value || []), value];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"watchPaths\", newPaths);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tinput.value = \"\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\tAdd\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"enableSubmodules\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"flex items-center space-x-2\">\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormLabel className=\"!mt-0\">Enable Submodules</FormLabel>\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"flex w-full justify-end\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tisLoading={isSavingGithubProvider}\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\tclassName=\"w-fit\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tSave\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\t\t\t\t</form>\n\t\t\t</Form>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/compose/general/generic/save-gitlab-provider-compose.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { CheckIcon, ChevronsUpDown, X } from \"lucide-react\";\nimport Link from \"next/link\";\nimport { useEffect, useMemo } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { GitlabIcon } from \"@/components/icons/data-tools-icons\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCommand,\n\tCommandEmpty,\n\tCommandGroup,\n\tCommandInput,\n\tCommandItem,\n} from \"@/components/ui/command\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport {\n\tPopover,\n\tPopoverContent,\n\tPopoverTrigger,\n} from \"@/components/ui/popover\";\nimport { ScrollArea } from \"@/components/ui/scroll-area\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { Switch } from \"@/components/ui/switch\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { cn } from \"@/lib/utils\";\nimport { api } from \"@/utils/api\";\n\nconst GitlabProviderSchema = z.object({\n\tcomposePath: z.string().min(1),\n\trepository: z\n\t\t.object({\n\t\t\trepo: z.string().min(1, \"Repo is required\"),\n\t\t\towner: z.string().min(1, \"Owner is required\"),\n\t\t\tid: z.number().nullable(),\n\t\t\tgitlabPathNamespace: z.string().min(1),\n\t\t})\n\t\t.required(),\n\tbranch: z.string().min(1, \"Branch is required\"),\n\tgitlabId: z.string().min(1, \"Gitlab Provider is required\"),\n\twatchPaths: z.array(z.string()).optional(),\n\tenableSubmodules: z.boolean().default(false),\n});\n\ntype GitlabProvider = z.infer<typeof GitlabProviderSchema>;\n\ninterface Props {\n\tcomposeId: string;\n}\n\nexport const SaveGitlabProviderCompose = ({ composeId }: Props) => {\n\tconst { data: gitlabProviders } = api.gitlab.gitlabProviders.useQuery();\n\tconst { data, refetch } = api.compose.one.useQuery({ composeId });\n\n\tconst { mutateAsync, isPending: isSavingGitlabProvider } =\n\t\tapi.compose.update.useMutation();\n\n\tconst form = useForm({\n\t\tdefaultValues: {\n\t\t\tcomposePath: \"./docker-compose.yml\",\n\t\t\trepository: {\n\t\t\t\towner: \"\",\n\t\t\t\trepo: \"\",\n\t\t\t\tgitlabPathNamespace: \"\",\n\t\t\t\tid: null,\n\t\t\t},\n\t\t\tgitlabId: \"\",\n\t\t\tbranch: \"\",\n\t\t\twatchPaths: [],\n\t\t\tenableSubmodules: false,\n\t\t},\n\t\tresolver: zodResolver(GitlabProviderSchema),\n\t});\n\n\tconst repository = form.watch(\"repository\");\n\tconst gitlabId = form.watch(\"gitlabId\");\n\n\tconst gitlabUrl = useMemo(() => {\n\t\tconst url = gitlabProviders?.find(\n\t\t\t(provider) => provider.gitlabId === gitlabId,\n\t\t)?.gitlabUrl;\n\n\t\tconst gitlabUrl = url?.replace(/\\/$/, \"\");\n\n\t\treturn gitlabUrl || \"https://gitlab.com\";\n\t}, [gitlabId, gitlabProviders]);\n\n\tconst {\n\t\tdata: repositories,\n\t\tisLoading: isLoadingRepositories,\n\t\terror,\n\t} = api.gitlab.getGitlabRepositories.useQuery(\n\t\t{\n\t\t\tgitlabId,\n\t\t},\n\t\t{\n\t\t\tenabled: !!gitlabId,\n\t\t},\n\t);\n\n\tconst {\n\t\tdata: branches,\n\t\tfetchStatus,\n\t\tstatus,\n\t} = api.gitlab.getGitlabBranches.useQuery(\n\t\t{\n\t\t\towner: repository?.owner,\n\t\t\trepo: repository?.repo,\n\t\t\tid: repository?.id || 0,\n\t\t\tgitlabId: gitlabId,\n\t\t},\n\t\t{\n\t\t\tenabled: !!repository?.owner && !!repository?.repo && !!gitlabId,\n\t\t},\n\t);\n\n\tuseEffect(() => {\n\t\tif (data) {\n\t\t\tform.reset({\n\t\t\t\tbranch: data.gitlabBranch || \"\",\n\t\t\t\trepository: {\n\t\t\t\t\trepo: data.gitlabRepository || \"\",\n\t\t\t\t\towner: data.gitlabOwner || \"\",\n\t\t\t\t\tid: data.gitlabProjectId,\n\t\t\t\t\tgitlabPathNamespace: data.gitlabPathNamespace || \"\",\n\t\t\t\t},\n\t\t\t\tcomposePath: data.composePath,\n\t\t\t\tgitlabId: data.gitlabId || \"\",\n\t\t\t\twatchPaths: data.watchPaths || [],\n\t\t\t\tenableSubmodules: data.enableSubmodules ?? false,\n\t\t\t});\n\t\t}\n\t}, [form.reset, data?.composeId, form]);\n\n\tconst onSubmit = async (data: GitlabProvider) => {\n\t\tawait mutateAsync({\n\t\t\tgitlabBranch: data.branch,\n\t\t\tgitlabRepository: data.repository.repo,\n\t\t\tgitlabOwner: data.repository.owner,\n\t\t\tcomposePath: data.composePath,\n\t\t\tgitlabId: data.gitlabId,\n\t\t\tcomposeId,\n\t\t\tgitlabProjectId: data.repository.id,\n\t\t\tgitlabPathNamespace: data.repository.gitlabPathNamespace,\n\t\t\tsourceType: \"gitlab\",\n\t\t\tcomposeStatus: \"idle\",\n\t\t\twatchPaths: data.watchPaths,\n\t\t\tenableSubmodules: data.enableSubmodules,\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(\"Service Provider Saved\");\n\t\t\t\tawait refetch();\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error saving the Gitlab provider\");\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<div>\n\t\t\t<Form {...form}>\n\t\t\t\t<form\n\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\tclassName=\"grid w-full gap-4 py-3\"\n\t\t\t\t>\n\t\t\t\t\t{error && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\t\t\t\t\t<div className=\"grid md:grid-cols-2 gap-4\">\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"gitlabId\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"md:col-span-2 flex flex-col\">\n\t\t\t\t\t\t\t\t\t<FormLabel>Gitlab Account</FormLabel>\n\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\tonValueChange={(value) => {\n\t\t\t\t\t\t\t\t\t\t\tfield.onChange(value);\n\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"repository\", {\n\t\t\t\t\t\t\t\t\t\t\t\towner: \"\",\n\t\t\t\t\t\t\t\t\t\t\t\trepo: \"\",\n\t\t\t\t\t\t\t\t\t\t\t\tgitlabPathNamespace: \"\",\n\t\t\t\t\t\t\t\t\t\t\t\tid: null,\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"branch\", \"\");\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tdefaultValue={field.value}\n\t\t\t\t\t\t\t\t\t\tvalue={field.value}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a Gitlab Account\" />\n\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t{gitlabProviders?.map((gitlabProvider) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={gitlabProvider.gitlabId}\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={gitlabProvider.gitlabId}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{gitlabProvider.gitProvider.name}\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"repository\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"md:col-span-2 flex flex-col\">\n\t\t\t\t\t\t\t\t\t<div className=\"flex items-center justify-between\">\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Repository</FormLabel>\n\t\t\t\t\t\t\t\t\t\t{field.value.gitlabPathNamespace && (\n\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\thref={`${gitlabUrl}/${field.value.gitlabPathNamespace}`}\n\t\t\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1 text-sm text-muted-foreground hover:text-primary\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<GitlabIcon className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t<span>View Repository</span>\n\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<Popover>\n\t\t\t\t\t\t\t\t\t\t<PopoverTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"w-full justify-between !bg-input\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t!field.value && \"text-muted-foreground\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{!field.value.owner\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Select repository\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: isLoadingRepositories\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Loading....\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: (repositories?.find(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(repo) => repo.name === field.value.repo,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)?.name ?? \"Select repository\")}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</PopoverTrigger>\n\t\t\t\t\t\t\t\t\t\t<PopoverContent className=\"p-0\" align=\"start\">\n\t\t\t\t\t\t\t\t\t\t\t<Command>\n\t\t\t\t\t\t\t\t\t\t\t\t<CommandInput\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Search repository...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-9\"\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t{!gitlabId ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"py-6 text-center text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSelect a GitLab account first\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t) : isLoadingRepositories ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"py-6 text-center text-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLoading Repositories....\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t\t\t\t<CommandEmpty>No repositories found.</CommandEmpty>\n\t\t\t\t\t\t\t\t\t\t\t\t<ScrollArea className=\"h-96\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{repositories && repositories.length === 0 && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandEmpty>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tNo repositories found.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandEmpty>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{repositories?.map((repo) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={repo.url}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={repo.url}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"repository\", {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\towner: repo.owner.username as string,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trepo: repo.name,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tid: repo.id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgitlabPathNamespace: repo.url,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"branch\", \"\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>{repo.name}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground text-xs\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{repo.owner.username}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CheckIcon\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"ml-auto h-4 w-4\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trepo.url ===\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.value.gitlabPathNamespace\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"opacity-100\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"opacity-0\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t</ScrollArea>\n\t\t\t\t\t\t\t\t\t\t\t</Command>\n\t\t\t\t\t\t\t\t\t\t</PopoverContent>\n\t\t\t\t\t\t\t\t\t</Popover>\n\t\t\t\t\t\t\t\t\t{form.formState.errors.repository && (\n\t\t\t\t\t\t\t\t\t\t<p className={cn(\"text-sm font-medium text-destructive\")}>\n\t\t\t\t\t\t\t\t\t\t\tRepository is required\n\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"branch\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"block w-full\">\n\t\t\t\t\t\t\t\t\t<FormLabel>Branch</FormLabel>\n\t\t\t\t\t\t\t\t\t<Popover>\n\t\t\t\t\t\t\t\t\t\t<PopoverTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\" w-full justify-between !bg-input\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t!field.value && \"text-muted-foreground\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{status === \"pending\" && fetchStatus === \"fetching\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Loading....\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: field.value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? branches?.find(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(branch) => branch.name === field.value,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)?.name\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Select branch\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</PopoverTrigger>\n\t\t\t\t\t\t\t\t\t\t<PopoverContent className=\"p-0\" align=\"start\">\n\t\t\t\t\t\t\t\t\t\t\t<Command>\n\t\t\t\t\t\t\t\t\t\t\t\t<CommandInput\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Search branch...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-9\"\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t{status === \"pending\" && fetchStatus === \"fetching\" && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"py-6 text-center text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLoading Branches....\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t{!repository?.owner && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"py-6 text-center text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSelect a repository\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t<ScrollArea className=\"h-96\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandEmpty>No branch found.</CommandEmpty>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{branches?.map((branch) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={branch.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={branch.commit.id}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"branch\", branch.name);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{branch.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CheckIcon\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"ml-auto h-4 w-4\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbranch.name === field.value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"opacity-100\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"opacity-0\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t</ScrollArea>\n\t\t\t\t\t\t\t\t\t\t\t</Command>\n\t\t\t\t\t\t\t\t\t\t</PopoverContent>\n\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</Popover>\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"composePath\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Compose Path</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"docker-compose.yml\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"watchPaths\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"md:col-span-2\">\n\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Watch Paths</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"size-4 rounded-full bg-muted flex items-center justify-center text-[10px] font-bold\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t?\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tAdd paths to watch for changes. When files in these\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpaths change, a new deployment will be triggered.\n\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-wrap gap-2 mb-2\">\n\t\t\t\t\t\t\t\t\t\t{field.value?.map((path, index) => (\n\t\t\t\t\t\t\t\t\t\t\t<Badge key={index} variant=\"secondary\">\n\t\t\t\t\t\t\t\t\t\t\t\t{path}\n\t\t\t\t\t\t\t\t\t\t\t\t<X\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"ml-1 size-3 cursor-pointer\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst newPaths = [...(field.value || [])];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnewPaths.splice(index, 1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"watchPaths\", newPaths);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Enter a path to watch (e.g., src/**, dist/*.js)\"\n\t\t\t\t\t\t\t\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (e.key === \"Enter\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst input = e.currentTarget;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst value = input.value.trim();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (value) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst newPaths = [...(field.value || []), value];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"watchPaths\", newPaths);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tinput.value = \"\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst input = document.querySelector(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'input[placeholder=\"Enter a path to watch (e.g., src/**, dist/*.js)\"]',\n\t\t\t\t\t\t\t\t\t\t\t\t\t) as HTMLInputElement;\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst value = input.value.trim();\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (value) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst newPaths = [...(field.value || []), value];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"watchPaths\", newPaths);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tinput.value = \"\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\tAdd\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"enableSubmodules\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"flex items-center space-x-2\">\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormLabel className=\"!mt-0\">Enable Submodules</FormLabel>\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"flex w-full justify-end\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tisLoading={isSavingGitlabProvider}\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\tclassName=\"w-fit\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tSave\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\t\t\t\t</form>\n\t\t\t</Form>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/compose/general/generic/show.tsx",
    "content": "import { CodeIcon, GitBranch, Loader2 } from \"lucide-react\";\nimport Link from \"next/link\";\nimport { useState } from \"react\";\nimport { toast } from \"sonner\";\nimport { UnauthorizedGitProvider } from \"@/components/dashboard/application/general/generic/unauthorized-git-provider\";\nimport {\n\tBitbucketIcon,\n\tGiteaIcon,\n\tGithubIcon,\n\tGitIcon,\n\tGitlabIcon,\n} from \"@/components/icons/data-tools-icons\";\nimport { Card, CardContent, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport { Tabs, TabsContent, TabsList, TabsTrigger } from \"@/components/ui/tabs\";\nimport { api } from \"@/utils/api\";\nimport { ComposeFileEditor } from \"../compose-file-editor\";\nimport { ShowConvertedCompose } from \"../show-converted-compose\";\nimport { SaveBitbucketProviderCompose } from \"./save-bitbucket-provider-compose\";\nimport { SaveGitProviderCompose } from \"./save-git-provider-compose\";\nimport { SaveGiteaProviderCompose } from \"./save-gitea-provider-compose\";\nimport { SaveGithubProviderCompose } from \"./save-github-provider-compose\";\nimport { SaveGitlabProviderCompose } from \"./save-gitlab-provider-compose\";\n\ntype TabState = \"github\" | \"git\" | \"raw\" | \"gitlab\" | \"bitbucket\" | \"gitea\";\ninterface Props {\n\tcomposeId: string;\n}\n\nexport const ShowProviderFormCompose = ({ composeId }: Props) => {\n\tconst { data: githubProviders, isPending: isLoadingGithub } =\n\t\tapi.github.githubProviders.useQuery();\n\tconst { data: gitlabProviders, isPending: isLoadingGitlab } =\n\t\tapi.gitlab.gitlabProviders.useQuery();\n\tconst { data: bitbucketProviders, isPending: isLoadingBitbucket } =\n\t\tapi.bitbucket.bitbucketProviders.useQuery();\n\tconst { data: giteaProviders, isPending: isLoadingGitea } =\n\t\tapi.gitea.giteaProviders.useQuery();\n\n\tconst { mutateAsync: disconnectGitProvider } =\n\t\tapi.compose.disconnectGitProvider.useMutation();\n\n\tconst { data: compose, refetch } = api.compose.one.useQuery({ composeId });\n\tconst [tab, setSab] = useState<TabState>(compose?.sourceType || \"github\");\n\n\tconst isLoading =\n\t\tisLoadingGithub || isLoadingGitlab || isLoadingBitbucket || isLoadingGitea;\n\n\tconst handleDisconnect = async () => {\n\t\ttry {\n\t\t\tawait disconnectGitProvider({ composeId });\n\t\t\ttoast.success(\"Repository disconnected successfully\");\n\t\t\tawait refetch();\n\t\t} catch (error) {\n\t\t\ttoast.error(\n\t\t\t\t`Failed to disconnect repository: ${\n\t\t\t\t\terror instanceof Error ? error.message : \"Unknown error\"\n\t\t\t\t}`,\n\t\t\t);\n\t\t}\n\t};\n\n\tif (isLoading) {\n\t\treturn (\n\t\t\t<Card className=\"group relative w-full bg-transparent\">\n\t\t\t\t<CardHeader>\n\t\t\t\t\t<CardTitle className=\"flex items-start justify-between\">\n\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t<span className=\"flex flex-col space-y-0.5\">Provider</span>\n\t\t\t\t\t\t\t<p className=\"flex items-center text-sm font-normal text-muted-foreground\">\n\t\t\t\t\t\t\t\tSelect the source of your code\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"hidden space-y-1 text-sm font-normal md:block\">\n\t\t\t\t\t\t\t<GitBranch className=\"size-6 text-muted-foreground\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</CardTitle>\n\t\t\t\t</CardHeader>\n\t\t\t\t<CardContent>\n\t\t\t\t\t<div className=\"flex min-h-[25vh] items-center justify-center\">\n\t\t\t\t\t\t<div className=\"flex items-center gap-2 text-muted-foreground\">\n\t\t\t\t\t\t\t<Loader2 className=\"size-4 animate-spin\" />\n\t\t\t\t\t\t\t<span>Loading providers...</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</CardContent>\n\t\t\t</Card>\n\t\t);\n\t}\n\n\t// Check if user doesn't have access to the current git provider\n\tif (\n\t\tcompose &&\n\t\t!compose.hasGitProviderAccess &&\n\t\tcompose.sourceType !== \"raw\"\n\t) {\n\t\treturn (\n\t\t\t<Card className=\"group relative w-full bg-transparent\">\n\t\t\t\t<CardHeader>\n\t\t\t\t\t<CardTitle className=\"flex items-start justify-between\">\n\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t<span className=\"flex flex-col space-y-0.5\">Provider</span>\n\t\t\t\t\t\t\t<p className=\"flex items-center text-sm font-normal text-muted-foreground\">\n\t\t\t\t\t\t\t\tRepository connection through unauthorized provider\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"hidden space-y-1 text-sm font-normal md:block\">\n\t\t\t\t\t\t\t<GitBranch className=\"size-6 text-muted-foreground\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</CardTitle>\n\t\t\t\t</CardHeader>\n\t\t\t\t<CardContent>\n\t\t\t\t\t<UnauthorizedGitProvider\n\t\t\t\t\t\tservice={compose}\n\t\t\t\t\t\tonDisconnect={handleDisconnect}\n\t\t\t\t\t/>\n\t\t\t\t</CardContent>\n\t\t\t</Card>\n\t\t);\n\t}\n\n\treturn (\n\t\t<Card className=\"group relative w-full bg-transparent\">\n\t\t\t<CardHeader>\n\t\t\t\t<CardTitle className=\"flex items-start justify-between\">\n\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t<span className=\"flex flex-col space-y-0.5\">Provider</span>\n\t\t\t\t\t\t<p className=\"flex items-center text-sm font-normal text-muted-foreground\">\n\t\t\t\t\t\t\tSelect the source of your code\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"hidden space-y-1 text-sm font-normal md:flex flex-row items-center gap-2\">\n\t\t\t\t\t\t<ShowConvertedCompose composeId={composeId} />\n\t\t\t\t\t\t<GitBranch className=\"size-6 text-muted-foreground\" />\n\t\t\t\t\t</div>\n\t\t\t\t</CardTitle>\n\t\t\t</CardHeader>\n\t\t\t<CardContent>\n\t\t\t\t<Tabs\n\t\t\t\t\tvalue={tab}\n\t\t\t\t\tclassName=\"w-full\"\n\t\t\t\t\tonValueChange={(e) => {\n\t\t\t\t\t\tsetSab(e as TabState);\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<div className=\"flex flex-row items-center justify-between w-full overflow-auto\">\n\t\t\t\t\t\t<TabsList className=\"flex gap-4 justify-start bg-transparent\">\n\t\t\t\t\t\t\t<TabsTrigger\n\t\t\t\t\t\t\t\tvalue=\"github\"\n\t\t\t\t\t\t\t\tclassName=\"rounded-none border-b-2 gap-2 border-b-transparent data-[state=active]:border-b-2 data-[state=active]:border-b-border\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<GithubIcon className=\"size-4 text-current fill-current\" />\n\t\t\t\t\t\t\t\tGitHub\n\t\t\t\t\t\t\t</TabsTrigger>\n\t\t\t\t\t\t\t<TabsTrigger\n\t\t\t\t\t\t\t\tvalue=\"gitlab\"\n\t\t\t\t\t\t\t\tclassName=\"rounded-none border-b-2 gap-2 border-b-transparent data-[state=active]:border-b-2 data-[state=active]:border-b-border\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<GitlabIcon className=\"size-4 text-current fill-current\" />\n\t\t\t\t\t\t\t\tGitLab\n\t\t\t\t\t\t\t</TabsTrigger>\n\t\t\t\t\t\t\t<TabsTrigger\n\t\t\t\t\t\t\t\tvalue=\"bitbucket\"\n\t\t\t\t\t\t\t\tclassName=\"rounded-none border-b-2 gap-2 border-b-transparent data-[state=active]:border-b-2 data-[state=active]:border-b-border\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<BitbucketIcon className=\"size-4 text-current fill-current\" />\n\t\t\t\t\t\t\t\tBitbucket\n\t\t\t\t\t\t\t</TabsTrigger>\n\t\t\t\t\t\t\t<TabsTrigger\n\t\t\t\t\t\t\t\tvalue=\"gitea\"\n\t\t\t\t\t\t\t\tclassName=\"rounded-none border-b-2 gap-2 border-b-transparent data-[state=active]:border-b-2 data-[state=active]:border-b-border\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<GiteaIcon className=\"size-4 text-current fill-current\" /> Gitea\n\t\t\t\t\t\t\t</TabsTrigger>\n\t\t\t\t\t\t\t<TabsTrigger\n\t\t\t\t\t\t\t\tvalue=\"git\"\n\t\t\t\t\t\t\t\tclassName=\"rounded-none border-b-2 gap-2 border-b-transparent data-[state=active]:border-b-2 data-[state=active]:border-b-border\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<GitIcon />\n\t\t\t\t\t\t\t\tGit\n\t\t\t\t\t\t\t</TabsTrigger>\n\t\t\t\t\t\t\t<TabsTrigger\n\t\t\t\t\t\t\t\tvalue=\"raw\"\n\t\t\t\t\t\t\t\tclassName=\"rounded-none border-b-2 gap-2 border-b-transparent data-[state=active]:border-b-2 data-[state=active]:border-b-border\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<CodeIcon className=\"size-4\" />\n\t\t\t\t\t\t\t\tRaw\n\t\t\t\t\t\t\t</TabsTrigger>\n\t\t\t\t\t\t</TabsList>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<TabsContent value=\"github\" className=\"w-full p-2\">\n\t\t\t\t\t\t{githubProviders && githubProviders?.length > 0 ? (\n\t\t\t\t\t\t\t<SaveGithubProviderCompose composeId={composeId} />\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<div className=\"flex flex-col items-center gap-3 min-h-[25vh] justify-center\">\n\t\t\t\t\t\t\t\t<GithubIcon className=\"size-8 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t<span className=\"text-base text-muted-foreground\">\n\t\t\t\t\t\t\t\t\tTo deploy using GitHub, you need to configure your account\n\t\t\t\t\t\t\t\t\tfirst. Please, go to{\" \"}\n\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\thref=\"/dashboard/settings/git-providers\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"text-foreground\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tSettings\n\t\t\t\t\t\t\t\t\t</Link>{\" \"}\n\t\t\t\t\t\t\t\t\tto do so.\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</TabsContent>\n\t\t\t\t\t<TabsContent value=\"gitlab\" className=\"w-full p-2\">\n\t\t\t\t\t\t{gitlabProviders && gitlabProviders?.length > 0 ? (\n\t\t\t\t\t\t\t<SaveGitlabProviderCompose composeId={composeId} />\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<div className=\"flex flex-col items-center gap-3 min-h-[25vh] justify-center\">\n\t\t\t\t\t\t\t\t<GitlabIcon className=\"size-8 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t<span className=\"text-base text-muted-foreground\">\n\t\t\t\t\t\t\t\t\tTo deploy using GitLab, you need to configure your account\n\t\t\t\t\t\t\t\t\tfirst. Please, go to{\" \"}\n\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\thref=\"/dashboard/settings/git-providers\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"text-foreground\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tSettings\n\t\t\t\t\t\t\t\t\t</Link>{\" \"}\n\t\t\t\t\t\t\t\t\tto do so.\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</TabsContent>\n\t\t\t\t\t<TabsContent value=\"bitbucket\" className=\"w-full p-2\">\n\t\t\t\t\t\t{bitbucketProviders && bitbucketProviders?.length > 0 ? (\n\t\t\t\t\t\t\t<SaveBitbucketProviderCompose composeId={composeId} />\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<div className=\"flex flex-col items-center gap-3 min-h-[25vh] justify-center\">\n\t\t\t\t\t\t\t\t<BitbucketIcon className=\"size-8 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t<span className=\"text-base text-muted-foreground\">\n\t\t\t\t\t\t\t\t\tTo deploy using Bitbucket, you need to configure your account\n\t\t\t\t\t\t\t\t\tfirst. Please, go to{\" \"}\n\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\thref=\"/dashboard/settings/git-providers\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"text-foreground\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tSettings\n\t\t\t\t\t\t\t\t\t</Link>{\" \"}\n\t\t\t\t\t\t\t\t\tto do so.\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</TabsContent>\n\t\t\t\t\t<TabsContent value=\"gitea\" className=\"w-full p-2\">\n\t\t\t\t\t\t{giteaProviders && giteaProviders?.length > 0 ? (\n\t\t\t\t\t\t\t<SaveGiteaProviderCompose composeId={composeId} />\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<div className=\"flex flex-col items-center gap-3 min-h-[25vh] justify-center\">\n\t\t\t\t\t\t\t\t<GiteaIcon className=\"size-8 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t<span className=\"text-base text-muted-foreground\">\n\t\t\t\t\t\t\t\t\tTo deploy using Gitea, you need to configure your account\n\t\t\t\t\t\t\t\t\tfirst. Please, go to{\" \"}\n\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\thref=\"/dashboard/settings/git-providers\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"text-foreground\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tSettings\n\t\t\t\t\t\t\t\t\t</Link>{\" \"}\n\t\t\t\t\t\t\t\t\tto do so.\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</TabsContent>\n\t\t\t\t\t<TabsContent value=\"git\" className=\"w-full p-2\">\n\t\t\t\t\t\t<SaveGitProviderCompose composeId={composeId} />\n\t\t\t\t\t</TabsContent>\n\n\t\t\t\t\t<TabsContent value=\"raw\" className=\"w-full p-2 flex flex-col gap-4\">\n\t\t\t\t\t\t<ComposeFileEditor composeId={composeId} />\n\t\t\t\t\t</TabsContent>\n\t\t\t\t</Tabs>\n\t\t\t</CardContent>\n\t\t</Card>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/compose/general/randomize-compose.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { AlertTriangle } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { CodeEditor } from \"@/components/shared/code-editor\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialogDescription,\n\tDialogHeader,\n\tDialogTitle,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { Switch } from \"@/components/ui/switch\";\nimport { api } from \"@/utils/api\";\n\ninterface Props {\n\tcomposeId: string;\n}\n\nconst schema = z.object({\n\tsuffix: z.string(),\n\trandomize: z.boolean().optional(),\n});\n\ntype Schema = z.infer<typeof schema>;\n\nexport const RandomizeCompose = ({ composeId }: Props) => {\n\tconst utils = api.useUtils();\n\tconst [compose, setCompose] = useState<string>(\"\");\n\tconst [_isOpen, _setIsOpen] = useState(false);\n\tconst { mutateAsync, error, isError } =\n\t\tapi.compose.randomizeCompose.useMutation();\n\n\tconst { mutateAsync: updateCompose } = api.compose.update.useMutation();\n\n\tconst { data, refetch } = api.compose.one.useQuery(\n\t\t{ composeId },\n\t\t{ enabled: !!composeId },\n\t);\n\n\tconst form = useForm<Schema>({\n\t\tdefaultValues: {\n\t\t\tsuffix: \"\",\n\t\t\trandomize: false,\n\t\t},\n\t\tresolver: zodResolver(schema),\n\t});\n\n\tconst suffix = form.watch(\"suffix\");\n\n\tuseEffect(() => {\n\t\trandomizeCompose();\n\t\tif (data) {\n\t\t\tform.reset({\n\t\t\t\tsuffix: data?.suffix || \"\",\n\t\t\t\trandomize: data?.randomize || false,\n\t\t\t});\n\t\t}\n\t}, [form, form.reset, form.formState.isSubmitSuccessful, data]);\n\n\tconst onSubmit = async (formData: Schema) => {\n\t\tawait updateCompose({\n\t\t\tcomposeId,\n\t\t\tsuffix: formData?.suffix || \"\",\n\t\t\trandomize: formData?.randomize || false,\n\t\t})\n\t\t\t.then(async (_data) => {\n\t\t\t\tawait randomizeCompose();\n\t\t\t\tawait refetch();\n\t\t\t\ttoast.success(\"Compose updated\");\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error randomizing the compose\");\n\t\t\t});\n\t};\n\n\tconst randomizeCompose = async () => {\n\t\tawait mutateAsync({\n\t\t\tcomposeId,\n\t\t\tsuffix,\n\t\t}).then(async (data) => {\n\t\t\tawait utils.project.all.invalidate();\n\t\t\tsetCompose(data);\n\t\t});\n\t};\n\n\treturn (\n\t\t<div className=\"w-full\">\n\t\t\t<DialogHeader>\n\t\t\t\t<DialogTitle>Randomize Compose (Experimental)</DialogTitle>\n\t\t\t\t<DialogDescription>\n\t\t\t\t\tUse this in case you want to deploy the same compose file and you have\n\t\t\t\t\tconflicts with some property like volumes, networks, etc.\n\t\t\t\t</DialogDescription>\n\t\t\t</DialogHeader>\n\t\t\t<div className=\"text-sm text-muted-foreground flex flex-col gap-2\">\n\t\t\t\t<span>\n\t\t\t\t\tThis will randomize the compose file and will add a suffix to the\n\t\t\t\t\tproperty to avoid conflicts\n\t\t\t\t</span>\n\t\t\t\t<ul className=\"list-disc list-inside\">\n\t\t\t\t\t<li>volumes</li>\n\t\t\t\t\t<li>networks</li>\n\t\t\t\t\t<li>services</li>\n\t\t\t\t\t<li>configs</li>\n\t\t\t\t\t<li>secrets</li>\n\t\t\t\t</ul>\n\t\t\t\t<AlertBlock type=\"info\">\n\t\t\t\t\tWhen you activate this option, we will include a env `COMPOSE_PREFIX`\n\t\t\t\t\tvariable to the compose file so you can use it in your compose file.\n\t\t\t\t</AlertBlock>\n\t\t\t</div>\n\t\t\t{isError && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\t\t\t<Form {...form}>\n\t\t\t\t<form\n\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\tid=\"hook-form-add-project\"\n\t\t\t\t\tclassName=\"grid w-full gap-4\"\n\t\t\t\t>\n\t\t\t\t\t{isError && (\n\t\t\t\t\t\t<div className=\"flex flex-row gap-4 rounded-lg items-center bg-red-50 p-2 dark:bg-red-950\">\n\t\t\t\t\t\t\t<AlertTriangle className=\"text-red-600 dark:text-red-400\" />\n\t\t\t\t\t\t\t<span className=\"text-sm text-red-600 dark:text-red-400\">\n\t\t\t\t\t\t\t\t{error?.message}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\n\t\t\t\t\t<div className=\"flex flex-col lg:flex-col  gap-4 w-full \">\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"suffix\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem className=\"flex flex-col justify-center max-sm:items-center w-full mt-4\">\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Suffix</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Enter a suffix (Optional, example: prod)\"\n\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"randomize\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem className=\"mt-4 flex flex-row items-center justify-between rounded-lg border p-3 shadow-sm\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Apply Randomize</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\tApply randomize to the compose file.\n\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div className=\"flex flex-col lg:flex-row  gap-4 w-full items-end justify-end\">\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tform=\"hook-form-add-project\"\n\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t\tclassName=\"lg:w-fit\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tSave\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\tawait randomizeCompose();\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tclassName=\"lg:w-fit\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tRandom\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<pre>\n\t\t\t\t\t\t<CodeEditor\n\t\t\t\t\t\t\tvalue={compose || \"\"}\n\t\t\t\t\t\t\tlanguage=\"yaml\"\n\t\t\t\t\t\t\treadOnly\n\t\t\t\t\t\t\theight=\"50rem\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</pre>\n\t\t\t\t</form>\n\t\t\t</Form>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/compose/general/show-converted-compose.tsx",
    "content": "import { Loader2, Puzzle, RefreshCw } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { toast } from \"sonner\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { CodeEditor } from \"@/components/shared/code-editor\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport { api } from \"@/utils/api\";\n\ninterface Props {\n\tcomposeId: string;\n}\n\nexport const ShowConvertedCompose = ({ composeId }: Props) => {\n\tconst [isOpen, setIsOpen] = useState(false);\n\tconst {\n\t\tdata: compose,\n\t\terror,\n\t\tisError,\n\t\trefetch,\n\t} = api.compose.getConvertedCompose.useQuery(\n\t\t{ composeId },\n\t\t{\n\t\t\tretry: false,\n\t\t},\n\t);\n\n\tconst { mutateAsync, isPending } = api.compose.fetchSourceType.useMutation();\n\n\tuseEffect(() => {\n\t\tif (isOpen) {\n\t\t\tmutateAsync({ composeId })\n\t\t\t\t.then(() => {\n\t\t\t\t\trefetch();\n\t\t\t\t})\n\t\t\t\t.catch(() => {});\n\t\t}\n\t}, [isOpen]);\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t<Button className=\"max-lg:w-full\" variant=\"outline\">\n\t\t\t\t\t<Puzzle className=\"h-4 w-4\" />\n\t\t\t\t\tPreview Compose\n\t\t\t\t</Button>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-6xl max-h-[50rem]\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Converted Compose</DialogTitle>\n\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\tPreview your docker-compose file with added domains. Note: At least\n\t\t\t\t\t\tone domain must be specified for this conversion to take effect.\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t{isError && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\n\t\t\t\t<AlertBlock type=\"info\" className=\"mb-4\">\n\t\t\t\t\tPreview your docker-compose file with added domains. Note: At least\n\t\t\t\t\tone domain must be specified for this conversion to take effect.\n\t\t\t\t</AlertBlock>\n\t\t\t\t{isPending ? (\n\t\t\t\t\t<div className=\"flex flex-row items-center justify-center min-h-[25rem] border p-4 rounded-md\">\n\t\t\t\t\t\t<Loader2 className=\"h-8 w-8 text-muted-foreground mb-2 animate-spin\" />\n\t\t\t\t\t</div>\n\t\t\t\t) : compose?.length === 5 ? (\n\t\t\t\t\t<div className=\"border p-4 rounded-md flex flex-col items-center justify-center min-h-[25rem]\">\n\t\t\t\t\t\t<Puzzle className=\"h-8 w-8 text-muted-foreground mb-2\" />\n\t\t\t\t\t\t<span className=\"text-muted-foreground\">\n\t\t\t\t\t\t\tNo converted compose data available.\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<div className=\"flex flex-row gap-2 justify-end my-4\">\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\tisLoading={isPending}\n\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\tmutateAsync({ composeId })\n\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Fetched source type\");\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t.catch((err) => {\n\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error fetching source type\", {\n\t\t\t\t\t\t\t\t\t\t\t\tdescription: err.message,\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tRefresh <RefreshCw className=\"ml-2 h-4 w-4\" />\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<pre>\n\t\t\t\t\t\t\t<CodeEditor\n\t\t\t\t\t\t\t\tvalue={compose || \"\"}\n\t\t\t\t\t\t\t\tlanguage=\"yaml\"\n\t\t\t\t\t\t\t\treadOnly\n\t\t\t\t\t\t\t\theight=\"50rem\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</pre>\n\t\t\t\t\t</>\n\t\t\t\t)}\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/compose/general/show.tsx",
    "content": "import { Badge } from \"@/components/ui/badge\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport { api } from \"@/utils/api\";\nimport { ComposeActions } from \"./actions\";\nimport { ShowProviderFormCompose } from \"./generic/show\";\n\ninterface Props {\n\tcomposeId: string;\n}\n\nexport const ShowGeneralCompose = ({ composeId }: Props) => {\n\tconst { data } = api.compose.one.useQuery(\n\t\t{ composeId },\n\t\t{\n\t\t\tenabled: !!composeId,\n\t\t},\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<Card className=\"bg-background\">\n\t\t\t\t<CardHeader>\n\t\t\t\t\t<div className=\"flex flex-row gap-2 justify-between flex-wrap\">\n\t\t\t\t\t\t<CardTitle className=\"text-xl\">Deploy Settings</CardTitle>\n\t\t\t\t\t\t<Badge>\n\t\t\t\t\t\t\t{data?.composeType === \"docker-compose\" ? \"Compose\" : \"Stack\"}\n\t\t\t\t\t\t</Badge>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\tCreate a compose file to deploy your compose\n\t\t\t\t\t</CardDescription>\n\t\t\t\t</CardHeader>\n\t\t\t\t<CardContent className=\"flex flex-col gap-4 flex-wrap\">\n\t\t\t\t\t<ComposeActions composeId={composeId} />\n\t\t\t\t</CardContent>\n\t\t\t</Card>\n\t\t\t<ShowProviderFormCompose composeId={composeId} />\n\t\t</>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/compose/logs/show-stack.tsx",
    "content": "import { Loader2 } from \"lucide-react\";\nimport dynamic from \"next/dynamic\";\nimport { useEffect, useState } from \"react\";\nimport { badgeStateColor } from \"@/components/dashboard/application/logs/show\";\nimport { Badge } from \"@/components/ui/badge\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport { Label } from \"@/components/ui/label\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectGroup,\n\tSelectItem,\n\tSelectLabel,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { Switch } from \"@/components/ui/switch\";\nimport { api } from \"@/utils/api\";\nexport const DockerLogs = dynamic(\n\t() =>\n\t\timport(\"@/components/dashboard/docker/logs/docker-logs-id\").then(\n\t\t\t(e) => e.DockerLogsId,\n\t\t),\n\t{\n\t\tssr: false,\n\t},\n);\n\ninterface Props {\n\tappName: string;\n\tserverId?: string;\n}\n\nexport const ShowDockerLogsStack = ({ appName, serverId }: Props) => {\n\tconst [option, setOption] = useState<\"swarm\" | \"native\">(\"native\");\n\tconst [containerId, setContainerId] = useState<string | undefined>();\n\n\tconst { data: services, isPending: servicesLoading } =\n\t\tapi.docker.getStackContainersByAppName.useQuery(\n\t\t\t{\n\t\t\t\tappName,\n\t\t\t\tserverId,\n\t\t\t},\n\t\t\t{\n\t\t\t\tenabled: !!appName && option === \"swarm\",\n\t\t\t},\n\t\t);\n\n\tconst { data: containers, isPending: containersLoading } =\n\t\tapi.docker.getContainersByAppNameMatch.useQuery(\n\t\t\t{\n\t\t\t\tappName,\n\t\t\t\tappType: \"stack\",\n\t\t\t\tserverId,\n\t\t\t},\n\t\t\t{\n\t\t\t\tenabled: !!appName && option === \"native\",\n\t\t\t},\n\t\t);\n\n\tuseEffect(() => {\n\t\tif (option === \"native\") {\n\t\t\tif (containers && containers?.length > 0) {\n\t\t\t\tsetContainerId(containers[0]?.containerId);\n\t\t\t}\n\t\t} else {\n\t\t\tif (services && services?.length > 0) {\n\t\t\t\tsetContainerId(services[0]?.containerId);\n\t\t\t}\n\t\t}\n\t}, [option, services, containers]);\n\n\tconst isLoading = option === \"native\" ? containersLoading : servicesLoading;\n\tconst containersLenght =\n\t\toption === \"native\" ? containers?.length : services?.length;\n\n\treturn (\n\t\t<Card className=\"bg-background\">\n\t\t\t<CardHeader>\n\t\t\t\t<CardTitle className=\"text-xl\">Logs</CardTitle>\n\t\t\t\t<CardDescription>\n\t\t\t\t\tWatch the logs of the application in real time\n\t\t\t\t</CardDescription>\n\t\t\t</CardHeader>\n\n\t\t\t<CardContent className=\"flex flex-col gap-4\">\n\t\t\t\t<div className=\"flex flex-row justify-between items-center gap-2\">\n\t\t\t\t\t<Label>Select a container to view logs</Label>\n\t\t\t\t\t<div className=\"flex flex-row gap-2 items-center\">\n\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t{option === \"native\" ? \"Native\" : \"Swarm\"}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\tchecked={option === \"native\"}\n\t\t\t\t\t\t\tonCheckedChange={(checked) => {\n\t\t\t\t\t\t\t\tsetOption(checked ? \"native\" : \"swarm\");\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<Select onValueChange={setContainerId} value={containerId}>\n\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t{isLoading ? (\n\t\t\t\t\t\t\t<div className=\"flex flex-row gap-2 items-center justify-center text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t<span>Loading...</span>\n\t\t\t\t\t\t\t\t<Loader2 className=\"animate-spin size-4\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a container\" />\n\t\t\t\t\t\t)}\n\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t<SelectGroup>\n\t\t\t\t\t\t\t{option === \"native\" ? (\n\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t{containers?.map((container) => (\n\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\tkey={container.containerId}\n\t\t\t\t\t\t\t\t\t\t\tvalue={container.containerId}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{container.name} ({container.containerId}){\" \"}\n\t\t\t\t\t\t\t\t\t\t\t<Badge variant={badgeStateColor(container.state)}>\n\t\t\t\t\t\t\t\t\t\t\t\t{container.state}\n\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t{container.status ? ` ${container.status}` : \"\"}\n\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t{services?.map((container) => (\n\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\tkey={container.containerId}\n\t\t\t\t\t\t\t\t\t\t\tvalue={container.containerId}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{container.name} ({container.containerId}@{container.node}\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t<Badge variant={badgeStateColor(container.state)}>\n\t\t\t\t\t\t\t\t\t\t\t\t{container.state}\n\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t{container.currentState\n\t\t\t\t\t\t\t\t\t\t\t\t? ` ${container.currentState}`\n\t\t\t\t\t\t\t\t\t\t\t\t: \"\"}\n\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t<SelectLabel>Containers ({containersLenght})</SelectLabel>\n\t\t\t\t\t\t</SelectGroup>\n\t\t\t\t\t</SelectContent>\n\t\t\t\t</Select>\n\t\t\t\t{option === \"swarm\" &&\n\t\t\t\t\tservices?.find((c) => c.containerId === containerId)?.error && (\n\t\t\t\t\t\t<div className=\"rounded-md bg-destructive/10 border border-destructive/20 px-3 py-2 text-sm text-destructive\">\n\t\t\t\t\t\t\t<span className=\"font-medium\">Error: </span>\n\t\t\t\t\t\t\t{services.find((c) => c.containerId === containerId)?.error}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t<DockerLogs\n\t\t\t\t\tserverId={serverId || \"\"}\n\t\t\t\t\tcontainerId={containerId || \"select-a-container\"}\n\t\t\t\t\trunType={option}\n\t\t\t\t/>\n\t\t\t</CardContent>\n\t\t</Card>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/compose/logs/show.tsx",
    "content": "import { Loader2 } from \"lucide-react\";\nimport dynamic from \"next/dynamic\";\nimport { useEffect, useState } from \"react\";\nimport { badgeStateColor } from \"@/components/dashboard/application/logs/show\";\nimport { Badge } from \"@/components/ui/badge\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport { Label } from \"@/components/ui/label\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectGroup,\n\tSelectItem,\n\tSelectLabel,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { api } from \"@/utils/api\";\nexport const DockerLogs = dynamic(\n\t() =>\n\t\timport(\"@/components/dashboard/docker/logs/docker-logs-id\").then(\n\t\t\t(e) => e.DockerLogsId,\n\t\t),\n\t{\n\t\tssr: false,\n\t},\n);\n\ninterface Props {\n\tappName: string;\n\tserverId?: string;\n\tappType: \"stack\" | \"docker-compose\";\n}\n\nexport const ShowDockerLogsCompose = ({\n\tappName,\n\tappType,\n\tserverId,\n}: Props) => {\n\tconst { data, isPending } = api.docker.getContainersByAppNameMatch.useQuery(\n\t\t{\n\t\t\tappName,\n\t\t\tappType,\n\t\t\tserverId,\n\t\t},\n\t\t{\n\t\t\tenabled: !!appName,\n\t\t},\n\t);\n\tconst [containerId, setContainerId] = useState<string | undefined>();\n\n\tuseEffect(() => {\n\t\tif (data && data?.length > 0) {\n\t\t\tsetContainerId(data[0]?.containerId);\n\t\t}\n\t}, [data]);\n\n\treturn (\n\t\t<Card className=\"bg-background\">\n\t\t\t<CardHeader>\n\t\t\t\t<CardTitle className=\"text-xl\">Logs</CardTitle>\n\t\t\t\t<CardDescription>\n\t\t\t\t\tWatch the logs of the application in real time\n\t\t\t\t</CardDescription>\n\t\t\t</CardHeader>\n\n\t\t\t<CardContent className=\"flex flex-col gap-4\">\n\t\t\t\t<Label>Select a container to view logs</Label>\n\t\t\t\t<Select onValueChange={setContainerId} value={containerId}>\n\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t{isPending ? (\n\t\t\t\t\t\t\t<div className=\"flex flex-row gap-2 items-center justify-center text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t<span>Loading...</span>\n\t\t\t\t\t\t\t\t<Loader2 className=\"animate-spin size-4\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a container\" />\n\t\t\t\t\t\t)}\n\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t<SelectGroup>\n\t\t\t\t\t\t\t{data?.map((container) => (\n\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\tkey={container.containerId}\n\t\t\t\t\t\t\t\t\tvalue={container.containerId}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{container.name} ({container.containerId}){\" \"}\n\t\t\t\t\t\t\t\t\t<Badge variant={badgeStateColor(container.state)}>\n\t\t\t\t\t\t\t\t\t\t{container.state}\n\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t{container.status ? ` ${container.status}` : \"\"}\n\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t<SelectLabel>Containers ({data?.length})</SelectLabel>\n\t\t\t\t\t\t</SelectGroup>\n\t\t\t\t\t</SelectContent>\n\t\t\t\t</Select>\n\t\t\t\t<DockerLogs\n\t\t\t\t\tserverId={serverId || \"\"}\n\t\t\t\t\tcontainerId={containerId || \"select-a-container\"}\n\t\t\t\t\trunType=\"native\"\n\t\t\t\t/>\n\t\t\t</CardContent>\n\t\t</Card>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/compose/update-compose.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { PenBoxIcon } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { Textarea } from \"@/components/ui/textarea\";\nimport { api } from \"@/utils/api\";\n\nconst updateComposeSchema = z.object({\n\tname: z.string().min(1, {\n\t\tmessage: \"Name is required\",\n\t}),\n\tdescription: z.string().optional(),\n});\n\ntype UpdateCompose = z.infer<typeof updateComposeSchema>;\n\ninterface Props {\n\tcomposeId: string;\n}\n\nexport const UpdateCompose = ({ composeId }: Props) => {\n\tconst [isOpen, setIsOpen] = useState(false);\n\tconst utils = api.useUtils();\n\tconst { mutateAsync, error, isError, isPending } =\n\t\tapi.compose.update.useMutation();\n\tconst { data } = api.compose.one.useQuery(\n\t\t{\n\t\t\tcomposeId,\n\t\t},\n\t\t{\n\t\t\tenabled: !!composeId,\n\t\t},\n\t);\n\tconst form = useForm<UpdateCompose>({\n\t\tdefaultValues: {\n\t\t\tdescription: data?.description ?? \"\",\n\t\t\tname: data?.name ?? \"\",\n\t\t},\n\t\tresolver: zodResolver(updateComposeSchema),\n\t});\n\tuseEffect(() => {\n\t\tif (data) {\n\t\t\tform.reset({\n\t\t\t\tdescription: data.description ?? \"\",\n\t\t\t\tname: data.name,\n\t\t\t});\n\t\t}\n\t}, [data, form, form.reset]);\n\n\tconst onSubmit = async (formData: UpdateCompose) => {\n\t\tawait mutateAsync({\n\t\t\tname: formData.name,\n\t\t\tcomposeId: composeId,\n\t\t\tdescription: formData.description || \"\",\n\t\t})\n\t\t\t.then(() => {\n\t\t\t\ttoast.success(\"Compose updated successfully\");\n\t\t\t\tutils.compose.one.invalidate({\n\t\t\t\t\tcomposeId: composeId,\n\t\t\t\t});\n\t\t\t\tsetIsOpen(false);\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error updating the Compose\");\n\t\t\t})\n\t\t\t.finally(() => {});\n\t};\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\tclassName=\"group hover:bg-blue-500/10 \"\n\t\t\t\t>\n\t\t\t\t\t<PenBoxIcon className=\"size-3.5  text-primary group-hover:text-blue-500\" />\n\t\t\t\t</Button>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-lg\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Modify Compose</DialogTitle>\n\t\t\t\t\t<DialogDescription>Update the compose data</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t{isError && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\n\t\t\t\t<div className=\"grid gap-4\">\n\t\t\t\t\t<div className=\"grid items-center gap-4\">\n\t\t\t\t\t\t<Form {...form}>\n\t\t\t\t\t\t\t<form\n\t\t\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\t\t\tid=\"hook-form-update-compose\"\n\t\t\t\t\t\t\t\tclassName=\"grid w-full gap-4 \"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"name\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Name</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"Vandelay Industries\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"description\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Description</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Textarea\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Description about your project...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"resize-none\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tisLoading={isPending}\n\t\t\t\t\t\t\t\t\t\tform=\"hook-form-update-compose\"\n\t\t\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tUpdate\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</DialogFooter>\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t</Form>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/database/backups/handle-backup.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport {\n\tCheckIcon,\n\tChevronsUpDown,\n\tDatabaseZap,\n\tPenBoxIcon,\n\tPlusIcon,\n\tRefreshCw,\n} from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCommand,\n\tCommandEmpty,\n\tCommandGroup,\n\tCommandInput,\n\tCommandItem,\n} from \"@/components/ui/command\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport {\n\tPopover,\n\tPopoverContent,\n\tPopoverTrigger,\n} from \"@/components/ui/popover\";\nimport { ScrollArea } from \"@/components/ui/scroll-area\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { Switch } from \"@/components/ui/switch\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { cn } from \"@/lib/utils\";\nimport { api } from \"@/utils/api\";\nimport { ScheduleFormField } from \"../../application/schedules/handle-schedules\";\n\ntype CacheType = \"cache\" | \"fetch\";\n\ntype DatabaseType = \"postgres\" | \"mariadb\" | \"mysql\" | \"mongo\" | \"web-server\";\n\nconst Schema = z\n\t.object({\n\t\tdestinationId: z.string().min(1, \"Destination required\"),\n\t\tschedule: z.string().min(1, \"Schedule (Cron) required\"),\n\t\tprefix: z.string().min(1, \"Prefix required\"),\n\t\tenabled: z.boolean(),\n\t\tdatabase: z.string().min(1, \"Database required\"),\n\t\tkeepLatestCount: z.coerce.number().optional(),\n\t\tserviceName: z.string().nullable(),\n\t\tdatabaseType: z\n\t\t\t.enum([\"postgres\", \"mariadb\", \"mysql\", \"mongo\", \"web-server\"])\n\t\t\t.optional(),\n\t\tbackupType: z.enum([\"database\", \"compose\"]),\n\t\tmetadata: z\n\t\t\t.object({\n\t\t\t\tpostgres: z\n\t\t\t\t\t.object({\n\t\t\t\t\t\tdatabaseUser: z.string(),\n\t\t\t\t\t})\n\t\t\t\t\t.optional(),\n\t\t\t\tmariadb: z\n\t\t\t\t\t.object({\n\t\t\t\t\t\tdatabaseUser: z.string(),\n\t\t\t\t\t\tdatabasePassword: z.string(),\n\t\t\t\t\t})\n\t\t\t\t\t.optional(),\n\t\t\t\tmongo: z\n\t\t\t\t\t.object({\n\t\t\t\t\t\tdatabaseUser: z.string(),\n\t\t\t\t\t\tdatabasePassword: z.string(),\n\t\t\t\t\t})\n\t\t\t\t\t.optional(),\n\t\t\t\tmysql: z\n\t\t\t\t\t.object({\n\t\t\t\t\t\tdatabaseRootPassword: z.string(),\n\t\t\t\t\t})\n\t\t\t\t\t.optional(),\n\t\t\t})\n\t\t\t.optional(),\n\t})\n\t.superRefine((data, ctx) => {\n\t\tif (data.backupType === \"compose\" && !data.databaseType) {\n\t\t\tctx.addIssue({\n\t\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\t\tmessage: \"Database type is required for compose backups\",\n\t\t\t\tpath: [\"databaseType\"],\n\t\t\t});\n\t\t}\n\n\t\tif (data.backupType === \"compose\" && !data.serviceName) {\n\t\t\tctx.addIssue({\n\t\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\t\tmessage: \"Service name is required for compose backups\",\n\t\t\t\tpath: [\"serviceName\"],\n\t\t\t});\n\t\t}\n\n\t\tif (data.backupType === \"compose\" && data.databaseType) {\n\t\t\tif (data.databaseType === \"postgres\") {\n\t\t\t\tif (!data.metadata?.postgres?.databaseUser) {\n\t\t\t\t\tctx.addIssue({\n\t\t\t\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\t\t\t\tmessage: \"Database user is required for PostgreSQL\",\n\t\t\t\t\t\tpath: [\"metadata\", \"postgres\", \"databaseUser\"],\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else if (data.databaseType === \"mariadb\") {\n\t\t\t\tif (!data.metadata?.mariadb?.databaseUser) {\n\t\t\t\t\tctx.addIssue({\n\t\t\t\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\t\t\t\tmessage: \"Database user is required for MariaDB\",\n\t\t\t\t\t\tpath: [\"metadata\", \"mariadb\", \"databaseUser\"],\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tif (!data.metadata?.mariadb?.databasePassword) {\n\t\t\t\t\tctx.addIssue({\n\t\t\t\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\t\t\t\tmessage: \"Database password is required for MariaDB\",\n\t\t\t\t\t\tpath: [\"metadata\", \"mariadb\", \"databasePassword\"],\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else if (data.databaseType === \"mongo\") {\n\t\t\t\tif (!data.metadata?.mongo?.databaseUser) {\n\t\t\t\t\tctx.addIssue({\n\t\t\t\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\t\t\t\tmessage: \"Database user is required for MongoDB\",\n\t\t\t\t\t\tpath: [\"metadata\", \"mongo\", \"databaseUser\"],\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tif (!data.metadata?.mongo?.databasePassword) {\n\t\t\t\t\tctx.addIssue({\n\t\t\t\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\t\t\t\tmessage: \"Database password is required for MongoDB\",\n\t\t\t\t\t\tpath: [\"metadata\", \"mongo\", \"databasePassword\"],\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else if (data.databaseType === \"mysql\") {\n\t\t\t\tif (!data.metadata?.mysql?.databaseRootPassword) {\n\t\t\t\t\tctx.addIssue({\n\t\t\t\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\t\t\t\tmessage: \"Root password is required for MySQL\",\n\t\t\t\t\t\tpath: [\"metadata\", \"mysql\", \"databaseRootPassword\"],\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\ninterface Props {\n\tid?: string;\n\tbackupId?: string;\n\tdatabaseType?: DatabaseType;\n\trefetch: () => void;\n\tbackupType: \"database\" | \"compose\";\n}\n\nexport const HandleBackup = ({\n\tid,\n\tbackupId,\n\tdatabaseType = \"postgres\",\n\trefetch,\n\tbackupType = \"database\",\n}: Props) => {\n\tconst [isOpen, setIsOpen] = useState(false);\n\n\tconst { data, isPending } = api.destination.all.useQuery();\n\tconst { data: backup } = api.backup.one.useQuery(\n\t\t{\n\t\t\tbackupId: backupId ?? \"\",\n\t\t},\n\t\t{\n\t\t\tenabled: !!backupId,\n\t\t},\n\t);\n\tconst [cacheType, setCacheType] = useState<CacheType>(\"cache\");\n\tconst { mutateAsync: createBackup, isPending: isCreatingPostgresBackup } =\n\t\tbackupId\n\t\t\t? api.backup.update.useMutation()\n\t\t\t: api.backup.create.useMutation();\n\n\tconst form = useForm({\n\t\tdefaultValues: {\n\t\t\tdatabase: databaseType === \"web-server\" ? \"dokploy\" : \"\",\n\t\t\tdestinationId: \"\",\n\t\t\tenabled: true,\n\t\t\tprefix: \"/\",\n\t\t\tschedule: \"\",\n\t\t\tkeepLatestCount: undefined,\n\t\t\tserviceName: null,\n\t\t\tdatabaseType: backupType === \"compose\" ? undefined : databaseType,\n\t\t\tbackupType: backupType,\n\t\t\tmetadata: {},\n\t\t},\n\t\tresolver: zodResolver(Schema),\n\t});\n\n\tconst {\n\t\tdata: services,\n\t\tisFetching: isLoadingServices,\n\t\terror: errorServices,\n\t\trefetch: refetchServices,\n\t} = api.compose.loadServices.useQuery(\n\t\t{\n\t\t\tcomposeId: backup?.composeId ?? id ?? \"\",\n\t\t\ttype: cacheType,\n\t\t},\n\t\t{\n\t\t\tretry: false,\n\t\t\trefetchOnWindowFocus: false,\n\t\t\tenabled: backupType === \"compose\" && !!backup?.composeId && !!id,\n\t\t},\n\t);\n\n\tuseEffect(() => {\n\t\tform.reset({\n\t\t\tdatabase: backup?.database\n\t\t\t\t? backup?.database\n\t\t\t\t: databaseType === \"web-server\"\n\t\t\t\t\t? \"dokploy\"\n\t\t\t\t\t: \"\",\n\t\t\tdestinationId: backup?.destinationId ?? \"\",\n\t\t\tenabled: backup?.enabled ?? true,\n\t\t\tprefix: backup?.prefix ?? \"/\",\n\t\t\tschedule: backup?.schedule ?? \"\",\n\t\t\tkeepLatestCount: backup?.keepLatestCount ?? undefined,\n\t\t\tserviceName: backup?.serviceName ?? null,\n\t\t\tdatabaseType: backup?.databaseType ?? databaseType,\n\t\t\tbackupType: backup?.backupType ?? backupType,\n\t\t\tmetadata: backup?.metadata ?? {},\n\t\t});\n\t}, [form, form.reset, backupId, backup]);\n\n\tconst onSubmit = async (data: z.infer<typeof Schema>) => {\n\t\tconst getDatabaseId =\n\t\t\tbackupType === \"compose\"\n\t\t\t\t? {\n\t\t\t\t\t\tcomposeId: id,\n\t\t\t\t\t}\n\t\t\t\t: databaseType === \"postgres\"\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tpostgresId: id,\n\t\t\t\t\t\t}\n\t\t\t\t\t: databaseType === \"mariadb\"\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tmariadbId: id,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t: databaseType === \"mysql\"\n\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\tmysqlId: id,\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t: databaseType === \"mongo\"\n\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\tmongoId: id,\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t: databaseType === \"web-server\"\n\t\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\t\tuserId: id,\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t: undefined;\n\n\t\tawait createBackup({\n\t\t\tdestinationId: data.destinationId,\n\t\t\tprefix: data.prefix,\n\t\t\tschedule: data.schedule,\n\t\t\tenabled: data.enabled,\n\t\t\tdatabase: data.database,\n\t\t\tkeepLatestCount: data.keepLatestCount ?? null,\n\t\t\tdatabaseType: data.databaseType || databaseType,\n\t\t\tserviceName: data.serviceName,\n\t\t\t...getDatabaseId,\n\t\t\tbackupId: backupId ?? \"\",\n\t\t\tbackupType,\n\t\t\tmetadata: data.metadata,\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(`Backup ${backupId ? \"Updated\" : \"Created\"}`);\n\t\t\t\trefetch();\n\t\t\t\tsetIsOpen(false);\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(`Error ${backupId ? \"updating\" : \"creating\"} a backup`);\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t{backupId ? (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\tclassName=\"group hover:bg-blue-500/10 size-8\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<PenBoxIcon className=\"size-3.5 text-primary group-hover:text-blue-500\" />\n\t\t\t\t\t</Button>\n\t\t\t\t) : (\n\t\t\t\t\t<Button>\n\t\t\t\t\t\t<PlusIcon className=\"h-4 w-4\" />\n\t\t\t\t\t\t{backupId ? \"Update Backup\" : \"Create Backup\"}\n\t\t\t\t\t</Button>\n\t\t\t\t)}\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-2xl\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>\n\t\t\t\t\t\t{backupId ? \"Update Backup\" : \"Create Backup\"}\n\t\t\t\t\t</DialogTitle>\n\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\t{backupId ? \"Update a backup\" : \"Add a new backup\"}\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tid=\"hook-form-add-backup\"\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\tclassName=\"grid w-full gap-4\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"grid grid-cols-1 gap-4\">\n\t\t\t\t\t\t\t{errorServices && (\n\t\t\t\t\t\t\t\t<AlertBlock type=\"warning\" className=\"[overflow-wrap:anywhere]\">\n\t\t\t\t\t\t\t\t\t{errorServices?.message}\n\t\t\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{backupType === \"compose\" && (\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"databaseType\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Database Type</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\tonValueChange={(value) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(value as DatabaseType);\n\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"metadata\", {});\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger className=\"w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a database type\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"postgres\">PostgreSQL</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"mariadb\">MariaDB</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"mysql\">MySQL</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"mongo\">MongoDB</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"destinationId\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem className=\"\">\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Destination</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<Popover>\n\t\t\t\t\t\t\t\t\t\t\t<PopoverTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"w-full justify-between !bg-input\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t!field.value && \"text-muted-foreground\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{isPending\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Loading....\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: field.value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? data?.find(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(destination) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdestination.destinationId === field.value,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)?.name\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Select Destination\"}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t</PopoverTrigger>\n\t\t\t\t\t\t\t\t\t\t\t<PopoverContent className=\"p-0\" align=\"start\">\n\t\t\t\t\t\t\t\t\t\t\t\t<Command>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandInput\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Search Destination...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-9\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{isPending && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"py-6 text-center text-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLoading Destinations....\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandEmpty>No destinations found.</CommandEmpty>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ScrollArea className=\"h-64\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{data?.map((destination) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={destination.destinationId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={destination.destinationId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"destinationId\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdestination.destinationId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{destination.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CheckIcon\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"ml-auto h-4 w-4\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdestination.destinationId === field.value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"opacity-100\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"opacity-0\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</ScrollArea>\n\t\t\t\t\t\t\t\t\t\t\t\t</Command>\n\t\t\t\t\t\t\t\t\t\t\t</PopoverContent>\n\t\t\t\t\t\t\t\t\t\t</Popover>\n\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{backupType === \"compose\" && (\n\t\t\t\t\t\t\t\t<div className=\"flex flex-row items-end w-full gap-4\">\n\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\tname=\"serviceName\"\n\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t<FormItem className=\"w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Service Name</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonValueChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value || undefined}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a service name\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{services?.map((service, index) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={service}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={`${service}-${index}`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{service}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{(!services || services.length === 0) && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"none\" disabled>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tEmpty\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipProvider delayDuration={0}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisLoading={isLoadingServices}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (cacheType === \"fetch\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trefetchServices();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetCacheType(\"fetch\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<RefreshCw className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tside=\"left\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsideOffset={5}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"max-w-[10rem]\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFetch: Will clone the repository and load the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tservices\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipProvider delayDuration={0}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisLoading={isLoadingServices}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (cacheType === \"cache\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trefetchServices();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetCacheType(\"cache\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DatabaseZap className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tside=\"left\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsideOffset={5}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"max-w-[10rem]\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCache: If you previously deployed this\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcompose, it will read the services from the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlast deployment/fetch from the repository\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"database\"\n\t\t\t\t\t\t\t\trender={({ field }) => {\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Database</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\tdisabled={databaseType === \"web-server\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder={\"dokploy\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t<ScheduleFormField name=\"schedule\" formControl={form.control} />\n\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"prefix\"\n\t\t\t\t\t\t\t\trender={({ field }) => {\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Prefix Destination</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder={\"dokploy/\"} {...field} />\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\tUse if you want to back up in a specific path of your\n\t\t\t\t\t\t\t\t\t\t\t\tdestination/bucket\n\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"keepLatestCount\"\n\t\t\t\t\t\t\t\trender={({ field }) => {\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Keep the latest</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder={\"keeps all the backups if left empty\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value as string}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\tOptional. If provided, only keeps the latest N backups\n\t\t\t\t\t\t\t\t\t\t\t\tin the cloud.\n\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"enabled\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem className=\"flex flex-row items-center justify-between rounded-lg border p-3 \">\n\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Enabled</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\tEnable or disable the backup\n\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{backupType === \"compose\" && (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t{form.watch(\"databaseType\") === \"postgres\" && (\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"metadata.postgres.databaseUser\"\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Database User</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"postgres\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t{form.watch(\"databaseType\") === \"mariadb\" && (\n\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\t\tname=\"metadata.mariadb.databaseUser\"\n\t\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Database User</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"mariadb\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\t\tname=\"metadata.mariadb.databasePassword\"\n\t\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Database Password</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"password\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"••••••••\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t{form.watch(\"databaseType\") === \"mongo\" && (\n\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\t\tname=\"metadata.mongo.databaseUser\"\n\t\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Database User</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"mongo\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\t\tname=\"metadata.mongo.databasePassword\"\n\t\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Database Password</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"password\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"••••••••\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t{form.watch(\"databaseType\") === \"mysql\" && (\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"metadata.mysql.databaseRootPassword\"\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Root Password</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"password\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"••••••••\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tisLoading={isCreatingPostgresBackup}\n\t\t\t\t\t\t\t\tform=\"hook-form-add-backup\"\n\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{backupId ? \"Update\" : \"Create\"}\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</DialogFooter>\n\t\t\t\t\t</form>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/database/backups/restore-backup.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport copy from \"copy-to-clipboard\";\nimport debounce from \"lodash/debounce\";\nimport {\n\tCheckIcon,\n\tChevronsUpDown,\n\tCopy,\n\tDatabaseZap,\n\tRefreshCw,\n\tRotateCcw,\n} from \"lucide-react\";\nimport { useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { DrawerLogs } from \"@/components/shared/drawer-logs\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCommand,\n\tCommandEmpty,\n\tCommandGroup,\n\tCommandInput,\n\tCommandItem,\n} from \"@/components/ui/command\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport {\n\tPopover,\n\tPopoverContent,\n\tPopoverTrigger,\n} from \"@/components/ui/popover\";\nimport { ScrollArea } from \"@/components/ui/scroll-area\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { cn } from \"@/lib/utils\";\nimport { api } from \"@/utils/api\";\nimport type { ServiceType } from \"../../application/advanced/show-resources\";\nimport { type LogLine, parseLogs } from \"../../docker/logs/utils\";\n\ntype DatabaseType =\n\t| Exclude<ServiceType, \"application\" | \"redis\">\n\t| \"web-server\";\n\ninterface Props {\n\tid: string;\n\tdatabaseType?: DatabaseType;\n\tserverId?: string | null;\n\tbackupType?: \"database\" | \"compose\";\n}\n\nconst RestoreBackupSchema = z\n\t.object({\n\t\tdestinationId: z.string().min(1, {\n\t\t\tmessage: \"Destination is required\",\n\t\t}),\n\t\tbackupFile: z.string().min(1, {\n\t\t\tmessage: \"Backup file is required\",\n\t\t}),\n\t\tdatabaseName: z.string().min(1, {\n\t\t\tmessage: \"Database name is required\",\n\t\t}),\n\t\tdatabaseType: z\n\t\t\t.enum([\"postgres\", \"mariadb\", \"mysql\", \"mongo\", \"web-server\"])\n\t\t\t.optional(),\n\t\tbackupType: z.enum([\"database\", \"compose\"]).default(\"database\"),\n\t\tmetadata: z\n\t\t\t.object({\n\t\t\t\tpostgres: z\n\t\t\t\t\t.object({\n\t\t\t\t\t\tdatabaseUser: z.string(),\n\t\t\t\t\t})\n\t\t\t\t\t.optional(),\n\t\t\t\tmariadb: z\n\t\t\t\t\t.object({\n\t\t\t\t\t\tdatabaseUser: z.string(),\n\t\t\t\t\t\tdatabasePassword: z.string(),\n\t\t\t\t\t})\n\t\t\t\t\t.optional(),\n\t\t\t\tmongo: z\n\t\t\t\t\t.object({\n\t\t\t\t\t\tdatabaseUser: z.string(),\n\t\t\t\t\t\tdatabasePassword: z.string(),\n\t\t\t\t\t})\n\t\t\t\t\t.optional(),\n\t\t\t\tmysql: z\n\t\t\t\t\t.object({\n\t\t\t\t\t\tdatabaseRootPassword: z.string(),\n\t\t\t\t\t})\n\t\t\t\t\t.optional(),\n\t\t\t\tserviceName: z.string().optional(),\n\t\t\t})\n\t\t\t.optional(),\n\t})\n\t.superRefine((data, ctx) => {\n\t\tif (data.backupType === \"compose\" && !data.databaseType) {\n\t\t\tctx.addIssue({\n\t\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\t\tmessage: \"Database type is required for compose backups\",\n\t\t\t\tpath: [\"databaseType\"],\n\t\t\t});\n\t\t}\n\n\t\tif (data.backupType === \"compose\" && !data.metadata?.serviceName) {\n\t\t\tctx.addIssue({\n\t\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\t\tmessage: \"Service name is required for compose backups\",\n\t\t\t\tpath: [\"metadata\", \"serviceName\"],\n\t\t\t});\n\t\t}\n\n\t\tif (data.backupType === \"compose\" && data.databaseType) {\n\t\t\tif (data.databaseType === \"postgres\") {\n\t\t\t\tif (!data.metadata?.postgres?.databaseUser) {\n\t\t\t\t\tctx.addIssue({\n\t\t\t\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\t\t\t\tmessage: \"Database user is required for PostgreSQL\",\n\t\t\t\t\t\tpath: [\"metadata\", \"postgres\", \"databaseUser\"],\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else if (data.databaseType === \"mariadb\") {\n\t\t\t\tif (!data.metadata?.mariadb?.databaseUser) {\n\t\t\t\t\tctx.addIssue({\n\t\t\t\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\t\t\t\tmessage: \"Database user is required for MariaDB\",\n\t\t\t\t\t\tpath: [\"metadata\", \"mariadb\", \"databaseUser\"],\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tif (!data.metadata?.mariadb?.databasePassword) {\n\t\t\t\t\tctx.addIssue({\n\t\t\t\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\t\t\t\tmessage: \"Database password is required for MariaDB\",\n\t\t\t\t\t\tpath: [\"metadata\", \"mariadb\", \"databasePassword\"],\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else if (data.databaseType === \"mongo\") {\n\t\t\t\tif (!data.metadata?.mongo?.databaseUser) {\n\t\t\t\t\tctx.addIssue({\n\t\t\t\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\t\t\t\tmessage: \"Database user is required for MongoDB\",\n\t\t\t\t\t\tpath: [\"metadata\", \"mongo\", \"databaseUser\"],\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tif (!data.metadata?.mongo?.databasePassword) {\n\t\t\t\t\tctx.addIssue({\n\t\t\t\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\t\t\t\tmessage: \"Database password is required for MongoDB\",\n\t\t\t\t\t\tpath: [\"metadata\", \"mongo\", \"databasePassword\"],\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else if (data.databaseType === \"mysql\") {\n\t\t\t\tif (!data.metadata?.mysql?.databaseRootPassword) {\n\t\t\t\t\tctx.addIssue({\n\t\t\t\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\t\t\t\tmessage: \"Root password is required for MySQL\",\n\t\t\t\t\t\tpath: [\"metadata\", \"mysql\", \"databaseRootPassword\"],\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\nexport const formatBytes = (bytes: number): string => {\n\tif (bytes === 0) return \"0 Bytes\";\n\tconst k = 1024;\n\tconst sizes = [\"Bytes\", \"KB\", \"MB\", \"GB\", \"TB\"];\n\tconst i = Math.floor(Math.log(bytes) / Math.log(k));\n\treturn `${Number.parseFloat((bytes / k ** i).toFixed(2))} ${sizes[i]}`;\n};\n\nexport const RestoreBackup = ({\n\tid,\n\tdatabaseType,\n\tserverId,\n\tbackupType = \"database\",\n}: Props) => {\n\tconst [isOpen, setIsOpen] = useState(false);\n\tconst [search, setSearch] = useState(\"\");\n\tconst [debouncedSearchTerm, setDebouncedSearchTerm] = useState(\"\");\n\n\tconst { data: destinations = [] } = api.destination.all.useQuery();\n\n\tconst form = useForm({\n\t\tdefaultValues: {\n\t\t\tdestinationId: \"\",\n\t\t\tbackupFile: \"\",\n\t\t\tdatabaseName: databaseType === \"web-server\" ? \"dokploy\" : \"\",\n\t\t\tdatabaseType:\n\t\t\t\tbackupType === \"compose\" ? (\"postgres\" as DatabaseType) : databaseType,\n\t\t\tbackupType: backupType,\n\t\t\tmetadata: {},\n\t\t},\n\t\tresolver: zodResolver(RestoreBackupSchema),\n\t});\n\n\tconst destionationId = form.watch(\"destinationId\");\n\tconst currentDatabaseType = form.watch(\"databaseType\");\n\tconst metadata = form.watch(\"metadata\");\n\n\tconst debouncedSetSearch = debounce((value: string) => {\n\t\tsetDebouncedSearchTerm(value);\n\t}, 350);\n\n\tconst handleSearchChange = (value: string) => {\n\t\tsetSearch(value);\n\t\tdebouncedSetSearch(value);\n\t};\n\n\tconst { data: files = [], isPending } = api.backup.listBackupFiles.useQuery(\n\t\t{\n\t\t\tdestinationId: destionationId,\n\t\t\tsearch: debouncedSearchTerm,\n\t\t\tserverId: serverId ?? \"\",\n\t\t},\n\t\t{\n\t\t\tenabled: isOpen && !!destionationId,\n\t\t},\n\t);\n\n\tconst [isDrawerOpen, setIsDrawerOpen] = useState(false);\n\tconst [filteredLogs, setFilteredLogs] = useState<LogLine[]>([]);\n\tconst [isDeploying, setIsDeploying] = useState(false);\n\n\tapi.backup.restoreBackupWithLogs.useSubscription(\n\t\t{\n\t\t\tdatabaseId: id,\n\t\t\tdatabaseType: currentDatabaseType as DatabaseType,\n\t\t\tdatabaseName: form.watch(\"databaseName\"),\n\t\t\tbackupFile: form.watch(\"backupFile\"),\n\t\t\tdestinationId: form.watch(\"destinationId\"),\n\t\t\tbackupType: backupType,\n\t\t\tmetadata: metadata,\n\t\t},\n\t\t{\n\t\t\tenabled: isDeploying,\n\t\t\tonData(log) {\n\t\t\t\tif (!isDrawerOpen) {\n\t\t\t\t\tsetIsDrawerOpen(true);\n\t\t\t\t}\n\n\t\t\t\tif (log === \"Restore completed successfully!\") {\n\t\t\t\t\tsetIsDeploying(false);\n\t\t\t\t}\n\t\t\t\tconst parsedLogs = parseLogs(log);\n\t\t\t\tsetFilteredLogs((prev) => [...prev, ...parsedLogs]);\n\t\t\t},\n\t\t\tonError(error) {\n\t\t\t\tconsole.error(\"Restore logs error:\", error);\n\t\t\t\tsetIsDeploying(false);\n\t\t\t},\n\t\t},\n\t);\n\n\tconst onSubmit = async (data: z.infer<typeof RestoreBackupSchema>) => {\n\t\tif (backupType === \"compose\" && !data.databaseType) {\n\t\t\ttoast.error(\"Please select a database type\");\n\t\t\treturn;\n\t\t}\n\t\tconsole.log({ data });\n\t\tsetIsDeploying(true);\n\t};\n\n\tconst [cacheType, setCacheType] = useState<\"fetch\" | \"cache\">(\"cache\");\n\tconst {\n\t\tdata: services = [],\n\t\tisLoading: isLoadingServices,\n\t\trefetch: refetchServices,\n\t} = api.compose.loadServices.useQuery(\n\t\t{\n\t\t\tcomposeId: id,\n\t\t\ttype: cacheType,\n\t\t},\n\t\t{\n\t\t\tretry: false,\n\t\t\trefetchOnWindowFocus: false,\n\t\t\tenabled: backupType === \"compose\",\n\t\t},\n\t);\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t<Button variant=\"outline\">\n\t\t\t\t\t<RotateCcw className=\"mr-2 size-4\" />\n\t\t\t\t\tRestore Backup\n\t\t\t\t</Button>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-lg\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle className=\"flex items-center\">\n\t\t\t\t\t\t<RotateCcw className=\"mr-2 size-4\" />\n\t\t\t\t\t\tRestore Backup\n\t\t\t\t\t</DialogTitle>\n\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\tSelect a destination and search for backup files\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tid=\"hook-form-restore-backup\"\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\tclassName=\"grid w-full gap-4\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"destinationId\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"\">\n\t\t\t\t\t\t\t\t\t<FormLabel>Destination</FormLabel>\n\t\t\t\t\t\t\t\t\t<Popover>\n\t\t\t\t\t\t\t\t\t\t<PopoverTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"w-full justify-between !bg-input\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t!field.value && \"text-muted-foreground\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{field.value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? destinations.find(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(d) => d.destinationId === field.value,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)?.name\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Select Destination\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</PopoverTrigger>\n\t\t\t\t\t\t\t\t\t\t<PopoverContent className=\"p-0\" align=\"start\">\n\t\t\t\t\t\t\t\t\t\t\t<Command>\n\t\t\t\t\t\t\t\t\t\t\t\t<CommandInput\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Search destinations...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-9\"\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t<CommandEmpty>No destinations found.</CommandEmpty>\n\t\t\t\t\t\t\t\t\t\t\t\t<ScrollArea className=\"h-64\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{destinations.map((destination) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={destination.destinationId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={destination.destinationId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"destinationId\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdestination.destinationId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{destination.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CheckIcon\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"ml-auto h-4 w-4\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdestination.destinationId === field.value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"opacity-100\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"opacity-0\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t</ScrollArea>\n\t\t\t\t\t\t\t\t\t\t\t</Command>\n\t\t\t\t\t\t\t\t\t\t</PopoverContent>\n\t\t\t\t\t\t\t\t\t</Popover>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"backupFile\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"\">\n\t\t\t\t\t\t\t\t\t<FormLabel className=\"flex items-center justify-between\">\n\t\t\t\t\t\t\t\t\t\tSearch Backup Files\n\t\t\t\t\t\t\t\t\t\t{field.value && (\n\t\t\t\t\t\t\t\t\t\t\t<Badge variant=\"outline\" className=\"truncate\">\n\t\t\t\t\t\t\t\t\t\t\t\t{field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t<Copy\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"ml-2 size-4 cursor-pointer\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcopy(field.value);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Backup file copied to clipboard\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t<Popover modal>\n\t\t\t\t\t\t\t\t\t\t<PopoverTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"w-full justify-between !bg-input\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t!field.value && \"text-muted-foreground\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"truncate text-left flex-1 w-52\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{field.value || \"Search and select a backup file\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</PopoverTrigger>\n\t\t\t\t\t\t\t\t\t\t<PopoverContent className=\"p-0\" align=\"start\">\n\t\t\t\t\t\t\t\t\t\t\t<Command>\n\t\t\t\t\t\t\t\t\t\t\t\t<CommandInput\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Search backup files...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={search}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonValueChange={handleSearchChange}\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-9\"\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t{isPending ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"py-6 text-center text-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLoading backup files...\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t) : files.length === 0 && search ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"py-6 text-center text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tNo backup files found for \"{search}\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t) : files.length === 0 ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"py-6 text-center text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tNo backup files available\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ScrollArea className=\"h-64\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandGroup className=\"w-96\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{files?.map((file) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={file.Path}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={file.Path}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"backupFile\", file.Path);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (file.IsDir) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetSearch(`${file.Path}/`);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetDebouncedSearchTerm(`${file.Path}/`);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetSearch(file.Path);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetDebouncedSearchTerm(file.Path);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex w-full flex-col gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex w-full justify-between\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-medium\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{file.Path}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CheckIcon\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"ml-auto h-4 w-4\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfile.Path === field.value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"opacity-100\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"opacity-0\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-4 text-xs text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSize: {formatBytes(file.Size)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{file.IsDir && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-blue-500\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDirectory\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{file.Hashes?.MD5 && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>MD5: {file.Hashes.MD5}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</ScrollArea>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t</Command>\n\t\t\t\t\t\t\t\t\t\t</PopoverContent>\n\t\t\t\t\t\t\t\t\t</Popover>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"databaseName\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Database Name</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Enter database name\"\n\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\tdisabled={databaseType === \"web-server\"}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t{backupType === \"compose\" && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"databaseType\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Database Type</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\tonValueChange={(value: DatabaseType) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(value);\n\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"metadata\", {});\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select database type\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"postgres\">PostgreSQL</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"mariadb\">MariaDB</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"mongo\">MongoDB</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"mysql\">MySQL</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"metadata.serviceName\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem className=\"w-full\">\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Service Name</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\t\t\t\tonValueChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value || undefined}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a service name\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{services?.map((service, index) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={service}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={`${service}-${index}`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{service}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{(!services || services.length === 0) && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"none\" disabled>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tEmpty\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipProvider delayDuration={0}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisLoading={isLoadingServices}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (cacheType === \"fetch\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trefetchServices();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetCacheType(\"fetch\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<RefreshCw className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tside=\"left\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsideOffset={5}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"max-w-[10rem]\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFetch: Will clone the repository and load the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tservices\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipProvider delayDuration={0}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisLoading={isLoadingServices}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (cacheType === \"cache\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trefetchServices();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetCacheType(\"cache\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DatabaseZap className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tside=\"left\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsideOffset={5}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"max-w-[10rem]\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCache: If you previously deployed this compose,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tit will read the services from the last\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdeployment/fetch from the repository\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t{currentDatabaseType === \"postgres\" && (\n\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\tname=\"metadata.postgres.databaseUser\"\n\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Database User</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"Enter database user\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{currentDatabaseType === \"mariadb\" && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"metadata.mariadb.databaseUser\"\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Database User</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Enter database user\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"metadata.mariadb.databasePassword\"\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Database Password</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"password\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Enter database password\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{currentDatabaseType === \"mongo\" && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"metadata.mongo.databaseUser\"\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Database User</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Enter database user\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"metadata.mongo.databasePassword\"\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Database Password</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"password\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Enter database password\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{currentDatabaseType === \"mysql\" && (\n\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\tname=\"metadata.mysql.databaseRootPassword\"\n\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Root Password</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"password\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Enter root password\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tisLoading={isDeploying}\n\t\t\t\t\t\t\t\tform=\"hook-form-restore-backup\"\n\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t\t// disabled={\n\t\t\t\t\t\t\t\t// \t!form.watch(\"backupFile\") ||\n\t\t\t\t\t\t\t\t// \t(backupType === \"compose\" && !form.watch(\"databaseType\"))\n\t\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tRestore\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</DialogFooter>\n\t\t\t\t\t</form>\n\t\t\t\t</Form>\n\n\t\t\t\t<DrawerLogs\n\t\t\t\t\tisOpen={isDrawerOpen}\n\t\t\t\t\tonClose={() => {\n\t\t\t\t\t\tsetIsDrawerOpen(false);\n\t\t\t\t\t\tsetFilteredLogs([]);\n\t\t\t\t\t\tsetIsDeploying(false);\n\t\t\t\t\t\t// refetch();\n\t\t\t\t\t}}\n\t\t\t\t\tfilteredLogs={filteredLogs}\n\t\t\t\t/>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/database/backups/show-backups.tsx",
    "content": "import {\n\tClipboardList,\n\tDatabase,\n\tDatabaseBackup,\n\tPlay,\n\tTrash2,\n} from \"lucide-react\";\nimport Link from \"next/link\";\nimport { useState } from \"react\";\nimport { toast } from \"sonner\";\nimport {\n\tMariadbIcon,\n\tMongodbIcon,\n\tMysqlIcon,\n\tPostgresqlIcon,\n} from \"@/components/icons/data-tools-icons\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { DialogAction } from \"@/components/shared/dialog-action\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { cn } from \"@/lib/utils\";\nimport { api } from \"@/utils/api\";\nimport type { ServiceType } from \"../../application/advanced/show-resources\";\nimport { ShowDeploymentsModal } from \"../../application/deployments/show-deployments-modal\";\nimport { HandleBackup } from \"./handle-backup\";\nimport { RestoreBackup } from \"./restore-backup\";\n\ninterface Props {\n\tid: string;\n\tdatabaseType?: Exclude<ServiceType, \"application\" | \"redis\"> | \"web-server\";\n\tbackupType?: \"database\" | \"compose\";\n}\nexport const ShowBackups = ({\n\tid,\n\tdatabaseType,\n\tbackupType = \"database\",\n}: Props) => {\n\tconst [activeManualBackup, setActiveManualBackup] = useState<\n\t\tstring | undefined\n\t>();\n\tconst queryMap =\n\t\tbackupType === \"database\"\n\t\t\t? {\n\t\t\t\t\tpostgres: () =>\n\t\t\t\t\t\tapi.postgres.one.useQuery({ postgresId: id }, { enabled: !!id }),\n\t\t\t\t\tmysql: () =>\n\t\t\t\t\t\tapi.mysql.one.useQuery({ mysqlId: id }, { enabled: !!id }),\n\t\t\t\t\tmariadb: () =>\n\t\t\t\t\t\tapi.mariadb.one.useQuery({ mariadbId: id }, { enabled: !!id }),\n\t\t\t\t\tmongo: () =>\n\t\t\t\t\t\tapi.mongo.one.useQuery({ mongoId: id }, { enabled: !!id }),\n\t\t\t\t\t\"web-server\": () => api.user.getBackups.useQuery(),\n\t\t\t\t}\n\t\t\t: {\n\t\t\t\t\tcompose: () =>\n\t\t\t\t\t\tapi.compose.one.useQuery({ composeId: id }, { enabled: !!id }),\n\t\t\t\t};\n\tconst { data } = api.destination.all.useQuery();\n\tconst key = backupType === \"database\" ? databaseType : \"compose\";\n\tconst query = queryMap[key as keyof typeof queryMap];\n\tconst { data: postgres, refetch } = query\n\t\t? query()\n\t\t: api.mongo.one.useQuery({ mongoId: id }, { enabled: !!id });\n\n\tconst mutationMap =\n\t\tbackupType === \"database\"\n\t\t\t? {\n\t\t\t\t\tpostgres: api.backup.manualBackupPostgres.useMutation(),\n\t\t\t\t\tmysql: api.backup.manualBackupMySql.useMutation(),\n\t\t\t\t\tmariadb: api.backup.manualBackupMariadb.useMutation(),\n\t\t\t\t\tmongo: api.backup.manualBackupMongo.useMutation(),\n\t\t\t\t\t\"web-server\": api.backup.manualBackupWebServer.useMutation(),\n\t\t\t\t}\n\t\t\t: {\n\t\t\t\t\tcompose: api.backup.manualBackupCompose.useMutation(),\n\t\t\t\t};\n\n\tconst mutation = mutationMap[key as keyof typeof mutationMap];\n\n\tconst { mutateAsync: manualBackup, isPending: isManualBackup } = mutation\n\t\t? mutation\n\t\t: api.backup.manualBackupMongo.useMutation();\n\n\tconst { mutateAsync: deleteBackup, isPending: isRemoving } =\n\t\tapi.backup.remove.useMutation();\n\n\treturn (\n\t\t<Card className=\"bg-background\">\n\t\t\t<CardHeader className=\"flex flex-row justify-between gap-4  flex-wrap\">\n\t\t\t\t<div className=\"flex flex-col gap-0.5\">\n\t\t\t\t\t<CardTitle className=\"text-xl flex flex-row gap-2\">\n\t\t\t\t\t\t<Database className=\"size-6 text-muted-foreground\" />\n\t\t\t\t\t\tBackups\n\t\t\t\t\t</CardTitle>\n\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\tAdd backups to your database to save the data to a different\n\t\t\t\t\t\tprovider.\n\t\t\t\t\t</CardDescription>\n\t\t\t\t</div>\n\n\t\t\t\t{postgres && postgres?.backups?.length > 0 && (\n\t\t\t\t\t<div className=\"flex flex-col lg:flex-row gap-4 w-full lg:w-auto\">\n\t\t\t\t\t\t{databaseType !== \"web-server\" && (\n\t\t\t\t\t\t\t<HandleBackup\n\t\t\t\t\t\t\t\tid={id}\n\t\t\t\t\t\t\t\tdatabaseType={databaseType}\n\t\t\t\t\t\t\t\tbackupType={backupType}\n\t\t\t\t\t\t\t\trefetch={refetch}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<RestoreBackup\n\t\t\t\t\t\t\tid={id}\n\t\t\t\t\t\t\tdatabaseType={databaseType}\n\t\t\t\t\t\t\tbackupType={backupType}\n\t\t\t\t\t\t\tserverId={\"serverId\" in postgres ? postgres.serverId : undefined}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</CardHeader>\n\t\t\t<CardContent className=\"flex flex-col gap-4\">\n\t\t\t\t{data?.length === 0 ? (\n\t\t\t\t\t<div className=\"flex flex-col items-center gap-3 min-h-[35vh] justify-center\">\n\t\t\t\t\t\t<DatabaseBackup className=\"size-8 text-muted-foreground\" />\n\t\t\t\t\t\t<span className=\"text-base text-muted-foreground text-center\">\n\t\t\t\t\t\t\tTo create a backup it is required to set at least 1 provider.\n\t\t\t\t\t\t\tPlease, go to{\" \"}\n\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\thref=\"/dashboard/settings/destinations\"\n\t\t\t\t\t\t\t\tclassName=\"text-foreground\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tS3 Destinations\n\t\t\t\t\t\t\t</Link>{\" \"}\n\t\t\t\t\t\t\tto do so.\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<div className=\"flex flex-col gap-4 w-full\">\n\t\t\t\t\t\t{postgres?.backups.length === 0 ? (\n\t\t\t\t\t\t\t<div className=\"flex w-full flex-col items-center justify-center gap-3 pt-10\">\n\t\t\t\t\t\t\t\t<DatabaseBackup className=\"size-8 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t<span className=\"text-base text-muted-foreground\">\n\t\t\t\t\t\t\t\t\tNo backups configured\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<div className=\"flex flex-col sm:flex-row gap-4 w-full sm:w-auto\">\n\t\t\t\t\t\t\t\t\t<HandleBackup\n\t\t\t\t\t\t\t\t\t\tid={id}\n\t\t\t\t\t\t\t\t\t\tdatabaseType={databaseType}\n\t\t\t\t\t\t\t\t\t\tbackupType={backupType}\n\t\t\t\t\t\t\t\t\t\trefetch={refetch}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<RestoreBackup\n\t\t\t\t\t\t\t\t\t\tid={id}\n\t\t\t\t\t\t\t\t\t\tdatabaseType={databaseType}\n\t\t\t\t\t\t\t\t\t\tbackupType={backupType}\n\t\t\t\t\t\t\t\t\t\tserverId={\n\t\t\t\t\t\t\t\t\t\t\t\"serverId\" in postgres ? postgres.serverId : undefined\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<div className=\"flex flex-col pt-2 gap-4\">\n\t\t\t\t\t\t\t\t{backupType === \"compose\" && (\n\t\t\t\t\t\t\t\t\t<AlertBlock title=\"Compose Backups\">\n\t\t\t\t\t\t\t\t\t\tMake sure the compose is running before creating a backup.\n\t\t\t\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-6\">\n\t\t\t\t\t\t\t\t\t{postgres?.backups.map((backup) => {\n\t\t\t\t\t\t\t\t\t\tconst serverId =\n\t\t\t\t\t\t\t\t\t\t\t\"serverId\" in postgres ? postgres.serverId : undefined;\n\n\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t<div key={backup.backupId}>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex w-full flex-col md:flex-row md:items-start justify-between gap-4 border rounded-lg p-4 hover:bg-muted/50 transition-colors\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col w-full gap-4\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{backup.backupType === \"compose\" && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center justify-center size-10 rounded-lg\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{backup.databaseType === \"postgres\" && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<PostgresqlIcon className=\"size-7\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{backup.databaseType === \"mysql\" && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<MysqlIcon className=\"size-7\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{backup.databaseType === \"mariadb\" && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<MariadbIcon className=\"size-7\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{backup.databaseType === \"mongo\" && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<MongodbIcon className=\"size-7\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{backup.backupType === \"compose\" && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h3 className=\"font-medium\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{backup.serviceName}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"px-1.5 py-0.5 rounded-full bg-muted text-xs font-medium capitalize\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{backup.databaseType}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"size-1.5 rounded-full\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbackup.enabled\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"bg-green-500\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"bg-red-500\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-xs text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{backup.enabled ? \"Active\" : \"Inactive\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-wrap gap-x-8 gap-y-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"min-w-[200px]\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm font-medium text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDestination\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"font-medium text-sm mt-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{backup.destination.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"min-w-[150px]\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm font-medium text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDatabase\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"font-medium text-sm mt-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{backup.database}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"min-w-[120px]\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm font-medium text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSchedule\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"font-medium text-sm mt-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{backup.schedule}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"min-w-[150px]\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm font-medium text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tPrefix Storage\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"font-medium text-sm mt-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{backup.prefix}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"min-w-[100px]\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm font-medium text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tKeep Latest\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"font-medium text-sm mt-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{backup.keepLatestCount || \"All\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row md:flex-col gap-1.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ShowDeploymentsModal\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tid={backup.backupId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"backup\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tserverId={serverId || undefined}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"size-8\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ClipboardList className=\"size-4  transition-colors \" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</ShowDeploymentsModal>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipProvider delayDuration={0}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"size-8\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisLoading={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisManualBackup &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tactiveManualBackup === backup.backupId\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetActiveManualBackup(backup.backupId);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait manualBackup({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbackupId: backup.backupId as string,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.then(async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Manual Backup Successful\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Error creating the manual backup\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetActiveManualBackup(undefined);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Play className=\"size-4 \" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tRun Manual Backup\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<HandleBackup\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbackupType={backup.backupType}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbackupId={backup.backupId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdatabaseType={backup.databaseType}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trefetch={refetch}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"Delete Backup\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to delete this backup?\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"destructive\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait deleteBackup({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbackupId: backup.backupId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Backup deleted successfully\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error deleting backup\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"group hover:bg-red-500/10 size-8\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisLoading={isRemoving}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Trash2 className=\"size-4 text-primary group-hover:text-red-500\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</CardContent>\n\t\t</Card>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/deployments/show-deployments-table.tsx",
    "content": "\"use client\";\n\nimport {\n\ttype ColumnFiltersState,\n\tflexRender,\n\tgetCoreRowModel,\n\tgetFilteredRowModel,\n\tgetPaginationRowModel,\n\tgetSortedRowModel,\n\ttype PaginationState,\n\ttype SortingState,\n\tuseReactTable,\n} from \"@tanstack/react-table\";\nimport type { inferRouterOutputs } from \"@trpc/server\";\nimport {\n\tArrowUpDown,\n\tBoxes,\n\tChevronLeft,\n\tChevronRight,\n\tExternalLink,\n\tLoader2,\n\tRocket,\n\tServer,\n} from \"lucide-react\";\nimport Link from \"next/link\";\nimport { useMemo, useState } from \"react\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport { Input } from \"@/components/ui/input\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport {\n\tTable,\n\tTableBody,\n\tTableCell,\n\tTableHead,\n\tTableHeader,\n\tTableRow,\n} from \"@/components/ui/table\";\nimport type { AppRouter } from \"@/server/api/root\";\nimport { api } from \"@/utils/api\";\n\ntype DeploymentRow =\n\tinferRouterOutputs<AppRouter>[\"deployment\"][\"allCentralized\"][number];\n\nconst statusVariants: Record<\n\tstring,\n\t| \"default\"\n\t| \"secondary\"\n\t| \"destructive\"\n\t| \"outline\"\n\t| \"yellow\"\n\t| \"green\"\n\t| \"red\"\n> = {\n\trunning: \"yellow\",\n\tdone: \"green\",\n\terror: \"red\",\n\tcancelled: \"outline\",\n};\n\nfunction getServiceInfo(d: DeploymentRow) {\n\tconst app = d.application;\n\tconst comp = d.compose;\n\tif (app?.environment?.project && app.environment) {\n\t\treturn {\n\t\t\ttype: \"Application\" as const,\n\t\t\tname: app.name,\n\t\t\tprojectId: app.environment.project.projectId,\n\t\t\tenvironmentId: app.environment.environmentId,\n\t\t\tprojectName: app.environment.project.name,\n\t\t\tenvironmentName: app.environment.name,\n\t\t\tserviceId: app.applicationId,\n\t\t\thref: `/dashboard/project/${app.environment.project.projectId}/environment/${app.environment.environmentId}/services/application/${app.applicationId}`,\n\t\t};\n\t}\n\tif (comp?.environment?.project && comp.environment) {\n\t\treturn {\n\t\t\ttype: \"Compose\" as const,\n\t\t\tname: comp.name,\n\t\t\tprojectId: comp.environment.project.projectId,\n\t\t\tenvironmentId: comp.environment.environmentId,\n\t\t\tprojectName: comp.environment.project.name,\n\t\t\tenvironmentName: comp.environment.name,\n\t\t\tserviceId: comp.composeId,\n\t\t\thref: `/dashboard/project/${comp.environment.project.projectId}/environment/${comp.environment.environmentId}/services/compose/${comp.composeId}`,\n\t\t};\n\t}\n\treturn null;\n}\n\nexport function ShowDeploymentsTable() {\n\tconst [sorting, setSorting] = useState<SortingState>([\n\t\t{ id: \"createdAt\", desc: true },\n\t]);\n\tconst [columnFilters, setColumnFilters] = useState<ColumnFiltersState>([]);\n\tconst [globalFilter, setGlobalFilter] = useState(\"\");\n\tconst [statusFilter, setStatusFilter] = useState<string>(\"all\");\n\tconst [typeFilter, setTypeFilter] = useState<string>(\"all\");\n\tconst [pagination, setPagination] = useState<PaginationState>({\n\t\tpageIndex: 0,\n\t\tpageSize: 50,\n\t});\n\n\tconst { data: deploymentsList, isLoading } =\n\t\tapi.deployment.allCentralized.useQuery(undefined, {\n\t\t\trefetchInterval: 5000,\n\t\t});\n\n\tconst filteredData = useMemo(() => {\n\t\tif (!deploymentsList) return [];\n\t\tlet list = deploymentsList;\n\t\tif (statusFilter !== \"all\") {\n\t\t\tlist = list.filter((d) => d.status === statusFilter);\n\t\t}\n\t\tif (typeFilter === \"application\") {\n\t\t\tlist = list.filter((d) => d.applicationId != null);\n\t\t} else if (typeFilter === \"compose\") {\n\t\t\tlist = list.filter((d) => d.composeId != null);\n\t\t}\n\t\tif (globalFilter.trim()) {\n\t\t\tconst q = globalFilter.toLowerCase();\n\t\t\tlist = list.filter((d) => {\n\t\t\t\tconst info = getServiceInfo(d);\n\t\t\t\tconst serverName =\n\t\t\t\t\td.server?.name ??\n\t\t\t\t\td.application?.server?.name ??\n\t\t\t\t\td.compose?.server?.name ??\n\t\t\t\t\t\"\";\n\t\t\t\tconst buildServerName =\n\t\t\t\t\td.buildServer?.name ?? d.application?.buildServer?.name ?? \"\";\n\t\t\t\tif (!info) return false;\n\t\t\t\treturn (\n\t\t\t\t\tinfo.name.toLowerCase().includes(q) ||\n\t\t\t\t\tinfo.projectName.toLowerCase().includes(q) ||\n\t\t\t\t\tinfo.environmentName.toLowerCase().includes(q) ||\n\t\t\t\t\t(d.title?.toLowerCase().includes(q) ?? false) ||\n\t\t\t\t\tserverName.toLowerCase().includes(q) ||\n\t\t\t\t\tbuildServerName.toLowerCase().includes(q)\n\t\t\t\t);\n\t\t\t});\n\t\t}\n\t\treturn list;\n\t}, [deploymentsList, statusFilter, typeFilter, globalFilter]);\n\n\tconst columns = useMemo(\n\t\t() => [\n\t\t\t{\n\t\t\t\tid: \"serviceName\",\n\t\t\t\taccessorFn: (row: DeploymentRow) => getServiceInfo(row)?.name ?? \"\",\n\t\t\t\theader: ({\n\t\t\t\t\tcolumn,\n\t\t\t\t}: {\n\t\t\t\t\tcolumn: {\n\t\t\t\t\t\tgetIsSorted: () => false | \"asc\" | \"desc\";\n\t\t\t\t\t\ttoggleSorting: (asc: boolean) => void;\n\t\t\t\t\t};\n\t\t\t\t}) => (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\tclassName=\"-ml-3 h-8\"\n\t\t\t\t\t\tonClick={() => column.toggleSorting(column.getIsSorted() === \"asc\")}\n\t\t\t\t\t>\n\t\t\t\t\t\tService\n\t\t\t\t\t\t<ArrowUpDown className=\"ml-2 size-4\" />\n\t\t\t\t\t</Button>\n\t\t\t\t),\n\t\t\t\tcell: ({ row }: { row: { original: DeploymentRow } }) => {\n\t\t\t\t\tconst info = getServiceInfo(row.original);\n\t\t\t\t\tif (!info) return <span className=\"text-muted-foreground\">—</span>;\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t{info.type === \"Application\" ? (\n\t\t\t\t\t\t\t\t<Rocket className=\"size-4 text-muted-foreground shrink-0\" />\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<Boxes className=\"size-4 text-muted-foreground shrink-0\" />\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<div className=\"flex flex-col min-w-0\">\n\t\t\t\t\t\t\t\t<span className=\"font-medium truncate\">{info.name}</span>\n\t\t\t\t\t\t\t\t<Badge variant=\"outline\" className=\"w-fit text-[10px]\">\n\t\t\t\t\t\t\t\t\t{info.type}\n\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"projectName\",\n\t\t\t\taccessorFn: (row: DeploymentRow) =>\n\t\t\t\t\tgetServiceInfo(row)?.projectName ?? \"\",\n\t\t\t\theader: ({\n\t\t\t\t\tcolumn,\n\t\t\t\t}: {\n\t\t\t\t\tcolumn: {\n\t\t\t\t\t\tgetIsSorted: () => false | \"asc\" | \"desc\";\n\t\t\t\t\t\ttoggleSorting: (asc: boolean) => void;\n\t\t\t\t\t};\n\t\t\t\t}) => (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\tclassName=\"-ml-3 h-8\"\n\t\t\t\t\t\tonClick={() => column.toggleSorting(column.getIsSorted() === \"asc\")}\n\t\t\t\t\t>\n\t\t\t\t\t\tProject\n\t\t\t\t\t\t<ArrowUpDown className=\"ml-2 size-4\" />\n\t\t\t\t\t</Button>\n\t\t\t\t),\n\t\t\t\tcell: ({ row }: { row: { original: DeploymentRow } }) => {\n\t\t\t\t\tconst info = getServiceInfo(row.original);\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<span className=\"text-muted-foreground\">\n\t\t\t\t\t\t\t{info?.projectName ?? \"—\"}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"environmentName\",\n\t\t\t\taccessorFn: (row: DeploymentRow) =>\n\t\t\t\t\tgetServiceInfo(row)?.environmentName ?? \"\",\n\t\t\t\theader: ({\n\t\t\t\t\tcolumn,\n\t\t\t\t}: {\n\t\t\t\t\tcolumn: {\n\t\t\t\t\t\tgetIsSorted: () => false | \"asc\" | \"desc\";\n\t\t\t\t\t\ttoggleSorting: (asc: boolean) => void;\n\t\t\t\t\t};\n\t\t\t\t}) => (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\tclassName=\"-ml-3 h-8\"\n\t\t\t\t\t\tonClick={() => column.toggleSorting(column.getIsSorted() === \"asc\")}\n\t\t\t\t\t>\n\t\t\t\t\t\tEnvironment\n\t\t\t\t\t\t<ArrowUpDown className=\"ml-2 size-4\" />\n\t\t\t\t\t</Button>\n\t\t\t\t),\n\t\t\t\tcell: ({ row }: { row: { original: DeploymentRow } }) => {\n\t\t\t\t\tconst info = getServiceInfo(row.original);\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<span className=\"text-muted-foreground\">\n\t\t\t\t\t\t\t{info?.environmentName ?? \"—\"}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"serverName\",\n\t\t\t\taccessorFn: (row: DeploymentRow) =>\n\t\t\t\t\trow.server?.name ??\n\t\t\t\t\trow.application?.server?.name ??\n\t\t\t\t\trow.compose?.server?.name ??\n\t\t\t\t\t\"\",\n\t\t\t\theader: ({\n\t\t\t\t\tcolumn,\n\t\t\t\t}: {\n\t\t\t\t\tcolumn: {\n\t\t\t\t\t\tgetIsSorted: () => false | \"asc\" | \"desc\";\n\t\t\t\t\t\ttoggleSorting: (asc: boolean) => void;\n\t\t\t\t\t};\n\t\t\t\t}) => (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\tclassName=\"-ml-3 h-8\"\n\t\t\t\t\t\tonClick={() => column.toggleSorting(column.getIsSorted() === \"asc\")}\n\t\t\t\t\t>\n\t\t\t\t\t\tServer\n\t\t\t\t\t\t<ArrowUpDown className=\"ml-2 size-4\" />\n\t\t\t\t\t</Button>\n\t\t\t\t),\n\t\t\t\tcell: ({ row }: { row: { original: DeploymentRow } }) => {\n\t\t\t\t\tconst d = row.original;\n\t\t\t\t\tconst serverName =\n\t\t\t\t\t\td.server?.name ??\n\t\t\t\t\t\td.application?.server?.name ??\n\t\t\t\t\t\td.compose?.server?.name ??\n\t\t\t\t\t\tnull;\n\t\t\t\t\tconst serverType =\n\t\t\t\t\t\td.server?.serverType ??\n\t\t\t\t\t\td.application?.server?.serverType ??\n\t\t\t\t\t\td.compose?.server?.serverType ??\n\t\t\t\t\t\tnull;\n\t\t\t\t\tconst buildServerName =\n\t\t\t\t\t\td.buildServer?.name ?? d.application?.buildServer?.name ?? null;\n\t\t\t\t\tconst buildServerType =\n\t\t\t\t\t\td.buildServer?.serverType ??\n\t\t\t\t\t\td.application?.buildServer?.serverType ??\n\t\t\t\t\t\tnull;\n\t\t\t\t\tconst showBuild =\n\t\t\t\t\t\tbuildServerName != null && buildServerName !== serverName;\n\t\t\t\t\tif (!serverName && !showBuild) {\n\t\t\t\t\t\treturn <span className=\"text-muted-foreground\">—</span>;\n\t\t\t\t\t}\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<div className=\"flex flex-col gap-0.5 text-sm\">\n\t\t\t\t\t\t\t{serverName && (\n\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-1.5 flex-wrap\">\n\t\t\t\t\t\t\t\t\t<Server className=\"size-3.5 text-muted-foreground shrink-0\" />\n\t\t\t\t\t\t\t\t\t<span className=\"truncate\">{serverName}</span>\n\t\t\t\t\t\t\t\t\t{serverType && (\n\t\t\t\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-[10px] font-normal\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{serverType}\n\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{showBuild && buildServerName && (\n\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-1.5 text-muted-foreground flex-wrap\">\n\t\t\t\t\t\t\t\t\t<span className=\"text-[10px]\">Build:</span>\n\t\t\t\t\t\t\t\t\t<span className=\"truncate text-xs\">{buildServerName}</span>\n\t\t\t\t\t\t\t\t\t{buildServerType && (\n\t\t\t\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-[10px] font-normal\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{buildServerType}\n\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\taccessorKey: \"title\",\n\t\t\t\theader: ({\n\t\t\t\t\tcolumn,\n\t\t\t\t}: {\n\t\t\t\t\tcolumn: {\n\t\t\t\t\t\tgetIsSorted: () => false | \"asc\" | \"desc\";\n\t\t\t\t\t\ttoggleSorting: (asc: boolean) => void;\n\t\t\t\t\t};\n\t\t\t\t}) => (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\tclassName=\"-ml-3 h-8\"\n\t\t\t\t\t\tonClick={() => column.toggleSorting(column.getIsSorted() === \"asc\")}\n\t\t\t\t\t>\n\t\t\t\t\t\tTitle\n\t\t\t\t\t\t<ArrowUpDown className=\"ml-2 size-4\" />\n\t\t\t\t\t</Button>\n\t\t\t\t),\n\t\t\t\tcell: ({ row }: { row: { original: DeploymentRow } }) => (\n\t\t\t\t\t<span className=\"text-sm truncate max-w-[200px] block\">\n\t\t\t\t\t\t{row.original.title || \"—\"}\n\t\t\t\t\t</span>\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\taccessorKey: \"status\",\n\t\t\t\theader: ({\n\t\t\t\t\tcolumn,\n\t\t\t\t}: {\n\t\t\t\t\tcolumn: {\n\t\t\t\t\t\tgetIsSorted: () => false | \"asc\" | \"desc\";\n\t\t\t\t\t\ttoggleSorting: (asc: boolean) => void;\n\t\t\t\t\t};\n\t\t\t\t}) => (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\tclassName=\"-ml-3 h-8\"\n\t\t\t\t\t\tonClick={() => column.toggleSorting(column.getIsSorted() === \"asc\")}\n\t\t\t\t\t>\n\t\t\t\t\t\tStatus\n\t\t\t\t\t\t<ArrowUpDown className=\"ml-2 size-4\" />\n\t\t\t\t\t</Button>\n\t\t\t\t),\n\t\t\t\tcell: ({ row }: { row: { original: DeploymentRow } }) => {\n\t\t\t\t\tconst status = row.original.status ?? \"running\";\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Badge variant={statusVariants[status] ?? \"secondary\"}>\n\t\t\t\t\t\t\t{status}\n\t\t\t\t\t\t</Badge>\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\taccessorKey: \"createdAt\",\n\t\t\t\theader: ({\n\t\t\t\t\tcolumn,\n\t\t\t\t}: {\n\t\t\t\t\tcolumn: {\n\t\t\t\t\t\tgetIsSorted: () => false | \"asc\" | \"desc\";\n\t\t\t\t\t\ttoggleSorting: (asc: boolean) => void;\n\t\t\t\t\t};\n\t\t\t\t}) => (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\tclassName=\"-ml-3 h-8\"\n\t\t\t\t\t\tonClick={() => column.toggleSorting(column.getIsSorted() === \"asc\")}\n\t\t\t\t\t>\n\t\t\t\t\t\tCreated\n\t\t\t\t\t\t<ArrowUpDown className=\"ml-2 size-4\" />\n\t\t\t\t\t</Button>\n\t\t\t\t),\n\t\t\t\tcell: ({ row }: { row: { original: DeploymentRow } }) => (\n\t\t\t\t\t<span className=\"text-muted-foreground text-sm whitespace-nowrap\">\n\t\t\t\t\t\t{row.original.createdAt\n\t\t\t\t\t\t\t? new Date(row.original.createdAt).toLocaleString()\n\t\t\t\t\t\t\t: \"—\"}\n\t\t\t\t\t</span>\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\theader: \"\",\n\t\t\t\tid: \"actions\",\n\t\t\t\tenableSorting: false,\n\t\t\t\tcell: ({ row }: { row: { original: DeploymentRow } }) => {\n\t\t\t\t\tconst info = getServiceInfo(row.original);\n\t\t\t\t\tif (!info) return null;\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Button variant=\"ghost\" size=\"sm\" asChild>\n\t\t\t\t\t\t\t<Link href={info.href} className=\"gap-1\">\n\t\t\t\t\t\t\t\t<ExternalLink className=\"size-4\" />\n\t\t\t\t\t\t\t\tOpen\n\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t\t[],\n\t);\n\n\tconst table = useReactTable({\n\t\tdata: filteredData,\n\t\tcolumns,\n\t\tstate: {\n\t\t\tsorting,\n\t\t\tcolumnFilters,\n\t\t\tglobalFilter,\n\t\t\tpagination,\n\t\t},\n\t\tonSortingChange: setSorting,\n\t\tonColumnFiltersChange: setColumnFilters,\n\t\tonGlobalFilterChange: setGlobalFilter,\n\t\tonPaginationChange: setPagination,\n\t\tgetCoreRowModel: getCoreRowModel(),\n\t\tgetSortedRowModel: getSortedRowModel(),\n\t\tgetFilteredRowModel: getFilteredRowModel(),\n\t\tgetPaginationRowModel: getPaginationRowModel(),\n\t});\n\n\treturn (\n\t\t<div className=\"space-y-2\">\n\t\t\t<div className=\"flex flex-wrap items-center gap-2\">\n\t\t\t\t<Input\n\t\t\t\t\tplaceholder=\"Search by name, project, environment, server...\"\n\t\t\t\t\tvalue={globalFilter}\n\t\t\t\t\tonChange={(e) => setGlobalFilter(e.target.value)}\n\t\t\t\t\tclassName=\"max-w-xs\"\n\t\t\t\t/>\n\t\t\t\t<Select value={statusFilter} onValueChange={setStatusFilter}>\n\t\t\t\t\t<SelectTrigger className=\"w-[140px]\">\n\t\t\t\t\t\t<SelectValue placeholder=\"Status\" />\n\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t<SelectItem value=\"all\">All statuses</SelectItem>\n\t\t\t\t\t\t<SelectItem value=\"running\">Running</SelectItem>\n\t\t\t\t\t\t<SelectItem value=\"done\">Done</SelectItem>\n\t\t\t\t\t\t<SelectItem value=\"error\">Error</SelectItem>\n\t\t\t\t\t\t<SelectItem value=\"cancelled\">Cancelled</SelectItem>\n\t\t\t\t\t</SelectContent>\n\t\t\t\t</Select>\n\t\t\t\t<Select value={typeFilter} onValueChange={setTypeFilter}>\n\t\t\t\t\t<SelectTrigger className=\"w-[140px]\">\n\t\t\t\t\t\t<SelectValue placeholder=\"Type\" />\n\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t<SelectItem value=\"all\">All types</SelectItem>\n\t\t\t\t\t\t<SelectItem value=\"application\">Application</SelectItem>\n\t\t\t\t\t\t<SelectItem value=\"compose\">Compose</SelectItem>\n\t\t\t\t\t</SelectContent>\n\t\t\t\t</Select>\n\t\t\t</div>\n\t\t\t<div className=\"px-0\">\n\t\t\t\t{isLoading ? (\n\t\t\t\t\t<div className=\"flex gap-4 w-full items-center justify-center min-h-[45vh] text-muted-foreground\">\n\t\t\t\t\t\t<Loader2 className=\"size-4 animate-spin\" />\n\t\t\t\t\t\t<span>Loading deployments...</span>\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<div className=\"rounded-md border overflow-x-auto\">\n\t\t\t\t\t\t\t<Table>\n\t\t\t\t\t\t\t\t<TableHeader>\n\t\t\t\t\t\t\t\t\t{table.getHeaderGroups().map((headerGroup) => (\n\t\t\t\t\t\t\t\t\t\t<TableRow key={headerGroup.id}>\n\t\t\t\t\t\t\t\t\t\t\t{headerGroup.headers.map((header) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<TableHead key={header.id}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{header.isPlaceholder\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? null\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: flexRender(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\theader.column.columnDef.header,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\theader.getContext(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t</TableHead>\n\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t</TableHeader>\n\t\t\t\t\t\t\t\t<TableBody>\n\t\t\t\t\t\t\t\t\t{table.getRowModel().rows?.length ? (\n\t\t\t\t\t\t\t\t\t\ttable.getRowModel().rows.map((row) => (\n\t\t\t\t\t\t\t\t\t\t\t<TableRow key={row.id}>\n\t\t\t\t\t\t\t\t\t\t\t\t{row.getVisibleCells().map((cell) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TableCell key={cell.id}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{flexRender(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcell.column.columnDef.cell,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcell.getContext(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t\t\t\t\t))\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t<TableRow>\n\t\t\t\t\t\t\t\t\t\t\t<TableCell\n\t\t\t\t\t\t\t\t\t\t\t\tcolSpan={columns.length}\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\" text-center\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col min-h-[45vh] items-center justify-center gap-2 text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Rocket className=\"size-8\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"font-medium\">No deployments found</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDeployments from applications and compose will\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tappear here.\n\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</TableBody>\n\t\t\t\t\t\t\t</Table>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"flex flex-col gap-4 px-4 py-4 border-t sm:flex-row sm:items-center sm:justify-between\">\n\t\t\t\t\t\t\t<div className=\"flex items-center gap-2 flex-wrap\">\n\t\t\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground whitespace-nowrap\">\n\t\t\t\t\t\t\t\t\tRows per page\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\tvalue={String(pagination.pageSize)}\n\t\t\t\t\t\t\t\t\tonValueChange={(value) => {\n\t\t\t\t\t\t\t\t\t\tsetPagination((p) => ({\n\t\t\t\t\t\t\t\t\t\t\t...p,\n\t\t\t\t\t\t\t\t\t\t\tpageSize: Number(value),\n\t\t\t\t\t\t\t\t\t\t\tpageIndex: 0,\n\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<SelectTrigger className=\"h-8 w-[70px]\">\n\t\t\t\t\t\t\t\t\t\t<SelectValue />\n\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t<SelectContent side=\"top\">\n\t\t\t\t\t\t\t\t\t\t{[10, 25, 50, 100].map((size) => (\n\t\t\t\t\t\t\t\t\t\t\t<SelectItem key={size} value={String(size)}>\n\t\t\t\t\t\t\t\t\t\t\t\t{size}\n\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground whitespace-nowrap\">\n\t\t\t\t\t\t\t\t\tShowing{\" \"}\n\t\t\t\t\t\t\t\t\t{filteredData.length === 0\n\t\t\t\t\t\t\t\t\t\t? 0\n\t\t\t\t\t\t\t\t\t\t: pagination.pageIndex * pagination.pageSize + 1}{\" \"}\n\t\t\t\t\t\t\t\t\tto{\" \"}\n\t\t\t\t\t\t\t\t\t{Math.min(\n\t\t\t\t\t\t\t\t\t\t(pagination.pageIndex + 1) * pagination.pageSize,\n\t\t\t\t\t\t\t\t\t\tfilteredData.length,\n\t\t\t\t\t\t\t\t\t)}{\" \"}\n\t\t\t\t\t\t\t\t\tof {filteredData.length} entries\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\tclassName=\"h-8\"\n\t\t\t\t\t\t\t\t\tonClick={() => table.previousPage()}\n\t\t\t\t\t\t\t\t\tdisabled={!table.getCanPreviousPage()}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<ChevronLeft className=\"size-4\" />\n\t\t\t\t\t\t\t\t\tPrevious\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\tclassName=\"h-8\"\n\t\t\t\t\t\t\t\t\tonClick={() => table.nextPage()}\n\t\t\t\t\t\t\t\t\tdisabled={!table.getCanNextPage()}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tNext\n\t\t\t\t\t\t\t\t\t<ChevronRight className=\"size-4\" />\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/deployments/show-queue-table.tsx",
    "content": "\"use client\";\n\nimport type { inferRouterOutputs } from \"@trpc/server\";\nimport Link from \"next/link\";\nimport { ArrowRight, ListTodo, Loader2, XCircle } from \"lucide-react\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tTable,\n\tTableBody,\n\tTableCell,\n\tTableHead,\n\tTableHeader,\n\tTableRow,\n} from \"@/components/ui/table\";\nimport type { AppRouter } from \"@/server/api/root\";\nimport { api } from \"@/utils/api\";\n\ntype QueueRow =\n\tinferRouterOutputs<AppRouter>[\"deployment\"][\"queueList\"][number];\n\nconst stateVariants: Record<\n\tstring,\n\t| \"default\"\n\t| \"secondary\"\n\t| \"destructive\"\n\t| \"outline\"\n\t| \"yellow\"\n\t| \"green\"\n\t| \"red\"\n> = {\n\tpending: \"secondary\",\n\twaiting: \"secondary\",\n\tactive: \"yellow\",\n\tdelayed: \"outline\",\n\tcompleted: \"green\",\n\tfailed: \"destructive\",\n\tcancelled: \"outline\",\n\tpaused: \"outline\",\n};\n\nfunction formatTs(ts?: number): string {\n\tif (ts == null) return \"—\";\n\tconst d = new Date(ts);\n\treturn d.toLocaleString();\n}\n\nfunction getJobLabel(row: QueueRow): string {\n\tconst d = row.data as {\n\t\tapplicationType?: string;\n\t\tapplicationId?: string;\n\t\tcomposeId?: string;\n\t\tpreviewDeploymentId?: string;\n\t\ttitleLog?: string;\n\t\ttype?: string;\n\t};\n\tif (!d) return String(row.id);\n\tconst type = d.applicationType ?? \"job\";\n\tconst title = d.titleLog ?? \"\";\n\tif (title) return title;\n\tif (d.applicationId) return `Application ${d.applicationId.slice(0, 8)}…`;\n\tif (d.composeId) return `Compose ${d.composeId.slice(0, 8)}…`;\n\tif (d.previewDeploymentId)\n\t\treturn `Preview ${d.previewDeploymentId.slice(0, 8)}…`;\n\treturn `${type} ${String(row.id)}`;\n}\n\nexport function ShowQueueTable(props: { embedded?: boolean }) {\n\tconst { embedded: _embedded = false } = props;\n\tconst { data: queueList, isLoading } = api.deployment.queueList.useQuery(\n\t\tundefined,\n\t\t{ refetchInterval: 3000 },\n\t);\n\tconst { data: isCloud } = api.settings.isCloud.useQuery();\n\tconst utils = api.useUtils();\n\tconst {\n\t\tmutateAsync: cancelApplicationDeployment,\n\t\tisPending: isCancellingApp,\n\t} = api.application.cancelDeployment.useMutation({\n\t\tonSuccess: () => void utils.deployment.queueList.invalidate(),\n\t});\n\tconst {\n\t\tmutateAsync: cancelComposeDeployment,\n\t\tisPending: isCancellingCompose,\n\t} = api.compose.cancelDeployment.useMutation({\n\t\tonSuccess: () => void utils.deployment.queueList.invalidate(),\n\t});\n\tconst isCancelling = isCancellingApp || isCancellingCompose;\n\n\treturn (\n\t\t<div className=\"px-0\">\n\t\t\t{isLoading ? (\n\t\t\t\t<div className=\"flex gap-4 w-full items-center justify-center min-h-[30vh] text-muted-foreground\">\n\t\t\t\t\t<Loader2 className=\"size-4 animate-spin\" />\n\t\t\t\t\t<span>Loading queue...</span>\n\t\t\t\t</div>\n\t\t\t) : (\n\t\t\t\t<div className=\"rounded-md border overflow-x-auto\">\n\t\t\t\t\t<Table>\n\t\t\t\t\t\t<TableHeader>\n\t\t\t\t\t\t\t<TableRow>\n\t\t\t\t\t\t\t\t<TableHead>Job ID</TableHead>\n\t\t\t\t\t\t\t\t<TableHead>Label</TableHead>\n\t\t\t\t\t\t\t\t<TableHead>Type</TableHead>\n\t\t\t\t\t\t\t\t<TableHead>State</TableHead>\n\t\t\t\t\t\t\t\t<TableHead>Added</TableHead>\n\t\t\t\t\t\t\t\t<TableHead>Processed</TableHead>\n\t\t\t\t\t\t\t\t<TableHead>Finished</TableHead>\n\t\t\t\t\t\t\t\t<TableHead>Error</TableHead>\n\t\t\t\t\t\t\t\t<TableHead className=\"w-[100px]\">Actions</TableHead>\n\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t</TableHeader>\n\t\t\t\t\t\t<TableBody>\n\t\t\t\t\t\t\t{queueList?.length ? (\n\t\t\t\t\t\t\t\tqueueList.map((row) => {\n\t\t\t\t\t\t\t\t\tconst d = row.data as Record<string, unknown>;\n\t\t\t\t\t\t\t\t\tconst appType = d?.applicationType as string | undefined;\n\t\t\t\t\t\t\t\t\tconst pathInfo = row.servicePath;\n\t\t\t\t\t\t\t\t\tconst hasLink = pathInfo?.href != null;\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<TableRow key={String(row.id)}>\n\t\t\t\t\t\t\t\t\t\t\t<TableCell className=\"font-mono text-xs\">\n\t\t\t\t\t\t\t\t\t\t\t\t{String(row.id)}\n\t\t\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t\t\t\t<TableCell className=\"max-w-[200px] truncate\">\n\t\t\t\t\t\t\t\t\t\t\t\t{getJobLabel(row)}\n\t\t\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t\t\t\t<TableCell>{appType ?? row.name ?? \"—\"}</TableCell>\n\t\t\t\t\t\t\t\t\t\t\t<TableCell>\n\t\t\t\t\t\t\t\t\t\t\t\t<Badge variant={stateVariants[row.state] ?? \"outline\"}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{row.state}\n\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t\t\t\t<TableCell className=\"text-muted-foreground text-xs\">\n\t\t\t\t\t\t\t\t\t\t\t\t{formatTs(row.timestamp)}\n\t\t\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t\t\t\t<TableCell className=\"text-muted-foreground text-xs\">\n\t\t\t\t\t\t\t\t\t\t\t\t{formatTs(row.processedOn)}\n\t\t\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t\t\t\t<TableCell className=\"text-muted-foreground text-xs\">\n\t\t\t\t\t\t\t\t\t\t\t\t{formatTs(row.finishedOn)}\n\t\t\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t\t\t\t<TableCell className=\"max-w-[180px] truncate text-xs text-destructive\">\n\t\t\t\t\t\t\t\t\t\t\t\t{row.failedReason ?? \"—\"}\n\t\t\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t\t\t\t<TableCell>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{hasLink ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button variant=\"ghost\" size=\"sm\" asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Link href={pathInfo!.href!}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ArrowRight className=\"size-4 mr-1\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tService\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground text-xs\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t—\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t{isCloud &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\trow.state === \"active\" &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t(d?.applicationId != null ||\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\td?.composeId != null) && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-destructive hover:text-destructive\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisabled={isCancelling}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst appId =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttypeof d.applicationId === \"string\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? d.applicationId\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst compId =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttypeof d.composeId === \"string\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? d.composeId\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (appId) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvoid cancelApplicationDeployment({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tapplicationId: appId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (compId) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvoid cancelComposeDeployment({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcomposeId: compId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<XCircle className=\"size-4 mr-1\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCancel\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<TableRow>\n\t\t\t\t\t\t\t\t\t<TableCell colSpan={9} className=\"text-center py-12\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col items-center justify-center gap-2 text-muted-foreground min-h-[30vh]\">\n\t\t\t\t\t\t\t\t\t\t\t<ListTodo className=\"size-8\" />\n\t\t\t\t\t\t\t\t\t\t\t<p className=\"font-medium\">Queue is empty</p>\n\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\tDeployment jobs will appear here when they are queued.\n\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</TableBody>\n\t\t\t\t\t</Table>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/docker/config/show-container-config.tsx",
    "content": "import { CodeEditor } from \"@/components/shared/code-editor\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport { DropdownMenuItem } from \"@/components/ui/dropdown-menu\";\nimport { api } from \"@/utils/api\";\n\ninterface Props {\n\tcontainerId: string;\n\tserverId?: string;\n}\n\nexport const ShowContainerConfig = ({ containerId, serverId }: Props) => {\n\tconst { data } = api.docker.getConfig.useQuery(\n\t\t{\n\t\t\tcontainerId,\n\t\t\tserverId,\n\t\t},\n\t\t{\n\t\t\tenabled: !!containerId,\n\t\t},\n\t);\n\treturn (\n\t\t<Dialog>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t<DropdownMenuItem\n\t\t\t\t\tclassName=\"w-full cursor-pointer\"\n\t\t\t\t\tonSelect={(e) => e.preventDefault()}\n\t\t\t\t>\n\t\t\t\t\tView Config\n\t\t\t\t</DropdownMenuItem>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className={\"w-full md:w-[70vw] min-w-[70vw]\"}>\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Container Config</DialogTitle>\n\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\tSee in detail the config of this container\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t<div className=\"text-wrap rounded-lg border p-4 overflow-y-auto text-sm bg-card max-h-[80vh]\">\n\t\t\t\t\t<code>\n\t\t\t\t\t\t<pre className=\"whitespace-pre-wrap break-words\">\n\t\t\t\t\t\t\t<CodeEditor\n\t\t\t\t\t\t\t\tlanguage=\"json\"\n\t\t\t\t\t\t\t\tlineWrapping\n\t\t\t\t\t\t\t\tlineNumbers={false}\n\t\t\t\t\t\t\t\treadOnly\n\t\t\t\t\t\t\t\tvalue={JSON.stringify(data, null, 2)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</pre>\n\t\t\t\t\t</code>\n\t\t\t\t</div>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/docker/logs/docker-logs-id.tsx",
    "content": "import copy from \"copy-to-clipboard\";\nimport {\n\tCheck,\n\tCopy,\n\tDownload as DownloadIcon,\n\tLoader2,\n\tPause,\n\tPlay,\n} from \"lucide-react\";\nimport React, { useEffect, useRef } from \"react\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport { Input } from \"@/components/ui/input\";\nimport { api } from \"@/utils/api\";\nimport { LineCountFilter } from \"./line-count-filter\";\nimport { SinceLogsFilter, type TimeFilter } from \"./since-logs-filter\";\nimport { StatusLogsFilter } from \"./status-logs-filter\";\nimport { TerminalLine } from \"./terminal-line\";\nimport { getLogType, type LogLine, parseLogs } from \"./utils\";\n\ninterface Props {\n\tcontainerId: string;\n\tserverId?: string | null;\n\trunType: \"swarm\" | \"native\";\n}\n\nexport const priorities = [\n\t{\n\t\tlabel: \"Info\",\n\t\tvalue: \"info\",\n\t},\n\t{\n\t\tlabel: \"Success\",\n\t\tvalue: \"success\",\n\t},\n\t{\n\t\tlabel: \"Warning\",\n\t\tvalue: \"warning\",\n\t},\n\t{\n\t\tlabel: \"Debug\",\n\t\tvalue: \"debug\",\n\t},\n\t{\n\t\tlabel: \"Error\",\n\t\tvalue: \"error\",\n\t},\n];\n\nexport const DockerLogsId: React.FC<Props> = ({\n\tcontainerId,\n\tserverId,\n\trunType,\n}) => {\n\tconst { data } = api.docker.getConfig.useQuery(\n\t\t{\n\t\t\tcontainerId,\n\t\t\tserverId: serverId ?? undefined,\n\t\t},\n\t\t{\n\t\t\tenabled: !!containerId,\n\t\t},\n\t);\n\n\tconst [rawLogs, setRawLogs] = React.useState(\"\");\n\tconst [filteredLogs, setFilteredLogs] = React.useState<LogLine[]>([]);\n\tconst [autoScroll, setAutoScroll] = React.useState(true);\n\tconst [lines, setLines] = React.useState<number>(100);\n\tconst [search, setSearch] = React.useState<string>(\"\");\n\tconst [showTimestamp, setShowTimestamp] = React.useState(true);\n\tconst [since, setSince] = React.useState<TimeFilter>(\"all\");\n\tconst [typeFilter, setTypeFilter] = React.useState<string[]>([]);\n\tconst [isPaused, setIsPaused] = React.useState(false);\n\tconst [messageBuffer, setMessageBuffer] = React.useState<string[]>([]);\n\tconst isPausedRef = useRef(false);\n\tconst scrollRef = useRef<HTMLDivElement>(null);\n\tconst [isLoading, setIsLoading] = React.useState(false);\n\tconst [copied, setCopied] = React.useState(false);\n\n\tconst scrollToBottom = () => {\n\t\tif (autoScroll && scrollRef.current) {\n\t\t\tscrollRef.current.scrollTop = scrollRef.current.scrollHeight;\n\t\t}\n\t};\n\n\tconst handleScroll = () => {\n\t\tif (!scrollRef.current) return;\n\n\t\tconst { scrollTop, scrollHeight, clientHeight } = scrollRef.current;\n\t\tconst isAtBottom = Math.abs(scrollHeight - scrollTop - clientHeight) < 10;\n\t\tsetAutoScroll(isAtBottom);\n\t};\n\n\tconst handleSearch = (e: React.ChangeEvent<HTMLInputElement>) => {\n\t\tsetSearch(e.target.value || \"\");\n\t};\n\n\tconst handleLines = (lines: number) => {\n\t\tsetRawLogs(\"\");\n\t\tsetFilteredLogs([]);\n\t\tsetMessageBuffer([]);\n\t\tsetLines(lines);\n\t};\n\n\tconst handleSince = (value: TimeFilter) => {\n\t\tsetRawLogs(\"\");\n\t\tsetFilteredLogs([]);\n\t\tsetMessageBuffer([]);\n\t\tsetSince(value);\n\t};\n\n\tconst handlePauseResume = () => {\n\t\tif (isPaused) {\n\t\t\t// Resume: Apply all buffered messages\n\t\t\tif (messageBuffer.length > 0) {\n\t\t\t\tconst bufferedContent = messageBuffer.join(\"\");\n\t\t\t\tsetRawLogs((prev) => {\n\t\t\t\t\tconst updated = prev + bufferedContent;\n\t\t\t\t\tconst splitLines = updated.split(\"\\n\");\n\t\t\t\t\tif (splitLines.length > lines) {\n\t\t\t\t\t\treturn splitLines.slice(-lines).join(\"\\n\");\n\t\t\t\t\t}\n\t\t\t\t\treturn updated;\n\t\t\t\t});\n\t\t\t\tsetMessageBuffer([]);\n\t\t\t}\n\t\t}\n\t\tconst newPausedState = !isPaused;\n\t\tsetIsPaused(newPausedState);\n\t\tisPausedRef.current = newPausedState;\n\t};\n\n\tuseEffect(() => {\n\t\tif (!containerId) return;\n\n\t\tlet isCurrentConnection = true;\n\t\tlet noDataTimeout: NodeJS.Timeout;\n\t\tsetIsLoading(true);\n\t\tsetRawLogs(\"\");\n\t\tsetFilteredLogs([]);\n\t\tsetMessageBuffer([]);\n\t\t// Reset pause state when container changes\n\t\tsetIsPaused(false);\n\t\tisPausedRef.current = false;\n\n\t\tconst protocol = window.location.protocol === \"https:\" ? \"wss:\" : \"ws:\";\n\t\tconst params = new globalThis.URLSearchParams({\n\t\t\tcontainerId,\n\t\t\ttail: lines.toString(),\n\t\t\tsince,\n\t\t\tsearch,\n\t\t\trunType,\n\t\t});\n\n\t\tif (serverId) {\n\t\t\tparams.append(\"serverId\", serverId);\n\t\t}\n\n\t\tconst wsUrl = `${protocol}//${\n\t\t\twindow.location.host\n\t\t}/docker-container-logs?${params.toString()}`;\n\t\tconst ws = new WebSocket(wsUrl);\n\n\t\tconst resetNoDataTimeout = () => {\n\t\t\tif (noDataTimeout) clearTimeout(noDataTimeout);\n\t\t\tnoDataTimeout = setTimeout(() => {\n\t\t\t\tif (isCurrentConnection) {\n\t\t\t\t\tsetIsLoading(false);\n\t\t\t\t}\n\t\t\t}, 2000); // Wait 2 seconds for data before showing \"No logs found\"\n\t\t};\n\n\t\tws.onopen = () => {\n\t\t\tif (!isCurrentConnection) {\n\t\t\t\tws.close();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tresetNoDataTimeout();\n\t\t};\n\n\t\tws.onmessage = (e) => {\n\t\t\tif (!isCurrentConnection) return;\n\n\t\t\tif (isPausedRef.current) {\n\t\t\t\t// When paused, buffer the messages instead of displaying them\n\t\t\t\tsetMessageBuffer((prev) => [...prev, e.data]);\n\t\t\t} else {\n\t\t\t\t// When not paused, display messages normally\n\t\t\t\tsetRawLogs((prev) => {\n\t\t\t\t\tconst updated = prev + e.data;\n\t\t\t\t\tconst splitLines = updated.split(\"\\n\");\n\t\t\t\t\tif (splitLines.length > lines) {\n\t\t\t\t\t\treturn splitLines.slice(-lines).join(\"\\n\");\n\t\t\t\t\t}\n\t\t\t\t\treturn updated;\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tsetIsLoading(false);\n\t\t\tif (noDataTimeout) clearTimeout(noDataTimeout);\n\t\t};\n\n\t\tws.onerror = (error) => {\n\t\t\tif (!isCurrentConnection) return;\n\t\t\tconsole.error(\"WebSocket error:\", error);\n\t\t\tsetIsLoading(false);\n\t\t\tif (noDataTimeout) clearTimeout(noDataTimeout);\n\t\t};\n\n\t\tws.onclose = (e) => {\n\t\t\tif (!isCurrentConnection) return;\n\t\t\tconsole.log(\"WebSocket closed:\", e.reason);\n\t\t\tsetIsLoading(false);\n\t\t\tif (noDataTimeout) clearTimeout(noDataTimeout);\n\t\t};\n\n\t\treturn () => {\n\t\t\tisCurrentConnection = false;\n\t\t\tif (noDataTimeout) clearTimeout(noDataTimeout);\n\t\t\tif (ws.readyState === WebSocket.OPEN) {\n\t\t\t\tws.close();\n\t\t\t}\n\t\t};\n\t}, [containerId, serverId, lines, search, since]);\n\n\tconst handleDownload = () => {\n\t\tconst logContent = filteredLogs\n\t\t\t.map(\n\t\t\t\t({ timestamp, message }: { timestamp: Date | null; message: string }) =>\n\t\t\t\t\t`${timestamp?.toISOString() || \"No timestamp\"} ${message}`,\n\t\t\t)\n\t\t\t.join(\"\\n\");\n\n\t\tconst blob = new Blob([logContent], { type: \"text/plain\" });\n\t\tconst url = URL.createObjectURL(blob);\n\t\tconst a = document.createElement(\"a\");\n\t\tconst appName = data.Name.replace(\"/\", \"\") || \"app\";\n\t\tconst isoDate = new Date().toISOString();\n\t\ta.href = url;\n\t\ta.download = `${appName}-${isoDate.slice(0, 10).replace(/-/g, \"\")}_${isoDate\n\t\t\t.slice(11, 19)\n\t\t\t.replace(/:/g, \"\")}.log.txt`;\n\t\tdocument.body.appendChild(a);\n\t\ta.click();\n\t\tdocument.body.removeChild(a);\n\t\tURL.revokeObjectURL(url);\n\t};\n\n\tconst handleCopy = async () => {\n\t\tconst logContent = filteredLogs\n\t\t\t.map(\n\t\t\t\t({\n\t\t\t\t\ttimestamp,\n\t\t\t\t\tmessage,\n\t\t\t\t}: {\n\t\t\t\t\ttimestamp: Date | null;\n\t\t\t\t\tmessage: string;\n\t\t\t\t}) =>\n\t\t\t\t\tshowTimestamp\n\t\t\t\t\t\t? `${timestamp?.toISOString() || \"No timestamp\"} ${message}`\n\t\t\t\t\t\t: message,\n\t\t\t)\n\t\t\t.join(\"\\n\");\n\n\t\tconst success = copy(logContent);\n\t\tif (success) {\n\t\t\tsetCopied(true);\n\t\t\tsetTimeout(() => setCopied(false), 2000);\n\t\t}\n\t};\n\n\tconst handleFilter = (logs: LogLine[]) => {\n\t\treturn logs.filter((log) => {\n\t\t\tconst logType = getLogType(log.message).type;\n\n\t\t\tif (typeFilter.length === 0) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn typeFilter.includes(logType);\n\t\t});\n\t};\n\n\t// Sync isPausedRef with isPaused state\n\tuseEffect(() => {\n\t\tisPausedRef.current = isPaused;\n\t}, [isPaused]);\n\n\tuseEffect(() => {\n\t\tsetRawLogs(\"\");\n\t\tsetFilteredLogs([]);\n\t\tsetMessageBuffer([]);\n\t}, [containerId]);\n\n\tuseEffect(() => {\n\t\tconst logs = parseLogs(rawLogs);\n\t\tconst filtered = handleFilter(logs);\n\t\tsetFilteredLogs(filtered);\n\t}, [rawLogs, search, lines, since, typeFilter]);\n\n\tuseEffect(() => {\n\t\tscrollToBottom();\n\n\t\tif (autoScroll && scrollRef.current) {\n\t\t\tscrollRef.current.scrollTop = scrollRef.current.scrollHeight;\n\t\t}\n\t}, [filteredLogs, autoScroll]);\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<div className=\"rounded-lg\">\n\t\t\t\t<div className=\"space-y-4\">\n\t\t\t\t\t<div className=\"flex flex-wrap justify-between items-start sm:items-center gap-4\">\n\t\t\t\t\t\t<div className=\"flex flex-wrap gap-4\">\n\t\t\t\t\t\t\t<LineCountFilter value={lines} onValueChange={handleLines} />\n\n\t\t\t\t\t\t\t<SinceLogsFilter\n\t\t\t\t\t\t\t\tvalue={since}\n\t\t\t\t\t\t\t\tonValueChange={handleSince}\n\t\t\t\t\t\t\t\tshowTimestamp={showTimestamp}\n\t\t\t\t\t\t\t\tonTimestampChange={setShowTimestamp}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t<StatusLogsFilter\n\t\t\t\t\t\t\t\tvalue={typeFilter}\n\t\t\t\t\t\t\t\tsetValue={setTypeFilter}\n\t\t\t\t\t\t\t\ttitle=\"Log type\"\n\t\t\t\t\t\t\t\toptions={priorities}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\ttype=\"search\"\n\t\t\t\t\t\t\t\tplaceholder=\"Search logs...\"\n\t\t\t\t\t\t\t\tvalue={search}\n\t\t\t\t\t\t\t\tonChange={handleSearch}\n\t\t\t\t\t\t\t\tclassName=\"inline-flex h-9 text-sm placeholder-gray-400 w-full sm:w-auto\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div className=\"flex gap-2\">\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\tclassName=\"h-9\"\n\t\t\t\t\t\t\t\tonClick={handlePauseResume}\n\t\t\t\t\t\t\t\ttitle={isPaused ? \"Resume logs\" : \"Pause logs\"}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{isPaused ? (\n\t\t\t\t\t\t\t\t\t<Play className=\"mr-2 h-4 w-4\" />\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<Pause className=\"mr-2 h-4 w-4\" />\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{isPaused ? \"Resume\" : \"Pause\"}\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\tclassName=\"h-9\"\n\t\t\t\t\t\t\t\tonClick={handleCopy}\n\t\t\t\t\t\t\t\tdisabled={filteredLogs.length === 0}\n\t\t\t\t\t\t\t\ttitle=\"Copy logs to clipboard\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{copied ? (\n\t\t\t\t\t\t\t\t\t<Check className=\"mr-2 h-4 w-4\" />\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<Copy className=\"mr-2 h-4 w-4\" />\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\tCopy\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\tclassName=\"h-9 sm:w-auto w-full\"\n\t\t\t\t\t\t\t\tonClick={handleDownload}\n\t\t\t\t\t\t\t\tdisabled={filteredLogs.length === 0 || !data?.Name}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<DownloadIcon className=\"mr-2 h-4 w-4\" />\n\t\t\t\t\t\t\t\tDownload logs\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t{isPaused && (\n\t\t\t\t\t\t<AlertBlock type=\"warning\">\n\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t<Pause className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\tLogs paused\n\t\t\t\t\t\t\t\t\t{messageBuffer.length > 0 && (\n\t\t\t\t\t\t\t\t\t\t<span className=\"ml-1 font-medium\">\n\t\t\t\t\t\t\t\t\t\t\t({messageBuffer.length} messages buffered)\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t)}\n\t\t\t\t\t<div\n\t\t\t\t\t\tref={scrollRef}\n\t\t\t\t\t\tonScroll={handleScroll}\n\t\t\t\t\t\tclassName=\"h-[720px] overflow-y-auto space-y-0 border p-4 bg-[#fafafa] dark:bg-[#050506] rounded custom-logs-scrollbar\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{filteredLogs.length > 0 ? (\n\t\t\t\t\t\t\tfilteredLogs.map((filteredLog: LogLine, index: number) => (\n\t\t\t\t\t\t\t\t<TerminalLine\n\t\t\t\t\t\t\t\t\tkey={`${filteredLog.rawTimestamp ?? \"\"}-${index}`}\n\t\t\t\t\t\t\t\t\tlog={filteredLog}\n\t\t\t\t\t\t\t\t\tsearchTerm={search}\n\t\t\t\t\t\t\t\t\tnoTimestamp={!showTimestamp}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t))\n\t\t\t\t\t\t) : isLoading ? (\n\t\t\t\t\t\t\t<div className=\"flex justify-center items-center h-full text-muted-foreground\">\n\t\t\t\t\t\t\t\t<Loader2 className=\"h-6 w-6 animate-spin\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<div className=\"flex justify-center items-center h-full text-muted-foreground\">\n\t\t\t\t\t\t\t\tNo logs found\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/docker/logs/line-count-filter.tsx",
    "content": "import { Command as CommandPrimitive } from \"cmdk\";\nimport debounce from \"lodash/debounce\";\nimport { CheckIcon, Hash } from \"lucide-react\";\nimport React, { useCallback, useRef } from \"react\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tPopover,\n\tPopoverContent,\n\tPopoverTrigger,\n} from \"@/components/ui/popover\";\nimport { Separator } from \"@/components/ui/separator\";\nimport { cn } from \"@/lib/utils\";\n\nconst lineCountOptions = [\n\t{ label: \"100 lines\", value: 100 },\n\t{ label: \"300 lines\", value: 300 },\n\t{ label: \"500 lines\", value: 500 },\n\t{ label: \"1000 lines\", value: 1000 },\n\t{ label: \"5000 lines\", value: 5000 },\n] as const;\n\ninterface LineCountFilterProps {\n\tvalue: number;\n\tonValueChange: (value: number) => void;\n\ttitle?: string;\n}\n\nexport function LineCountFilter({\n\tvalue,\n\tonValueChange,\n\ttitle = \"Limit to\",\n}: LineCountFilterProps) {\n\tconst [open, setOpen] = React.useState(false);\n\tconst [inputValue, setInputValue] = React.useState(\"\");\n\tconst pendingValueRef = useRef<number | null>(null);\n\n\tconst isPresetValue = lineCountOptions.some(\n\t\t(option) => option.value === value,\n\t);\n\n\tconst debouncedValueChange = useCallback(\n\t\tdebounce((numValue: number) => {\n\t\t\tif (numValue > 0 && numValue !== value) {\n\t\t\t\tonValueChange(numValue);\n\t\t\t\tpendingValueRef.current = null;\n\t\t\t}\n\t\t}, 500),\n\t\t[onValueChange, value],\n\t);\n\n\tconst handleInputChange = (input: string) => {\n\t\tsetInputValue(input);\n\n\t\t// Extract numbers from input and convert\n\t\tconst numValue = Number.parseInt(input.replace(/[^0-9]/g, \"\"));\n\t\tif (!Number.isNaN(numValue)) {\n\t\t\tpendingValueRef.current = numValue;\n\t\t\tdebouncedValueChange(numValue);\n\t\t}\n\t};\n\n\tconst handleSelect = (selectedValue: string) => {\n\t\tconst preset = lineCountOptions.find((opt) => opt.label === selectedValue);\n\t\tif (preset) {\n\t\t\tif (preset.value !== value) {\n\t\t\t\tonValueChange(preset.value);\n\t\t\t}\n\t\t\tsetInputValue(\"\");\n\t\t\tsetOpen(false);\n\t\t\treturn;\n\t\t}\n\n\t\tconst numValue = Number.parseInt(selectedValue);\n\t\tif (\n\t\t\t!Number.isNaN(numValue) &&\n\t\t\tnumValue > 0 &&\n\t\t\tnumValue !== value &&\n\t\t\tnumValue !== pendingValueRef.current\n\t\t) {\n\t\t\tonValueChange(numValue);\n\t\t\tsetInputValue(\"\");\n\t\t\tsetOpen(false);\n\t\t}\n\t};\n\n\tReact.useEffect(() => {\n\t\treturn () => {\n\t\t\tdebouncedValueChange.cancel();\n\t\t};\n\t}, [debouncedValueChange]);\n\n\tconst displayValue = isPresetValue\n\t\t? lineCountOptions.find((option) => option.value === value)?.label\n\t\t: `${value} lines`;\n\n\treturn (\n\t\t<Popover open={open} onOpenChange={setOpen}>\n\t\t\t<PopoverTrigger asChild>\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\tclassName=\"h-9 bg-input text-sm placeholder-gray-400 w-full sm:w-auto\"\n\t\t\t\t>\n\t\t\t\t\t{title}\n\t\t\t\t\t<Separator orientation=\"vertical\" className=\"mx-2 h-4\" />\n\t\t\t\t\t<div className=\"space-x-1 flex\">\n\t\t\t\t\t\t<Badge variant=\"blank\" className=\"rounded-sm px-1 font-normal\">\n\t\t\t\t\t\t\t{displayValue}\n\t\t\t\t\t\t</Badge>\n\t\t\t\t\t</div>\n\t\t\t\t</Button>\n\t\t\t</PopoverTrigger>\n\t\t\t<PopoverContent className=\"w-[200px] p-0\" align=\"start\">\n\t\t\t\t<CommandPrimitive className=\"overflow-hidden rounded-md border border-none bg-popover text-popover-foreground\">\n\t\t\t\t\t<div className=\"flex items-center border-b px-3\">\n\t\t\t\t\t\t<Hash className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n\t\t\t\t\t\t<CommandPrimitive.Input\n\t\t\t\t\t\t\tplaceholder=\"Number of lines\"\n\t\t\t\t\t\t\tvalue={inputValue}\n\t\t\t\t\t\t\tonValueChange={handleInputChange}\n\t\t\t\t\t\t\tclassName=\"flex h-9 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50\"\n\t\t\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\t\t\tif (e.key === \"Enter\") {\n\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t\tconst numValue = Number.parseInt(\n\t\t\t\t\t\t\t\t\t\tinputValue.replace(/[^0-9]/g, \"\"),\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t!Number.isNaN(numValue) &&\n\t\t\t\t\t\t\t\t\t\tnumValue > 0 &&\n\t\t\t\t\t\t\t\t\t\tnumValue !== value &&\n\t\t\t\t\t\t\t\t\t\tnumValue !== pendingValueRef.current\n\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\thandleSelect(inputValue);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t\t<CommandPrimitive.List className=\"max-h-[300px] overflow-y-auto overflow-x-hidden\">\n\t\t\t\t\t\t<CommandPrimitive.Group className=\"px-2 py-1.5\">\n\t\t\t\t\t\t\t{lineCountOptions.map((option) => {\n\t\t\t\t\t\t\t\tconst isSelected = value === option.value;\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<CommandPrimitive.Item\n\t\t\t\t\t\t\t\t\t\tkey={option.value}\n\t\t\t\t\t\t\t\t\t\tonSelect={() => handleSelect(option.label)}\n\t\t\t\t\t\t\t\t\t\tclassName=\"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 aria-selected:bg-accent aria-selected:text-accent-foreground\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\"flex h-4 w-4 items-center justify-center rounded-sm border border-primary mr-2\",\n\t\t\t\t\t\t\t\t\t\t\t\tisSelected\n\t\t\t\t\t\t\t\t\t\t\t\t\t? \"bg-primary text-primary-foreground\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t: \"opacity-50 [&_svg]:invisible\",\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<CheckIcon className={cn(\"h-4 w-4\")} />\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<span>{option.label}</span>\n\t\t\t\t\t\t\t\t\t</CommandPrimitive.Item>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t</CommandPrimitive.Group>\n\t\t\t\t\t</CommandPrimitive.List>\n\t\t\t\t</CommandPrimitive>\n\t\t\t</PopoverContent>\n\t\t</Popover>\n\t);\n}\n\nexport default LineCountFilter;\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/docker/logs/show-docker-modal-logs.tsx",
    "content": "import dynamic from \"next/dynamic\";\nimport type React from \"react\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport { DropdownMenuItem } from \"@/components/ui/dropdown-menu\";\nexport const DockerLogsId = dynamic(\n\t() =>\n\t\timport(\"@/components/dashboard/docker/logs/docker-logs-id\").then(\n\t\t\t(e) => e.DockerLogsId,\n\t\t),\n\t{\n\t\tssr: false,\n\t},\n);\n\ninterface Props {\n\tcontainerId: string;\n\tchildren?: React.ReactNode;\n\tserverId?: string | null;\n}\n\nexport const ShowDockerModalLogs = ({\n\tcontainerId,\n\tchildren,\n\tserverId,\n}: Props) => {\n\treturn (\n\t\t<Dialog>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t<DropdownMenuItem\n\t\t\t\t\tclassName=\"w-full cursor-pointer space-x-3\"\n\t\t\t\t\tonSelect={(e) => e.preventDefault()}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</DropdownMenuItem>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-7xl\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>View Logs</DialogTitle>\n\t\t\t\t\t<DialogDescription>View the logs for {containerId}</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t<div className=\"flex flex-col gap-4 pt-2.5\">\n\t\t\t\t\t<DockerLogsId\n\t\t\t\t\t\tcontainerId={containerId || \"\"}\n\t\t\t\t\t\tserverId={serverId}\n\t\t\t\t\t\trunType=\"native\"\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/docker/logs/show-docker-modal-stack-logs.tsx",
    "content": "import dynamic from \"next/dynamic\";\nimport type React from \"react\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport { DropdownMenuItem } from \"@/components/ui/dropdown-menu\";\nexport const DockerLogsId = dynamic(\n\t() =>\n\t\timport(\"@/components/dashboard/docker/logs/docker-logs-id\").then(\n\t\t\t(e) => e.DockerLogsId,\n\t\t),\n\t{\n\t\tssr: false,\n\t},\n);\n\ninterface Props {\n\tcontainerId: string;\n\tchildren?: React.ReactNode;\n\tserverId?: string | null;\n}\n\nexport const ShowDockerModalStackLogs = ({\n\tcontainerId,\n\tchildren,\n\tserverId,\n}: Props) => {\n\treturn (\n\t\t<Dialog>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t<DropdownMenuItem\n\t\t\t\t\tclassName=\"w-full cursor-pointer space-x-3\"\n\t\t\t\t\tonSelect={(e) => e.preventDefault()}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</DropdownMenuItem>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-7xl\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>View Logs</DialogTitle>\n\t\t\t\t\t<DialogDescription>View the logs for {containerId}</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t<div className=\"flex flex-col gap-4 pt-2.5\">\n\t\t\t\t\t<DockerLogsId\n\t\t\t\t\t\tcontainerId={containerId || \"\"}\n\t\t\t\t\t\tserverId={serverId}\n\t\t\t\t\t\trunType=\"swarm\"\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/docker/logs/since-logs-filter.tsx",
    "content": "import { CheckIcon } from \"lucide-react\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCommand,\n\tCommandGroup,\n\tCommandItem,\n\tCommandList,\n} from \"@/components/ui/command\";\nimport {\n\tPopover,\n\tPopoverContent,\n\tPopoverTrigger,\n} from \"@/components/ui/popover\";\nimport { Separator } from \"@/components/ui/separator\";\nimport { Switch } from \"@/components/ui/switch\";\nimport { cn } from \"@/lib/utils\";\n\nexport type TimeFilter = \"all\" | \"1h\" | \"6h\" | \"24h\" | \"168h\" | \"720h\";\n\nconst timeRanges: Array<{ label: string; value: TimeFilter }> = [\n\t{\n\t\tlabel: \"All time\",\n\t\tvalue: \"all\",\n\t},\n\t{\n\t\tlabel: \"Last hour\",\n\t\tvalue: \"1h\",\n\t},\n\t{\n\t\tlabel: \"Last 6 hours\",\n\t\tvalue: \"6h\",\n\t},\n\t{\n\t\tlabel: \"Last 24 hours\",\n\t\tvalue: \"24h\",\n\t},\n\t{\n\t\tlabel: \"Last 7 days\",\n\t\tvalue: \"168h\",\n\t},\n\t{\n\t\tlabel: \"Last 30 days\",\n\t\tvalue: \"720h\",\n\t},\n] as const;\n\ninterface SinceLogsFilterProps {\n\tvalue: TimeFilter;\n\tonValueChange: (value: TimeFilter) => void;\n\tshowTimestamp: boolean;\n\tonTimestampChange: (show: boolean) => void;\n\ttitle?: string;\n}\n\nexport function SinceLogsFilter({\n\tvalue,\n\tonValueChange,\n\tshowTimestamp,\n\tonTimestampChange,\n\ttitle = \"Time range\",\n}: SinceLogsFilterProps) {\n\tconst selectedLabel =\n\t\ttimeRanges.find((range) => range.value === value)?.label ??\n\t\t\"Select time range\";\n\n\treturn (\n\t\t<Popover>\n\t\t\t<PopoverTrigger asChild>\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\tclassName=\"h-9 bg-input text-sm placeholder-gray-400 w-full sm:w-auto\"\n\t\t\t\t>\n\t\t\t\t\t{title}\n\t\t\t\t\t<Separator orientation=\"vertical\" className=\"mx-2 h-4\" />\n\t\t\t\t\t<div className=\"space-x-1 flex\">\n\t\t\t\t\t\t<Badge variant=\"blank\" className=\"rounded-sm px-1 font-normal\">\n\t\t\t\t\t\t\t{selectedLabel}\n\t\t\t\t\t\t</Badge>\n\t\t\t\t\t</div>\n\t\t\t\t</Button>\n\t\t\t</PopoverTrigger>\n\t\t\t<PopoverContent className=\"w-[200px] p-0\" align=\"start\">\n\t\t\t\t<Command>\n\t\t\t\t\t<CommandList>\n\t\t\t\t\t\t<CommandGroup>\n\t\t\t\t\t\t\t{timeRanges.map((range) => {\n\t\t\t\t\t\t\t\tconst isSelected = value === range.value;\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\tkey={range.value}\n\t\t\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\t\t\tif (!isSelected) {\n\t\t\t\t\t\t\t\t\t\t\t\tonValueChange(range.value);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\"mr-2 flex h-4 w-4 items-center rounded-sm border border-primary\",\n\t\t\t\t\t\t\t\t\t\t\t\tisSelected\n\t\t\t\t\t\t\t\t\t\t\t\t\t? \"bg-primary text-primary-foreground\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t: \"opacity-50 [&_svg]:invisible\",\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<CheckIcon className={cn(\"h-4 w-4\")} />\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm\">{range.label}</span>\n\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t</CommandList>\n\t\t\t\t</Command>\n\t\t\t\t<Separator className=\"my-2\" />\n\t\t\t\t<div className=\"p-2 flex items-center justify-between\">\n\t\t\t\t\t<span className=\"text-sm\">Show timestamps</span>\n\t\t\t\t\t<Switch checked={showTimestamp} onCheckedChange={onTimestampChange} />\n\t\t\t\t</div>\n\t\t\t</PopoverContent>\n\t\t</Popover>\n\t);\n}\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/docker/logs/status-logs-filter.tsx",
    "content": "import { CheckIcon } from \"lucide-react\";\nimport type React from \"react\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCommand,\n\tCommandGroup,\n\tCommandItem,\n\tCommandList,\n} from \"@/components/ui/command\";\nimport {\n\tPopover,\n\tPopoverContent,\n\tPopoverTrigger,\n} from \"@/components/ui/popover\";\nimport { Separator } from \"@/components/ui/separator\";\nimport { cn } from \"@/lib/utils\";\n\ninterface StatusLogsFilterProps {\n\tvalue?: string[];\n\tsetValue?: (value: string[]) => void;\n\ttitle?: string;\n\toptions: {\n\t\tlabel: string;\n\t\tvalue: string;\n\t\ticon?: React.ComponentType<{ className?: string }>;\n\t}[];\n}\n\nexport function StatusLogsFilter({\n\tvalue = [],\n\tsetValue,\n\ttitle,\n\toptions,\n}: StatusLogsFilterProps) {\n\tconst selectedValues = new Set(value as string[]);\n\tconst allSelected = selectedValues.size === 0;\n\n\tconst getSelectedBadges = () => {\n\t\tif (allSelected) {\n\t\t\treturn (\n\t\t\t\t<Badge variant=\"blank\" className=\"rounded-sm px-1 font-normal\">\n\t\t\t\t\tAll\n\t\t\t\t</Badge>\n\t\t\t);\n\t\t}\n\n\t\tif (selectedValues.size >= 1) {\n\t\t\tconst selected = options.find((opt) => selectedValues.has(opt.value));\n\t\t\treturn (\n\t\t\t\t<>\n\t\t\t\t\t<Badge\n\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\tselected?.value === \"success\"\n\t\t\t\t\t\t\t\t? \"green\"\n\t\t\t\t\t\t\t\t: selected?.value === \"error\"\n\t\t\t\t\t\t\t\t\t? \"red\"\n\t\t\t\t\t\t\t\t\t: selected?.value === \"warning\"\n\t\t\t\t\t\t\t\t\t\t? \"orange\"\n\t\t\t\t\t\t\t\t\t\t: selected?.value === \"info\"\n\t\t\t\t\t\t\t\t\t\t\t? \"blue\"\n\t\t\t\t\t\t\t\t\t\t\t: selected?.value === \"debug\"\n\t\t\t\t\t\t\t\t\t\t\t\t? \"yellow\"\n\t\t\t\t\t\t\t\t\t\t\t\t: \"blank\"\n\t\t\t\t\t\t}\n\t\t\t\t\t\tclassName=\"rounded-sm px-1 font-normal\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{selected?.label}\n\t\t\t\t\t</Badge>\n\t\t\t\t\t{selectedValues.size > 1 && (\n\t\t\t\t\t\t<Badge variant=\"blank\" className=\"rounded-sm px-1 font-normal\">\n\t\t\t\t\t\t\t+{selectedValues.size - 1}\n\t\t\t\t\t\t</Badge>\n\t\t\t\t\t)}\n\t\t\t\t</>\n\t\t\t);\n\t\t}\n\n\t\treturn null;\n\t};\n\n\treturn (\n\t\t<Popover>\n\t\t\t<PopoverTrigger asChild>\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\tclassName=\"h-9 bg-input text-sm placeholder-gray-400 w-full sm:w-auto\"\n\t\t\t\t>\n\t\t\t\t\t{title}\n\t\t\t\t\t<Separator orientation=\"vertical\" className=\"mx-2 h-4\" />\n\t\t\t\t\t<div className=\"space-x-1 flex\">{getSelectedBadges()}</div>\n\t\t\t\t</Button>\n\t\t\t</PopoverTrigger>\n\t\t\t<PopoverContent className=\"w-[200px] p-0\" align=\"start\">\n\t\t\t\t<Command>\n\t\t\t\t\t<CommandList>\n\t\t\t\t\t\t<CommandGroup>\n\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\tsetValue?.([]); // Empty array means \"All\"\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\"mr-2 flex h-4 w-4 items-center rounded-sm border border-primary\",\n\t\t\t\t\t\t\t\t\t\tallSelected\n\t\t\t\t\t\t\t\t\t\t\t? \"bg-primary text-primary-foreground\"\n\t\t\t\t\t\t\t\t\t\t\t: \"opacity-50 [&_svg]:invisible\",\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<CheckIcon className={cn(\"h-4 w-4\")} />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<Badge variant=\"blank\">All</Badge>\n\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t{options.map((option) => {\n\t\t\t\t\t\t\t\tconst isSelected = selectedValues.has(option.value);\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\tkey={option.value}\n\t\t\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\t\t\tconst newValues = new Set(selectedValues);\n\t\t\t\t\t\t\t\t\t\t\tif (isSelected) {\n\t\t\t\t\t\t\t\t\t\t\t\tnewValues.delete(option.value);\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tnewValues.add(option.value);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tsetValue?.(Array.from(newValues));\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\"mr-2 flex h-4 w-4 items-center rounded-sm border border-primary\",\n\t\t\t\t\t\t\t\t\t\t\t\tisSelected\n\t\t\t\t\t\t\t\t\t\t\t\t\t? \"bg-primary text-primary-foreground\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t: \"opacity-50 [&_svg]:invisible\",\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<CheckIcon className={cn(\"h-4 w-4\")} />\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t{option.icon && (\n\t\t\t\t\t\t\t\t\t\t\t<option.icon className=\"mr-2 h-4 w-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\t\t\t\toption.value === \"success\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t? \"green\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t: option.value === \"error\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"red\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: option.value === \"warning\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"orange\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: option.value === \"info\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"blue\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: option.value === \"debug\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"yellow\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"blank\"\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{option.label}\n\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t</CommandList>\n\t\t\t\t</Command>\n\t\t\t</PopoverContent>\n\t\t</Popover>\n\t);\n}\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/docker/logs/terminal-line.tsx",
    "content": "import { FancyAnsi } from \"fancy-ansi\";\nimport escapeRegExp from \"lodash/escapeRegExp\";\nimport { Badge } from \"@/components/ui/badge\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipPortal,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { cn } from \"@/lib/utils\";\nimport { getLogType, type LogLine } from \"./utils\";\n\ninterface LogLineProps {\n\tlog: LogLine;\n\tnoTimestamp?: boolean;\n\tsearchTerm?: string;\n}\n\nconst fancyAnsi = new FancyAnsi();\n\nexport function TerminalLine({ log, noTimestamp, searchTerm }: LogLineProps) {\n\tconst { timestamp, message, rawTimestamp } = log;\n\tconst { type, variant, color } = getLogType(message);\n\n\tconst formattedTime = timestamp\n\t\t? timestamp.toLocaleString([], {\n\t\t\t\tmonth: \"2-digit\",\n\t\t\t\tday: \"2-digit\",\n\t\t\t\thour: \"2-digit\",\n\t\t\t\tminute: \"2-digit\",\n\t\t\t\tyear: \"2-digit\",\n\t\t\t\tsecond: \"2-digit\",\n\t\t\t})\n\t\t: \"--- No time found ---\";\n\n\tconst highlightMessage = (text: string, term: string) => {\n\t\tif (!term) {\n\t\t\treturn (\n\t\t\t\t<span\n\t\t\t\t\tclassName=\"transition-colors\"\n\t\t\t\t\tdangerouslySetInnerHTML={{\n\t\t\t\t\t\t__html: fancyAnsi.toHtml(text),\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\tconst htmlContent = fancyAnsi.toHtml(text);\n\t\tconst searchRegex = new RegExp(`(${escapeRegExp(term)})`, \"gi\");\n\n\t\tconst modifiedContent = htmlContent.replace(\n\t\t\tsearchRegex,\n\t\t\t(match) =>\n\t\t\t\t`<span class=\"bg-orange-200/80 dark:bg-orange-900/80 font-bold\">${match}</span>`,\n\t\t);\n\n\t\treturn (\n\t\t\t<span\n\t\t\t\tclassName=\"transition-colors\"\n\t\t\t\tdangerouslySetInnerHTML={{ __html: modifiedContent }}\n\t\t\t/>\n\t\t);\n\t};\n\n\tconst tooltip = (color: string, timestamp: string | null) => {\n\t\tconst square = (\n\t\t\t<div className={cn(\"w-2 h-full flex-shrink-0 rounded-[3px]\", color)} />\n\t\t);\n\t\treturn timestamp ? (\n\t\t\t<TooltipProvider delayDuration={0} disableHoverableContent>\n\t\t\t\t<Tooltip>\n\t\t\t\t\t<TooltipTrigger asChild>{square}</TooltipTrigger>\n\t\t\t\t\t<TooltipPortal>\n\t\t\t\t\t\t<TooltipContent\n\t\t\t\t\t\t\tsideOffset={5}\n\t\t\t\t\t\t\tclassName=\"bg-popover border-border z-[99999]\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<p className=\"text text-xs text-muted-foreground break-all max-w-md\">\n\t\t\t\t\t\t\t\t<pre>{timestamp}</pre>\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t</TooltipPortal>\n\t\t\t\t</Tooltip>\n\t\t\t</TooltipProvider>\n\t\t) : (\n\t\t\tsquare\n\t\t);\n\t};\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t\"font-mono text-xs flex flex-row gap-3 py-2 sm:py-0.5 group\",\n\t\t\t\ttype === \"error\"\n\t\t\t\t\t? \"bg-red-500/10 hover:bg-red-500/15\"\n\t\t\t\t\t: type === \"warning\"\n\t\t\t\t\t\t? \"bg-yellow-500/10 hover:bg-yellow-500/15\"\n\t\t\t\t\t\t: type === \"debug\"\n\t\t\t\t\t\t\t? \"bg-orange-500/10 hover:bg-orange-500/15\"\n\t\t\t\t\t\t\t: \"hover:bg-gray-200/50 dark:hover:bg-gray-800/50\",\n\t\t\t)}\n\t\t>\n\t\t\t{\" \"}\n\t\t\t<div className=\"flex items-start gap-x-2\">\n\t\t\t\t{/* Icon to expand the log item maybe implement a colapsible later */}\n\t\t\t\t{/* <Square className=\"size-4 text-muted-foreground opacity-0 group-hover/logitem:opacity-100 transition-opacity\" /> */}\n\t\t\t\t{tooltip(color, rawTimestamp)}\n\t\t\t\t{!noTimestamp && (\n\t\t\t\t\t<span className=\"select-none pl-2 text-muted-foreground w-full sm:w-40 flex-shrink-0\">\n\t\t\t\t\t\t{formattedTime}\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\n\t\t\t\t<Badge\n\t\t\t\t\tvariant={variant}\n\t\t\t\t\tclassName=\"w-14 justify-center text-[10px] px-1 py-0\"\n\t\t\t\t>\n\t\t\t\t\t{type}\n\t\t\t\t</Badge>\n\t\t\t</div>\n\t\t\t<span className=\"dark:text-gray-200 font-mono text-foreground whitespace-pre-wrap break-all\">\n\t\t\t\t{highlightMessage(message, searchTerm || \"\")}\n\t\t\t</span>\n\t\t</div>\n\t);\n}\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/docker/logs/utils.ts",
    "content": "export type LogType = \"error\" | \"warning\" | \"success\" | \"info\" | \"debug\";\nexport type LogVariant = \"red\" | \"yellow\" | \"green\" | \"blue\" | \"orange\";\n\nexport interface LogLine {\n\trawTimestamp: string | null;\n\ttimestamp: Date | null;\n\tmessage: string;\n}\n\ninterface LogStyle {\n\ttype: LogType;\n\tvariant: LogVariant;\n\tcolor: string;\n}\n\nconst LOG_STYLES: Record<LogType, LogStyle> = {\n\terror: {\n\t\ttype: \"error\",\n\t\tvariant: \"red\",\n\t\tcolor: \"bg-red-500/40\",\n\t},\n\twarning: {\n\t\ttype: \"warning\",\n\t\tvariant: \"orange\",\n\t\tcolor: \"bg-orange-500/40\",\n\t},\n\tdebug: {\n\t\ttype: \"debug\",\n\t\tvariant: \"yellow\",\n\t\tcolor: \"bg-yellow-500/40\",\n\t},\n\tsuccess: {\n\t\ttype: \"success\",\n\t\tvariant: \"green\",\n\t\tcolor: \"bg-green-500/40\",\n\t},\n\tinfo: {\n\t\ttype: \"info\",\n\t\tvariant: \"blue\",\n\t\tcolor: \"bg-blue-600/40\",\n\t},\n} as const;\n\nexport function parseLogs(logString: string): LogLine[] {\n\t// Regex to match the log line format\n\t// Example of return :\n\t// 1 2024-12-10T10:00:00.000Z The server is running on port 8080\n\t// Should return :\n\t// { timestamp: new Date(\"2024-12-10T10:00:00.000Z\"),\n\t// message: \"The server is running on port 8080\" }\n\tconst logRegex =\n\t\t/^(?:(?<lineNumber>\\d+)\\s+)?(?<timestamp>(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z|\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}\\.\\d{3} UTC))?\\s*(?<message>[\\s\\S]*)$/;\n\n\treturn logString\n\t\t.split(\"\\n\")\n\t\t.map((line) => line.trim())\n\t\t.filter((line) => line !== \"\")\n\t\t.map((line) => {\n\t\t\tconst match = line.match(logRegex);\n\t\t\tif (!match) return null;\n\n\t\t\tconst { timestamp, message } = match.groups ?? {};\n\n\t\t\tif (!message?.trim()) return null;\n\n\t\t\treturn {\n\t\t\t\trawTimestamp: timestamp ?? null,\n\t\t\t\ttimestamp: timestamp ? new Date(timestamp.replace(\" UTC\", \"Z\")) : null,\n\t\t\t\tmessage: message.trim(),\n\t\t\t};\n\t\t})\n\t\t.filter((log) => log !== null);\n}\n\n// Detect log type based on message content\nexport const getLogType = (message: string): LogStyle => {\n\tconst lowerMessage = message.toLowerCase();\n\n\tif (\n\t\t/(?:^|\\s)(?:info|inf|information):?\\s/i.test(lowerMessage) ||\n\t\t/\\[(?:info|information)\\]/i.test(lowerMessage) ||\n\t\t/\\b(?:status|state|current|progress)\\b:?\\s/i.test(lowerMessage) ||\n\t\t/\\b(?:processing|executing|performing)\\b/i.test(lowerMessage)\n\t) {\n\t\treturn LOG_STYLES.info;\n\t}\n\n\tif (\n\t\t/(?:^|\\s)(?:error|err):?\\s/i.test(lowerMessage) ||\n\t\t/\\b(?:exception|failed|failure)\\b/i.test(lowerMessage) ||\n\t\t/(?:stack\\s?trace):\\s*$/i.test(lowerMessage) ||\n\t\t/^\\s*at\\s+[\\w.]+\\s*\\(?.+:\\d+:\\d+\\)?/.test(lowerMessage) ||\n\t\t/\\b(?:uncaught|unhandled)\\s+(?:exception|error)\\b/i.test(lowerMessage) ||\n\t\t/Error:\\s.*(?:in|at)\\s+.*:\\d+(?::\\d+)?/.test(lowerMessage) ||\n\t\t/\\b(?:errno|code):\\s*(?:\\d+|[A-Z_]+)\\b/i.test(lowerMessage) ||\n\t\t/\\[(?:error|err|fatal)\\]/i.test(lowerMessage) ||\n\t\t/\\b(?:crash|critical|fatal)\\b/i.test(lowerMessage) ||\n\t\t/\\b(?:fail(?:ed|ure)?|broken|dead)\\b/i.test(lowerMessage)\n\t) {\n\t\treturn LOG_STYLES.error;\n\t}\n\n\tif (\n\t\t/(?:^|\\s)(?:warning|warn):?\\s/i.test(lowerMessage) ||\n\t\t/\\[(?:warn(?:ing)?|attention)\\]/i.test(lowerMessage) ||\n\t\t/(?:deprecated|obsolete)\\s+(?:since|in|as\\s+of)/i.test(lowerMessage) ||\n\t\t/\\b(?:caution|attention|notice):\\s/i.test(lowerMessage) ||\n\t\t/(?:might|may|could)\\s+(?:not|cause|lead\\s+to)/i.test(lowerMessage) ||\n\t\t/(?:!+\\s*(?:warning|caution|attention)\\s*!+)/i.test(lowerMessage) ||\n\t\t/\\b(?:deprecated|obsolete)\\b/i.test(lowerMessage) ||\n\t\t/\\b(?:unstable|experimental)\\b/i.test(lowerMessage) ||\n\t\t/⚠|⚠️/i.test(lowerMessage)\n\t) {\n\t\treturn LOG_STYLES.warning;\n\t}\n\n\tif (\n\t\t/(?:successfully|complete[d]?)\\s+(?:initialized|started|completed|created|done|deployed)/i.test(\n\t\t\tlowerMessage,\n\t\t) ||\n\t\t/\\[(?:success|ok|done)\\]/i.test(lowerMessage) ||\n\t\t/(?:listening|running)\\s+(?:on|at)\\s+(?:port\\s+)?\\d+/i.test(lowerMessage) ||\n\t\t/(?:connected|established|ready)\\s+(?:to|for|on)/i.test(lowerMessage) ||\n\t\t/\\b(?:loaded|mounted|initialized)\\s+successfully\\b/i.test(lowerMessage) ||\n\t\t/✓|√|✅|\\[ok\\]|done!/i.test(lowerMessage) ||\n\t\t/\\b(?:success(?:ful)?|completed|ready)\\b/i.test(lowerMessage) ||\n\t\t/\\b(?:started|starting|active)\\b/i.test(lowerMessage)\n\t) {\n\t\treturn LOG_STYLES.success;\n\t}\n\n\tif (\n\t\t/(?:^|\\s)(?:info|inf):?\\s/i.test(lowerMessage) ||\n\t\t/\\[(info|log|debug|trace|server|db|api|http|request|response)\\]/i.test(\n\t\t\tlowerMessage,\n\t\t) ||\n\t\t/\\b(?:version|config|import|load|get|HTTP|PATCH|POST|debug)\\b:?/i.test(\n\t\t\tlowerMessage,\n\t\t)\n\t) {\n\t\treturn LOG_STYLES.debug;\n\t}\n\n\treturn LOG_STYLES.info;\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/docker/show/colums.tsx",
    "content": "import type { ColumnDef } from \"@tanstack/react-table\";\nimport { ArrowUpDown, MoreHorizontal } from \"lucide-react\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDropdownMenu,\n\tDropdownMenuContent,\n\tDropdownMenuLabel,\n\tDropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\nimport { ShowContainerConfig } from \"../config/show-container-config\";\nimport { ShowDockerModalLogs } from \"../logs/show-docker-modal-logs\";\nimport { DockerTerminalModal } from \"../terminal/docker-terminal-modal\";\nimport type { Container } from \"./show-containers\";\n\nexport const columns: ColumnDef<Container>[] = [\n\t{\n\t\taccessorKey: \"name\",\n\t\theader: ({ column }) => {\n\t\t\treturn (\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\tonClick={() => column.toggleSorting(column.getIsSorted() === \"asc\")}\n\t\t\t\t>\n\t\t\t\t\tName\n\t\t\t\t\t<ArrowUpDown className=\"ml-2 h-4 w-4\" />\n\t\t\t\t</Button>\n\t\t\t);\n\t\t},\n\t\tcell: ({ row }) => {\n\t\t\treturn <div>{row.getValue(\"name\")}</div>;\n\t\t},\n\t},\n\t{\n\t\taccessorKey: \"state\",\n\t\theader: ({ column }) => {\n\t\t\treturn (\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\tonClick={() => column.toggleSorting(column.getIsSorted() === \"asc\")}\n\t\t\t\t>\n\t\t\t\t\tState\n\t\t\t\t\t<ArrowUpDown className=\"ml-2 h-4 w-4\" />\n\t\t\t\t</Button>\n\t\t\t);\n\t\t},\n\t\tcell: ({ row }) => {\n\t\t\tconst value = row.getValue(\"state\") as string;\n\t\t\treturn (\n\t\t\t\t<div className=\"capitalize\">\n\t\t\t\t\t<Badge\n\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\tvalue === \"running\"\n\t\t\t\t\t\t\t\t? \"default\"\n\t\t\t\t\t\t\t\t: value === \"failed\"\n\t\t\t\t\t\t\t\t\t? \"destructive\"\n\t\t\t\t\t\t\t\t\t: \"secondary\"\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t{value}\n\t\t\t\t\t</Badge>\n\t\t\t\t</div>\n\t\t\t);\n\t\t},\n\t},\n\t{\n\t\taccessorKey: \"status\",\n\t\theader: ({ column }) => {\n\t\t\treturn (\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\tonClick={() => column.toggleSorting(column.getIsSorted() === \"asc\")}\n\t\t\t\t>\n\t\t\t\t\tStatus\n\t\t\t\t\t<ArrowUpDown className=\"ml-2 h-4 w-4\" />\n\t\t\t\t</Button>\n\t\t\t);\n\t\t},\n\t\tcell: ({ row }) => {\n\t\t\treturn <div className=\"capitalize\">{row.getValue(\"status\")}</div>;\n\t\t},\n\t},\n\t{\n\t\taccessorKey: \"image\",\n\t\theader: ({ column }) => {\n\t\t\treturn (\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\tonClick={() => column.toggleSorting(column.getIsSorted() === \"asc\")}\n\t\t\t\t>\n\t\t\t\t\tImage\n\t\t\t\t\t<ArrowUpDown className=\"ml-2 h-4 w-4\" />\n\t\t\t\t</Button>\n\t\t\t);\n\t\t},\n\t\tcell: ({ row }) => <div className=\"lowercase\">{row.getValue(\"image\")}</div>,\n\t},\n\t{\n\t\tid: \"actions\",\n\t\tenableHiding: false,\n\t\tcell: ({ row }) => {\n\t\t\tconst container = row.original;\n\n\t\t\treturn (\n\t\t\t\t<DropdownMenu>\n\t\t\t\t\t<DropdownMenuTrigger asChild>\n\t\t\t\t\t\t<Button variant=\"ghost\" className=\"h-8 w-8 p-0\">\n\t\t\t\t\t\t\t<span className=\"sr-only\">Open menu</span>\n\t\t\t\t\t\t\t<MoreHorizontal className=\"h-4 w-4\" />\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</DropdownMenuTrigger>\n\t\t\t\t\t<DropdownMenuContent align=\"end\">\n\t\t\t\t\t\t<DropdownMenuLabel>Actions</DropdownMenuLabel>\n\t\t\t\t\t\t<ShowDockerModalLogs\n\t\t\t\t\t\t\tcontainerId={container.containerId}\n\t\t\t\t\t\t\tserverId={container.serverId}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tView Logs\n\t\t\t\t\t\t</ShowDockerModalLogs>\n\t\t\t\t\t\t<ShowContainerConfig\n\t\t\t\t\t\t\tcontainerId={container.containerId}\n\t\t\t\t\t\t\tserverId={container.serverId || \"\"}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<DockerTerminalModal\n\t\t\t\t\t\t\tcontainerId={container.containerId}\n\t\t\t\t\t\t\tserverId={container.serverId || \"\"}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tTerminal\n\t\t\t\t\t\t</DockerTerminalModal>\n\t\t\t\t\t</DropdownMenuContent>\n\t\t\t\t</DropdownMenu>\n\t\t\t);\n\t\t},\n\t},\n];\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/docker/show/show-containers.tsx",
    "content": "import {\n\ttype ColumnFiltersState,\n\tflexRender,\n\tgetCoreRowModel,\n\tgetFilteredRowModel,\n\tgetPaginationRowModel,\n\tgetSortedRowModel,\n\ttype SortingState,\n\tuseReactTable,\n\ttype VisibilityState,\n} from \"@tanstack/react-table\";\nimport { ChevronDown, Container } from \"lucide-react\";\nimport * as React from \"react\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\tDropdownMenu,\n\tDropdownMenuCheckboxItem,\n\tDropdownMenuContent,\n\tDropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\nimport { Input } from \"@/components/ui/input\";\nimport {\n\tTable,\n\tTableBody,\n\tTableCell,\n\tTableHead,\n\tTableHeader,\n\tTableRow,\n} from \"@/components/ui/table\";\nimport { api, type RouterOutputs } from \"@/utils/api\";\nimport { columns } from \"./colums\";\nexport type Container = NonNullable<\n\tRouterOutputs[\"docker\"][\"getContainers\"]\n>[0];\n\ninterface Props {\n\tserverId?: string;\n}\n\nexport const ShowContainers = ({ serverId }: Props) => {\n\tconst { data, isPending } = api.docker.getContainers.useQuery({\n\t\tserverId,\n\t});\n\n\tconst [sorting, setSorting] = React.useState<SortingState>([]);\n\tconst [columnFilters, setColumnFilters] = React.useState<ColumnFiltersState>(\n\t\t[],\n\t);\n\tconst [columnVisibility, setColumnVisibility] =\n\t\tReact.useState<VisibilityState>({});\n\tconst [rowSelection, setRowSelection] = React.useState({});\n\n\tconst table = useReactTable({\n\t\tdata: data ?? [],\n\t\tcolumns,\n\t\tonSortingChange: setSorting,\n\t\tonColumnFiltersChange: setColumnFilters,\n\t\tgetCoreRowModel: getCoreRowModel(),\n\t\tgetPaginationRowModel: getPaginationRowModel(),\n\t\tgetSortedRowModel: getSortedRowModel(),\n\t\tgetFilteredRowModel: getFilteredRowModel(),\n\t\tonColumnVisibilityChange: setColumnVisibility,\n\t\tonRowSelectionChange: setRowSelection,\n\t\tstate: {\n\t\t\tsorting,\n\t\t\tcolumnFilters,\n\t\t\tcolumnVisibility,\n\t\t\trowSelection,\n\t\t},\n\t});\n\n\treturn (\n\t\t<div className=\"w-full\">\n\t\t\t<Card className=\"h-full bg-sidebar p-2.5 rounded-xl\">\n\t\t\t\t<div className=\"rounded-xl bg-background shadow-md \">\n\t\t\t\t\t<CardHeader className=\"\">\n\t\t\t\t\t\t<CardTitle className=\"text-xl flex flex-row gap-2\">\n\t\t\t\t\t\t\t<Container className=\"size-6 text-muted-foreground self-center\" />\n\t\t\t\t\t\t\tDocker Containers\n\t\t\t\t\t\t</CardTitle>\n\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\tSee all the containers of your dokploy server\n\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<CardContent className=\"space-y-2 py-8 border-t\">\n\t\t\t\t\t\t<div className=\"gap-4 pb-20 w-full\">\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-4  w-full overflow-auto\">\n\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2 max-sm:flex-wrap\">\n\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\tplaceholder=\"Filter by name...\"\n\t\t\t\t\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t\t\t\t\t(table.getColumn(\"name\")?.getFilterValue() as string) ??\n\t\t\t\t\t\t\t\t\t\t\t\"\"\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tonChange={(event) =>\n\t\t\t\t\t\t\t\t\t\t\ttable\n\t\t\t\t\t\t\t\t\t\t\t\t.getColumn(\"name\")\n\t\t\t\t\t\t\t\t\t\t\t\t?.setFilterValue(event.target.value)\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tclassName=\"md:max-w-sm\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<DropdownMenu>\n\t\t\t\t\t\t\t\t\t\t<DropdownMenuTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"sm:ml-auto max-sm:w-full\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\tColumns <ChevronDown className=\"ml-2 h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t</DropdownMenuTrigger>\n\t\t\t\t\t\t\t\t\t\t<DropdownMenuContent align=\"end\">\n\t\t\t\t\t\t\t\t\t\t\t{table\n\t\t\t\t\t\t\t\t\t\t\t\t.getAllColumns()\n\t\t\t\t\t\t\t\t\t\t\t\t.filter((column) => column.getCanHide())\n\t\t\t\t\t\t\t\t\t\t\t\t.map((column) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DropdownMenuCheckboxItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={column.id}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"capitalize\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tchecked={column.getIsVisible()}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={(value) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolumn.toggleVisibility(!!value)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{column.id}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DropdownMenuCheckboxItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t\t</DropdownMenuContent>\n\t\t\t\t\t\t\t\t\t</DropdownMenu>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div className=\"rounded-md border\">\n\t\t\t\t\t\t\t\t\t{isPending ? (\n\t\t\t\t\t\t\t\t\t\t<div className=\"w-full flex-col gap-2 flex items-center justify-center h-[55vh]\">\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground text-lg font-medium\">\n\t\t\t\t\t\t\t\t\t\t\t\tLoading...\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t) : data?.length === 0 ? (\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex-col gap-2 flex items-center justify-center h-[55vh]\">\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground text-lg font-medium\">\n\t\t\t\t\t\t\t\t\t\t\t\tNo results.\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t<Table>\n\t\t\t\t\t\t\t\t\t\t\t<TableHeader>\n\t\t\t\t\t\t\t\t\t\t\t\t{table.getHeaderGroups().map((headerGroup) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TableRow key={headerGroup.id}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{headerGroup.headers.map((header) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TableHead key={header.id}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{header.isPlaceholder\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? null\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: flexRender(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\theader.column.columnDef.header,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\theader.getContext(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TableHead>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t</TableHeader>\n\t\t\t\t\t\t\t\t\t\t\t<TableBody>\n\t\t\t\t\t\t\t\t\t\t\t\t{table?.getRowModel()?.rows?.length ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\ttable.getRowModel().rows.map((row) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TableRow\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={row.id}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdata-state={row.getIsSelected() && \"selected\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{row.getVisibleCells().map((cell) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TableCell key={cell.id}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{flexRender(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcell.column.columnDef.cell,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcell.getContext(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t\t\t\t\t\t\t\t))\n\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TableRow>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TableCell\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolSpan={columns.length}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-24 text-center\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{isPending ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"w-full flex-col gap-2 flex items-center justify-center h-[55vh]\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground text-lg font-medium\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLoading...\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<>No results.</>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t</TableBody>\n\t\t\t\t\t\t\t\t\t\t</Table>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t{data && data?.length > 0 && (\n\t\t\t\t\t\t\t\t\t<div className=\"flex items-center justify-end space-x-2 py-4\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"space-x-2 flex flex-wrap\">\n\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => table.previousPage()}\n\t\t\t\t\t\t\t\t\t\t\t\tdisabled={!table.getCanPreviousPage()}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\tPrevious\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => table.nextPage()}\n\t\t\t\t\t\t\t\t\t\t\t\tdisabled={!table.getCanNextPage()}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\tNext\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</CardContent>\n\t\t\t\t</div>\n\t\t\t</Card>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/docker/terminal/docker-terminal-modal.tsx",
    "content": "import dynamic from \"next/dynamic\";\nimport { useState } from \"react\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport { DropdownMenuItem } from \"@/components/ui/dropdown-menu\";\n\nconst Terminal = dynamic(\n\t() => import(\"./docker-terminal\").then((e) => e.DockerTerminal),\n\t{\n\t\tssr: false,\n\t},\n);\n\ninterface Props {\n\tcontainerId: string;\n\tserverId?: string;\n\tchildren?: React.ReactNode;\n}\n\nexport const DockerTerminalModal = ({\n\tchildren,\n\tcontainerId,\n\tserverId,\n}: Props) => {\n\tconst [mainDialogOpen, setMainDialogOpen] = useState(false);\n\tconst [confirmDialogOpen, setConfirmDialogOpen] = useState(false);\n\n\tconst handleMainDialogOpenChange = (open: boolean) => {\n\t\tif (!open) {\n\t\t\tsetConfirmDialogOpen(true);\n\t\t} else {\n\t\t\tsetMainDialogOpen(true);\n\t\t}\n\t};\n\n\tconst handleConfirm = () => {\n\t\tsetConfirmDialogOpen(false);\n\t\tsetMainDialogOpen(false);\n\t};\n\n\tconst handleCancel = () => {\n\t\tsetConfirmDialogOpen(false);\n\t};\n\treturn (\n\t\t<Dialog open={mainDialogOpen} onOpenChange={handleMainDialogOpenChange}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t<DropdownMenuItem\n\t\t\t\t\tclassName=\"w-full cursor-pointer space-x-3\"\n\t\t\t\t\tonSelect={(e) => e.preventDefault()}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</DropdownMenuItem>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent\n\t\t\t\tclassName=\"sm:max-w-7xl\"\n\t\t\t\tonEscapeKeyDown={(event) => event.preventDefault()}\n\t\t\t>\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Docker Terminal</DialogTitle>\n\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\tEasy way to access to docker container\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\n\t\t\t\t<Terminal\n\t\t\t\t\tid=\"terminal\"\n\t\t\t\t\tcontainerId={containerId}\n\t\t\t\t\tserverId={serverId || \"\"}\n\t\t\t\t/>\n\t\t\t\t<Dialog open={confirmDialogOpen} onOpenChange={setConfirmDialogOpen}>\n\t\t\t\t\t<DialogContent onEscapeKeyDown={(event) => event.preventDefault()}>\n\t\t\t\t\t\t<DialogHeader>\n\t\t\t\t\t\t\t<DialogTitle>\n\t\t\t\t\t\t\t\tAre you sure you want to close the terminal?\n\t\t\t\t\t\t\t</DialogTitle>\n\t\t\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\t\t\tBy clicking the confirm button, the terminal will be closed.\n\t\t\t\t\t\t\t</DialogDescription>\n\t\t\t\t\t\t</DialogHeader>\n\t\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t\t<Button variant=\"outline\" onClick={handleCancel}>\n\t\t\t\t\t\t\t\tCancel\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t<Button onClick={handleConfirm}>Confirm</Button>\n\t\t\t\t\t\t</DialogFooter>\n\t\t\t\t\t</DialogContent>\n\t\t\t\t</Dialog>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/docker/terminal/docker-terminal.tsx",
    "content": "import { Terminal } from \"@xterm/xterm\";\nimport React, { useEffect, useRef } from \"react\";\nimport { FitAddon } from \"xterm-addon-fit\";\nimport \"@xterm/xterm/css/xterm.css\";\nimport { AttachAddon } from \"@xterm/addon-attach\";\nimport { useTheme } from \"next-themes\";\nimport { Tabs, TabsList, TabsTrigger } from \"@/components/ui/tabs\";\n\ninterface Props {\n\tid: string;\n\tcontainerId?: string;\n\tserverId?: string;\n}\n\nexport const DockerTerminal: React.FC<Props> = ({\n\tid,\n\tcontainerId,\n\tserverId,\n}) => {\n\tconst termRef = useRef(null);\n\tconst [activeWay, setActiveWay] = React.useState<string | undefined>(\"bash\");\n\tconst { resolvedTheme } = useTheme();\n\tuseEffect(() => {\n\t\tconst container = document.getElementById(id);\n\t\tif (container) {\n\t\t\tcontainer.innerHTML = \"\";\n\t\t}\n\t\tconst term = new Terminal({\n\t\t\tcursorBlink: true,\n\t\t\tlineHeight: 1.4,\n\t\t\tconvertEol: true,\n\t\t\ttheme: {\n\t\t\t\tcursor: resolvedTheme === \"light\" ? \"#000000\" : \"transparent\",\n\t\t\t\tbackground: \"rgba(0, 0, 0, 0)\",\n\t\t\t\tforeground: \"currentColor\",\n\t\t\t},\n\t\t});\n\t\tconst addonFit = new FitAddon();\n\t\tconst protocol = window.location.protocol === \"https:\" ? \"wss:\" : \"ws:\";\n\n\t\tconst wsUrl = `${protocol}//${window.location.host}/docker-container-terminal?containerId=${containerId}&activeWay=${activeWay}${serverId ? `&serverId=${serverId}` : \"\"}`;\n\n\t\tconst ws = new WebSocket(wsUrl);\n\n\t\tconst addonAttach = new AttachAddon(ws);\n\t\t// @ts-ignore\n\t\tterm.open(termRef.current);\n\t\t// @ts-ignore\n\t\tterm.loadAddon(addonFit);\n\t\tterm.loadAddon(addonAttach);\n\t\taddonFit.fit();\n\t\treturn () => {\n\t\t\tws.readyState === WebSocket.OPEN && ws.close();\n\t\t};\n\t}, [containerId, activeWay, id]);\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<div className=\"flex flex-col gap-2  mt-4\">\n\t\t\t\t<span>\n\t\t\t\t\tSelect way to connect to <b>{containerId}</b>\n\t\t\t\t</span>\n\t\t\t\t<Tabs value={activeWay} onValueChange={setActiveWay}>\n\t\t\t\t\t<TabsList>\n\t\t\t\t\t\t<TabsTrigger value=\"bash\">Bash</TabsTrigger>\n\t\t\t\t\t\t<TabsTrigger value=\"sh\">/bin/sh</TabsTrigger>\n\t\t\t\t\t</TabsList>\n\t\t\t\t</Tabs>\n\t\t\t</div>\n\t\t\t<div className=\"w-full h-full rounded-lg p-2 bg-transparent border\">\n\t\t\t\t<div id={id} ref={termRef} />\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/file-system/show-traefik-file.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { Loader2 } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { CodeEditor } from \"@/components/shared/code-editor\";\nimport { Button } from \"@/components/ui/button\";\nimport { Checkbox } from \"@/components/ui/checkbox\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Label } from \"@/components/ui/label\";\nimport { api } from \"@/utils/api\";\nimport { validateAndFormatYAML } from \"../application/advanced/traefik/update-traefik-config\";\n\nconst UpdateServerMiddlewareConfigSchema = z.object({\n\ttraefikConfig: z.string(),\n});\n\ntype UpdateServerMiddlewareConfig = z.infer<\n\ttypeof UpdateServerMiddlewareConfigSchema\n>;\n\ninterface Props {\n\tpath: string;\n\tserverId?: string;\n}\n\nexport const ShowTraefikFile = ({ path, serverId }: Props) => {\n\tconst {\n\t\tdata,\n\t\trefetch,\n\t\tisLoading: isLoadingFile,\n\t} = api.settings.readTraefikFile.useQuery(\n\t\t{\n\t\t\tpath,\n\t\t\tserverId,\n\t\t},\n\t\t{\n\t\t\tenabled: !!path,\n\t\t},\n\t);\n\tconst [canEdit, setCanEdit] = useState(true);\n\tconst [skipYamlValidation, setSkipYamlValidation] = useState(false);\n\n\tconst { mutateAsync, isPending, error, isError } =\n\t\tapi.settings.updateTraefikFile.useMutation();\n\n\tconst form = useForm<UpdateServerMiddlewareConfig>({\n\t\tdefaultValues: {\n\t\t\ttraefikConfig: \"\",\n\t\t},\n\t\tdisabled: canEdit,\n\t\tresolver: zodResolver(UpdateServerMiddlewareConfigSchema),\n\t});\n\n\tuseEffect(() => {\n\t\tform.reset({\n\t\t\ttraefikConfig: data || \"\",\n\t\t});\n\t}, [form, form.reset, data]);\n\n\tconst onSubmit = async (data: UpdateServerMiddlewareConfig) => {\n\t\tif (!skipYamlValidation) {\n\t\t\tconst { valid, error } = validateAndFormatYAML(data.traefikConfig);\n\t\t\tif (!valid) {\n\t\t\t\tform.setError(\"traefikConfig\", {\n\t\t\t\t\ttype: \"manual\",\n\t\t\t\t\tmessage: error || \"Invalid YAML\",\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tform.clearErrors(\"traefikConfig\");\n\t\tawait mutateAsync({\n\t\t\ttraefikConfig: data.traefikConfig,\n\t\t\tpath,\n\t\t\tserverId,\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(\"Traefik config Updated\");\n\t\t\t\trefetch();\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error updating the Traefik config\");\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<div>\n\t\t\t{isError && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\t\t\t<Form {...form}>\n\t\t\t\t<form\n\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\tclassName=\"w-full relative z-[5]\"\n\t\t\t\t>\n\t\t\t\t\t<div className=\"flex flex-col overflow-auto\">\n\t\t\t\t\t\t{isLoadingFile ? (\n\t\t\t\t\t\t\t<div className=\"w-full flex-col gap-2 flex items-center justify-center h-[55vh]\">\n\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground text-lg font-medium\">\n\t\t\t\t\t\t\t\t\tLoading...\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<Loader2 className=\"animate-spin size-8 text-muted-foreground\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"traefikConfig\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem className=\"relative\">\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Traefik config</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormDescription className=\"break-all\">\n\t\t\t\t\t\t\t\t\t\t\t{path}\n\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<CodeEditor\n\t\t\t\t\t\t\t\t\t\t\t\tlineWrapping\n\t\t\t\t\t\t\t\t\t\t\t\twrapperClassName=\"h-[35rem] font-mono\"\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder={`http:\nrouters:\n    router-name:\n        rule: Host('domain.com')\n        service: container-name\n        entryPoints:\n            - web\n        tls: false\n        middlewares: []\n                                                    `}\n\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t<pre>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</pre>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex justify-end absolute z-50 right-6 top-8\">\n\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"shadow-sm\"\n\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetCanEdit(!canEdit);\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{canEdit ? \"Unlock\" : \"Lock\"}\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t<div className=\"flex items-center space-x-2\">\n\t\t\t\t\t\t\t<Checkbox\n\t\t\t\t\t\t\t\tid=\"skip-yaml-validation\"\n\t\t\t\t\t\t\t\tchecked={skipYamlValidation}\n\t\t\t\t\t\t\t\tonCheckedChange={(checked) =>\n\t\t\t\t\t\t\t\t\tsetSkipYamlValidation(checked === true)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Label\n\t\t\t\t\t\t\t\thtmlFor=\"skip-yaml-validation\"\n\t\t\t\t\t\t\t\tclassName=\"text-sm font-normal cursor-pointer\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tSkip YAML validation (for Go templating)\n\t\t\t\t\t\t\t</Label>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground -mt-2\">\n\t\t\t\t\t\t\tTraefik supports Go templating in dynamic configs (e.g.{\" \"}\n\t\t\t\t\t\t\t<code className=\"text-xs\">{\"{{range}}\"}</code>). Configs using\n\t\t\t\t\t\t\ttemplates will fail standard YAML validation. Check this to save\n\t\t\t\t\t\t\twithout validation.\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<div className=\"flex justify-end\">\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tisLoading={isPending}\n\t\t\t\t\t\t\t\tdisabled={canEdit || isLoadingFile}\n\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tUpdate\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</form>\n\t\t\t</Form>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/file-system/show-traefik-system.tsx",
    "content": "import { FileIcon, Folder, Loader2, Workflow } from \"lucide-react\";\nimport React from \"react\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport { Tree } from \"@/components/ui/file-tree\";\nimport { api } from \"@/utils/api\";\nimport { ShowTraefikFile } from \"./show-traefik-file\";\n\ninterface Props {\n\tserverId?: string;\n}\nexport const ShowTraefikSystem = ({ serverId }: Props) => {\n\tconst [file, setFile] = React.useState<null | string>(null);\n\n\tconst {\n\t\tdata: directories,\n\t\tisLoading,\n\t\terror,\n\t\tisError,\n\t} = api.settings.readDirectories.useQuery(\n\t\t{\n\t\t\tserverId,\n\t\t},\n\t\t{\n\t\t\tretry: 2,\n\t\t},\n\t);\n\n\treturn (\n\t\t<div className=\"w-full\">\n\t\t\t<Card className=\"h-full bg-sidebar p-2.5 rounded-xl\">\n\t\t\t\t<div className=\"rounded-xl bg-background shadow-md \">\n\t\t\t\t\t<CardHeader className=\"\">\n\t\t\t\t\t\t<CardTitle className=\"text-xl flex flex-row gap-2\">\n\t\t\t\t\t\t\t<FileIcon className=\"size-6 text-muted-foreground self-center\" />\n\t\t\t\t\t\t\tTraefik File System\n\t\t\t\t\t\t</CardTitle>\n\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\tManage all the files and directories in {\"'/etc/dokploy/traefik'\"}\n\t\t\t\t\t\t\t.\n\t\t\t\t\t\t</CardDescription>\n\n\t\t\t\t\t\t<AlertBlock type=\"warning\">\n\t\t\t\t\t\t\tAdding invalid configuration to existing files, can break your\n\t\t\t\t\t\t\tTraefik instance, preventing access to your applications.\n\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<CardContent className=\"space-y-2 py-8 border-t\">\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<div className=\"flex flex-col lg:flex-row gap-4 md:gap-10 w-full\">\n\t\t\t\t\t\t\t\t{isError && (\n\t\t\t\t\t\t\t\t\t<AlertBlock type=\"error\" className=\"w-full\">\n\t\t\t\t\t\t\t\t\t\t{error?.message}\n\t\t\t\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{isLoading && (\n\t\t\t\t\t\t\t\t\t<div className=\"w-full flex-col gap-2 flex items-center justify-center h-[55vh]\">\n\t\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground text-lg font-medium\">\n\t\t\t\t\t\t\t\t\t\t\tLoading...\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t<Loader2 className=\"animate-spin size-8 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{directories?.length === 0 && (\n\t\t\t\t\t\t\t\t\t<div className=\"w-full flex-col gap-2 flex items-center justify-center h-[55vh]\">\n\t\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground text-lg font-medium\">\n\t\t\t\t\t\t\t\t\t\t\tNo directories or files detected in{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t{\"'/etc/dokploy/traefik'\"}\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t<Folder className=\"size-8 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{directories && directories?.length > 0 && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<Tree\n\t\t\t\t\t\t\t\t\t\t\tdata={directories}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"lg:max-w-[19rem] w-full lg:h-[660px] border rounded-lg\"\n\t\t\t\t\t\t\t\t\t\t\tonSelectChange={(item) => setFile(item?.id || null)}\n\t\t\t\t\t\t\t\t\t\t\tfolderIcon={Folder}\n\t\t\t\t\t\t\t\t\t\t\titemIcon={Workflow}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<div className=\"w-full\">\n\t\t\t\t\t\t\t\t\t\t\t{file ? (\n\t\t\t\t\t\t\t\t\t\t\t\t<ShowTraefikFile path={file} serverId={serverId} />\n\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"h-full w-full flex-col gap-2 flex items-center justify-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground text-lg font-medium\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tNo file selected\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FileIcon className=\"size-8 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</CardContent>\n\t\t\t\t</div>\n\t\t\t</Card>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/impersonation/impersonation-bar.tsx",
    "content": "\"use client\";\n\nimport copy from \"copy-to-clipboard\";\nimport { format } from \"date-fns\";\nimport {\n\tBuilding2,\n\tCalendar,\n\tCheckIcon,\n\tChevronsUpDown,\n\tCopy,\n\tCreditCard,\n\tFingerprint,\n\tKey,\n\tServer,\n\tSettings2,\n\tShield,\n\tUserIcon,\n\tXIcon,\n} from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { toast } from \"sonner\";\nimport { Logo } from \"@/components/shared/logo\";\nimport { Avatar, AvatarFallback, AvatarImage } from \"@/components/ui/avatar\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCommand,\n\tCommandEmpty,\n\tCommandGroup,\n\tCommandInput,\n\tCommandItem,\n\tCommandList,\n} from \"@/components/ui/command\";\nimport {\n\tPopover,\n\tPopoverContent,\n\tPopoverTrigger,\n} from \"@/components/ui/popover\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { authClient } from \"@/lib/auth-client\";\nimport { cn } from \"@/lib/utils\";\nimport { api } from \"@/utils/api\";\nimport { useWhitelabeling } from \"@/utils/hooks/use-whitelabeling\";\n\ntype User = typeof authClient.$Infer.Session.user;\n\nexport const ImpersonationBar = () => {\n\tconst { config: whitelabeling } = useWhitelabeling();\n\tconst [users, setUsers] = useState<User[]>([]);\n\tconst [selectedUser, setSelectedUser] = useState<User | null>(null);\n\tconst [isImpersonating, setIsImpersonating] = useState(false);\n\tconst [open, setOpen] = useState(false);\n\tconst [isLoading, setIsLoading] = useState(false);\n\tconst [showBar, setShowBar] = useState(false);\n\tconst { data } = api.user.get.useQuery();\n\n\tconst fetchUsers = async (search?: string) => {\n\t\ttry {\n\t\t\tconst session = await authClient.getSession();\n\t\t\tif (session?.data?.session?.impersonatedBy) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsetIsLoading(true);\n\t\t\tconst response = await authClient.admin.listUsers({\n\t\t\t\tquery: {\n\t\t\t\t\tlimit: 30,\n\t\t\t\t\t...(search && {\n\t\t\t\t\t\tsearchField: \"email\",\n\t\t\t\t\t\tsearchOperator: \"contains\",\n\t\t\t\t\t\tsearchValue: search,\n\t\t\t\t\t}),\n\t\t\t\t},\n\t\t\t});\n\n\t\t\tconst filteredUsers = response.data?.users.filter(\n\t\t\t\t// @ts-ignore\n\t\t\t\t(user) => user.allowImpersonation && data?.user?.email !== user.email,\n\t\t\t);\n\n\t\t\tif (!response.error) {\n\t\t\t\t// @ts-ignore\n\t\t\t\tsetUsers(filteredUsers || []);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tconsole.error(\"Error fetching users:\", error);\n\t\t\ttoast.error(\"Error loading users\");\n\t\t} finally {\n\t\t\tsetIsLoading(false);\n\t\t}\n\t};\n\n\tconst handleImpersonate = async () => {\n\t\tif (!selectedUser) return;\n\n\t\ttry {\n\t\t\tawait authClient.admin.impersonateUser({\n\t\t\t\tuserId: selectedUser.id,\n\t\t\t});\n\t\t\tsetIsImpersonating(true);\n\t\t\tsetOpen(false);\n\n\t\t\ttoast.success(\"Successfully impersonating user\", {\n\t\t\t\tdescription: `You are now viewing as ${`${selectedUser.name} ${selectedUser.lastName}`.trim() || selectedUser.email}`,\n\t\t\t});\n\t\t\twindow.location.reload();\n\t\t} catch (error) {\n\t\t\tconsole.error(\"Error impersonating user:\", error);\n\t\t\ttoast.error(\"Error impersonating user\");\n\t\t}\n\t};\n\n\tconst handleStopImpersonating = async () => {\n\t\ttry {\n\t\t\tawait authClient.admin.stopImpersonating();\n\t\t\tsetIsImpersonating(false);\n\t\t\tsetSelectedUser(null);\n\t\t\tsetShowBar(false);\n\t\t\ttoast.success(\"Stopped impersonating user\");\n\t\t\twindow.location.reload();\n\t\t} catch (error) {\n\t\t\tconsole.error(\"Error stopping impersonation:\", error);\n\t\t\ttoast.error(\"Error stopping impersonation\");\n\t\t}\n\t};\n\n\tuseEffect(() => {\n\t\tconst checkImpersonation = async () => {\n\t\t\ttry {\n\t\t\t\tconst session = await authClient.getSession();\n\t\t\t\tif (session?.data?.session?.impersonatedBy) {\n\t\t\t\t\tsetIsImpersonating(true);\n\t\t\t\t\tsetShowBar(true);\n\t\t\t\t\t// setSelectedUser(data);\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(\"Error checking impersonation status:\", error);\n\t\t\t}\n\t\t};\n\n\t\tcheckImpersonation();\n\t\tfetchUsers();\n\t}, []);\n\n\treturn (\n\t\t<TooltipProvider>\n\t\t\t<>\n\t\t\t\t<Tooltip>\n\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\"fixed bottom-4 right-4 z-50 rounded-full shadow-lg\",\n\t\t\t\t\t\t\t\tisImpersonating &&\n\t\t\t\t\t\t\t\t\t!showBar &&\n\t\t\t\t\t\t\t\t\t\"bg-red-100 hover:bg-red-200 border-red-200\",\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\tonClick={() => setShowBar(!showBar)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Settings2\n\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\"h-4 w-4\",\n\t\t\t\t\t\t\t\t\tisImpersonating && !showBar && \"text-red-500\",\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t{isImpersonating ? \"Impersonation Controls\" : \"User Impersonation\"}\n\t\t\t\t\t</TooltipContent>\n\t\t\t\t</Tooltip>\n\n\t\t\t\t<div\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\"fixed bottom-0 left-0 right-0 bg-background border-t border-border p-4 flex items-center justify-center gap-4 z-40 transition-all duration-200 ease-in-out\",\n\t\t\t\t\t\tshowBar ? \"translate-y-0\" : \"translate-y-full\",\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t<div className=\"flex items-center gap-4 px-4 md:px-20 w-full\">\n\t\t\t\t\t\t<Logo\n\t\t\t\t\t\t\tclassName=\"w-10 h-10\"\n\t\t\t\t\t\t\tlogoUrl={whitelabeling?.logoUrl || undefined}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{!isImpersonating ? (\n\t\t\t\t\t\t\t<div className=\"flex items-center gap-2 w-full\">\n\t\t\t\t\t\t\t\t<Popover open={open} onOpenChange={setOpen}>\n\t\t\t\t\t\t\t\t\t<PopoverTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\taria-expanded={open}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-[300px] justify-between\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{selectedUser ? (\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<UserIcon className=\"mr-2 h-4 w-4 flex-shrink-0\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"truncate flex flex-col items-start\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm font-medium\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{`${selectedUser.name} ${selectedUser.lastName}`.trim() ||\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-xs text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{selectedUser.email}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<UserIcon className=\"mr-2 h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span>Select user to impersonate</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t<ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t</PopoverTrigger>\n\t\t\t\t\t\t\t\t\t<PopoverContent className=\"w-[300px] p-0\" align=\"start\">\n\t\t\t\t\t\t\t\t\t\t<Command>\n\t\t\t\t\t\t\t\t\t\t\t<CommandInput\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Search users by email or name...\"\n\t\t\t\t\t\t\t\t\t\t\t\tonValueChange={(search) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfetchUsers(search);\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-9\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t{isLoading ? (\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"py-6 text-center text-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t\tLoading users...\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandEmpty>No users found.</CommandEmpty>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandList>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandGroup heading=\"All Users\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{users.map((user) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={user.id}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={user.email}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetSelectedUser(user);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetOpen(false);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-2 flex-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<UserIcon className=\"h-4 w-4 flex-shrink-0\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex flex-col items-start\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm font-medium\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{`${user.name} ${user.lastName}`.trim() ||\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-xs text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{user.email} • {user.role}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CheckIcon\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"ml-auto h-4 w-4\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tselectedUser?.id === user.id\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"opacity-100\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"opacity-0\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandList>\n\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t</Command>\n\t\t\t\t\t\t\t\t\t</PopoverContent>\n\t\t\t\t\t\t\t\t</Popover>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tonClick={handleImpersonate}\n\t\t\t\t\t\t\t\t\tdisabled={!selectedUser}\n\t\t\t\t\t\t\t\t\tvariant=\"default\"\n\t\t\t\t\t\t\t\t\tclassName=\"gap-2\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Shield className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\tImpersonate\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<div className=\"flex items-center gap-4 w-full flex-wrap\">\n\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-4 flex-1 flex-wrap\">\n\t\t\t\t\t\t\t\t\t<Avatar className=\"h-10 w-10\">\n\t\t\t\t\t\t\t\t\t\t<AvatarImage\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"object-cover\"\n\t\t\t\t\t\t\t\t\t\t\tsrc={data?.user?.image || \"\"}\n\t\t\t\t\t\t\t\t\t\t\talt={\n\t\t\t\t\t\t\t\t\t\t\t\t`${data?.user?.firstName} ${data?.user?.lastName}`.trim() ||\n\t\t\t\t\t\t\t\t\t\t\t\t\"\"\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<AvatarFallback>\n\t\t\t\t\t\t\t\t\t\t\t{`${data?.user?.firstName?.[0] || \"\"}${data?.user?.lastName?.[0] || \"\"}`.toUpperCase() ||\n\t\t\t\t\t\t\t\t\t\t\t\t\"U\"}\n\t\t\t\t\t\t\t\t\t\t</AvatarFallback>\n\t\t\t\t\t\t\t\t\t</Avatar>\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"gap-1 py-1 text-yellow-500 bg-yellow-50/20\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<Shield className=\"h-3 w-3\" />\n\t\t\t\t\t\t\t\t\t\t\t\tImpersonating\n\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-medium\">\n\t\t\t\t\t\t\t\t\t\t\t\t{`${data?.user?.firstName} ${data?.user?.lastName}`.trim() ||\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"\"}\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-3 text-sm text-muted-foreground flex-wrap\">\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t<UserIcon className=\"h-3 w-3\" />\n\t\t\t\t\t\t\t\t\t\t\t\t{data?.user?.email} • {data?.role}\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t<Key className=\"h-3 w-3\" />\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\tID: {data?.user?.id?.slice(0, 8)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-4 w-4 hover:bg-muted/50\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (data?.id) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcopy(data.id);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"ID copied to clipboard\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Copy className=\"h-3 w-3\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t<Building2 className=\"h-3 w-3\" />\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\tOrg: {data?.organizationId?.slice(0, 8)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-4 w-4 hover:bg-muted/50\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (data?.organizationId) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcopy(data.organizationId);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Organization ID copied to clipboard\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Copy className=\"h-3 w-3\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t{data?.user?.stripeCustomerId && (\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CreditCard className=\"h-3 w-3\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tCustomer:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{data?.user?.stripeCustomerId?.slice(0, 8)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-4 w-4 hover:bg-muted/50\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcopy(data?.user?.stripeCustomerId || \"\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Stripe Customer ID copied to clipboard\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Copy className=\"h-3 w-3\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t{data?.user?.stripeSubscriptionId && (\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CreditCard className=\"h-3 w-3\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSub: {data?.user?.stripeSubscriptionId?.slice(0, 8)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-4 w-4 hover:bg-muted/50\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcopy(data.user.stripeSubscriptionId || \"\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Stripe Subscription ID copied to clipboard\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Copy className=\"h-3 w-3\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t{data?.user?.serversQuantity !== undefined && (\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Server className=\"h-3 w-3\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span>Servers: {data.user.serversQuantity}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t{data?.createdAt && (\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Calendar className=\"h-3 w-3\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\tCreated:{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t{format(new Date(data.createdAt), \"MMM d, yyyy\")}\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-1 cursor-default\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Fingerprint\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"h-3 w-3\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdata?.user?.twoFactorEnabled\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"text-green-500\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"text-muted-foreground\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdata?.user?.twoFactorEnabled\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"green\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-[10px] px-1 py-0\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t2FA{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{data?.user?.twoFactorEnabled\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Enabled\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Disabled\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\tTwo-Factor Authentication Status\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tonClick={handleStopImpersonating}\n\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\tclassName=\"gap-2\"\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<XIcon className=\"w-4 h-4\" />\n\t\t\t\t\t\t\t\t\tStop Impersonating\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</>\n\t\t</TooltipProvider>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/mariadb/general/show-external-mariadb-credentials.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport Link from \"next/link\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { ToggleVisibilityInput } from \"@/components/shared/toggle-visibility-input\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { Label } from \"@/components/ui/label\";\nimport { api } from \"@/utils/api\";\n\nconst DockerProviderSchema = z.object({\n\texternalPort: z.preprocess((a) => {\n\t\tif (a !== null) {\n\t\t\tconst parsed = Number.parseInt(z.string().parse(a), 10);\n\t\t\treturn Number.isNaN(parsed) ? null : parsed;\n\t\t}\n\t\treturn null;\n\t}, z\n\t\t.number()\n\t\t.gte(0, \"Range must be 0 - 65535\")\n\t\t.lte(65535, \"Range must be 0 - 65535\")\n\t\t.nullable()),\n});\n\ntype DockerProvider = z.infer<typeof DockerProviderSchema>;\n\ninterface Props {\n\tmariadbId: string;\n}\nexport const ShowExternalMariadbCredentials = ({ mariadbId }: Props) => {\n\tconst { data: ip } = api.settings.getIp.useQuery();\n\tconst { data, refetch } = api.mariadb.one.useQuery({ mariadbId });\n\tconst { mutateAsync, isPending } = api.mariadb.saveExternalPort.useMutation();\n\tconst [connectionUrl, setConnectionUrl] = useState(\"\");\n\tconst getIp = data?.server?.ipAddress || ip;\n\tconst form = useForm({\n\t\tdefaultValues: {},\n\t\tresolver: zodResolver(DockerProviderSchema),\n\t});\n\n\tuseEffect(() => {\n\t\tif (data?.externalPort) {\n\t\t\tform.reset({\n\t\t\t\texternalPort: data.externalPort,\n\t\t\t});\n\t\t}\n\t}, [form.reset, data, form]);\n\n\tconst onSubmit = async (values: DockerProvider) => {\n\t\tawait mutateAsync({\n\t\t\texternalPort: values.externalPort,\n\t\t\tmariadbId,\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(\"External Port updated\");\n\t\t\t\tawait refetch();\n\t\t\t})\n\t\t\t.catch((error: Error) => {\n\t\t\t\ttoast.error(error?.message || \"Error saving the external port\");\n\t\t\t});\n\t};\n\n\tuseEffect(() => {\n\t\tconst buildConnectionUrl = () => {\n\t\t\tconst port = form.watch(\"externalPort\") || data?.externalPort;\n\n\t\t\treturn `mariadb://${data?.databaseUser}:${data?.databasePassword}@${getIp}:${port}/${data?.databaseName}`;\n\t\t};\n\n\t\tsetConnectionUrl(buildConnectionUrl());\n\t}, [\n\t\tdata?.appName,\n\t\tdata?.externalPort,\n\t\tdata?.databasePassword,\n\t\tform,\n\t\tdata?.databaseName,\n\t\tdata?.databaseUser,\n\t\tgetIp,\n\t]);\n\treturn (\n\t\t<>\n\t\t\t<div className=\"flex w-full flex-col gap-5 \">\n\t\t\t\t<Card className=\"bg-background\">\n\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t<CardTitle className=\"text-xl\">External Credentials</CardTitle>\n\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\tIn order to make the database reachable through the internet, you\n\t\t\t\t\t\t\tmust set a port and ensure that the port is not being used by\n\t\t\t\t\t\t\tanother application or database\n\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<CardContent className=\"flex w-full flex-col gap-4\">\n\t\t\t\t\t\t{!getIp && (\n\t\t\t\t\t\t\t<AlertBlock type=\"warning\">\n\t\t\t\t\t\t\t\tYou need to set an IP address in your{\" \"}\n\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\thref=\"/dashboard/settings/server\"\n\t\t\t\t\t\t\t\t\tclassName=\"text-primary\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{data?.serverId\n\t\t\t\t\t\t\t\t\t\t? \"Remote Servers -> Server -> Edit Server -> Update IP Address\"\n\t\t\t\t\t\t\t\t\t\t: \"Web Server -> Server -> Update Server IP\"}\n\t\t\t\t\t\t\t\t</Link>{\" \"}\n\t\t\t\t\t\t\t\tto fix the database url connection.\n\t\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<Form {...form}>\n\t\t\t\t\t\t\t<form\n\t\t\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\t\t\tclassName=\"flex flex-col gap-4\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div className=\"grid md:grid-cols-2 gap-4 \">\n\t\t\t\t\t\t\t\t\t<div className=\"md:col-span-2 space-y-4\">\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"externalPort\"\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => {\n\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>External Port (Internet)</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"3306\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value as string}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t{!!data?.externalPort && (\n\t\t\t\t\t\t\t\t\t<div className=\"grid w-full gap-8\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-3\">\n\t\t\t\t\t\t\t\t\t\t\t{/* jdbc:mariadb://5.161.59.207:3306/pixel-calculate?user=mariadb&password=HdVXfq6hM7W7F1 */}\n\t\t\t\t\t\t\t\t\t\t\t<Label>External Host</Label>\n\t\t\t\t\t\t\t\t\t\t\t<ToggleVisibilityInput value={connectionUrl} disabled />\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t<div className=\"flex justify-end\">\n\t\t\t\t\t\t\t\t\t<Button type=\"submit\" isLoading={isPending}>\n\t\t\t\t\t\t\t\t\t\tSave\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t</Form>\n\t\t\t\t\t</CardContent>\n\t\t\t\t</Card>\n\t\t\t</div>\n\t\t</>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/mariadb/general/show-general-mariadb.tsx",
    "content": "import * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport { Ban, CheckCircle2, RefreshCcw, Rocket, Terminal } from \"lucide-react\";\nimport { useState } from \"react\";\nimport { toast } from \"sonner\";\nimport { DialogAction } from \"@/components/shared/dialog-action\";\nimport { DrawerLogs } from \"@/components/shared/drawer-logs\";\nimport { Button } from \"@/components/ui/button\";\nimport { Card, CardContent, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { api } from \"@/utils/api\";\nimport { type LogLine, parseLogs } from \"../../docker/logs/utils\";\nimport { DockerTerminalModal } from \"../../settings/web-server/docker-terminal-modal\";\n\ninterface Props {\n\tmariadbId: string;\n}\n\nexport const ShowGeneralMariadb = ({ mariadbId }: Props) => {\n\tconst { data: permissions } = api.user.getPermissions.useQuery();\n\tconst canDeploy = permissions?.deployment.create ?? false;\n\tconst { data, refetch } = api.mariadb.one.useQuery(\n\t\t{\n\t\t\tmariadbId,\n\t\t},\n\t\t{ enabled: !!mariadbId },\n\t);\n\n\tconst { mutateAsync: reload, isPending: isReloading } =\n\t\tapi.mariadb.reload.useMutation();\n\n\tconst { mutateAsync: start, isPending: isStarting } =\n\t\tapi.mariadb.start.useMutation();\n\n\tconst { mutateAsync: stop, isPending: isStopping } =\n\t\tapi.mariadb.stop.useMutation();\n\n\tconst [isDrawerOpen, setIsDrawerOpen] = useState(false);\n\tconst [filteredLogs, setFilteredLogs] = useState<LogLine[]>([]);\n\tconst [isDeploying, setIsDeploying] = useState(false);\n\tapi.mariadb.deployWithLogs.useSubscription(\n\t\t{\n\t\t\tmariadbId: mariadbId,\n\t\t},\n\t\t{\n\t\t\tenabled: isDeploying,\n\t\t\tonData(log) {\n\t\t\t\tif (!isDrawerOpen) {\n\t\t\t\t\tsetIsDrawerOpen(true);\n\t\t\t\t}\n\n\t\t\t\tif (log === \"Deployment completed successfully!\") {\n\t\t\t\t\tsetIsDeploying(false);\n\t\t\t\t}\n\t\t\t\tconst parsedLogs = parseLogs(log);\n\t\t\t\tsetFilteredLogs((prev) => [...prev, ...parsedLogs]);\n\t\t\t},\n\t\t\tonError(error) {\n\t\t\t\tconsole.error(\"Deployment logs error:\", error);\n\t\t\t\tsetIsDeploying(false);\n\t\t\t},\n\t\t},\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<div className=\"flex w-full flex-col gap-5 \">\n\t\t\t\t<Card className=\"bg-background\">\n\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t<CardTitle className=\"text-xl\">Deploy Settings</CardTitle>\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<CardContent className=\"flex flex-row gap-4 flex-wrap\">\n\t\t\t\t\t\t{canDeploy && (\n\t\t\t\t\t\t\t<TooltipProvider delayDuration={0}>\n\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\ttitle=\"Deploy Mariadb\"\n\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to deploy this mariadb?\"\n\t\t\t\t\t\t\t\t\ttype=\"default\"\n\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\tsetIsDeploying(true);\n\t\t\t\t\t\t\t\t\t\tawait new Promise((resolve) => setTimeout(resolve, 1000));\n\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tvariant=\"default\"\n\t\t\t\t\t\t\t\t\t\tisLoading={data?.applicationStatus === \"running\"}\n\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1.5 focus-visible:ring-2 focus-visible:ring-offset-2\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Rocket className=\"size-4 mr-1\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\tDeploy\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t<TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent sideOffset={5} className=\"z-[60]\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p>Downloads and sets up the MariaDB database</p>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t</TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{canDeploy && (\n\t\t\t\t\t\t\t<TooltipProvider delayDuration={0}>\n\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\ttitle=\"Reload Mariadb\"\n\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to reload this mariadb?\"\n\t\t\t\t\t\t\t\t\ttype=\"default\"\n\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\tawait reload({\n\t\t\t\t\t\t\t\t\t\t\tmariadbId: mariadbId,\n\t\t\t\t\t\t\t\t\t\t\tappName: data?.appName || \"\",\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Mariadb reloaded successfully\");\n\t\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error reloading Mariadb\");\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\tisLoading={isReloading}\n\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1.5 focus-visible:ring-2 focus-visible:ring-offset-2\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<RefreshCcw className=\"size-4 mr-1\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\tReload\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t<TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent sideOffset={5} className=\"z-[60]\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p>Restart the MariaDB service without rebuilding</p>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t</TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{canDeploy &&\n\t\t\t\t\t\t\t(data?.applicationStatus === \"idle\" ? (\n\t\t\t\t\t\t\t\t<TooltipProvider delayDuration={0}>\n\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\ttitle=\"Start Mariadb\"\n\t\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to start this mariadb?\"\n\t\t\t\t\t\t\t\t\t\ttype=\"default\"\n\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\tawait start({\n\t\t\t\t\t\t\t\t\t\t\t\tmariadbId: mariadbId,\n\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Mariadb started successfully\");\n\t\t\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error starting Mariadb\");\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\tisLoading={isStarting}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1.5 focus-visible:ring-2 focus-visible:ring-offset-2\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CheckCircle2 className=\"size-4 mr-1\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tStart\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent sideOffset={5} className=\"z-[60]\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tStart the MariaDB database (requires a previous\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsuccessful setup)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<TooltipProvider delayDuration={0}>\n\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\ttitle=\"Stop Mariadb\"\n\t\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to stop this mariadb?\"\n\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\tawait stop({\n\t\t\t\t\t\t\t\t\t\t\t\tmariadbId: mariadbId,\n\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Mariadb stopped successfully\");\n\t\t\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error stopping Mariadb\");\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"destructive\"\n\t\t\t\t\t\t\t\t\t\t\tisLoading={isStopping}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1.5 focus-visible:ring-2 focus-visible:ring-offset-2\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Ban className=\"size-4 mr-1\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tStop\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent sideOffset={5} className=\"z-[60]\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>Stop the currently running MariaDB database</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t<DockerTerminalModal\n\t\t\t\t\t\t\tappName={data?.appName || \"\"}\n\t\t\t\t\t\t\tserverId={data?.serverId || \"\"}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1.5 focus-visible:ring-2 focus-visible:ring-offset-2\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center\">\n\t\t\t\t\t\t\t\t\t\t\t<Terminal className=\"size-4 mr-1\" />\n\t\t\t\t\t\t\t\t\t\t\tOpen Terminal\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t<TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t<TooltipContent sideOffset={5} className=\"z-[60]\">\n\t\t\t\t\t\t\t\t\t\t\t<p>Open a terminal to the MariaDB container</p>\n\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t</TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</DockerTerminalModal>\n\t\t\t\t\t</CardContent>\n\t\t\t\t</Card>\n\t\t\t\t<DrawerLogs\n\t\t\t\t\tisOpen={isDrawerOpen}\n\t\t\t\t\tonClose={() => {\n\t\t\t\t\t\tsetIsDrawerOpen(false);\n\t\t\t\t\t\tsetFilteredLogs([]);\n\t\t\t\t\t\tsetIsDeploying(false);\n\t\t\t\t\t\trefetch();\n\t\t\t\t\t}}\n\t\t\t\t\tfilteredLogs={filteredLogs}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/mariadb/general/show-internal-mariadb-credentials.tsx",
    "content": "import { ToggleVisibilityInput } from \"@/components/shared/toggle-visibility-input\";\nimport { Card, CardContent, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport { Input } from \"@/components/ui/input\";\nimport { Label } from \"@/components/ui/label\";\nimport { api } from \"@/utils/api\";\n\ninterface Props {\n\tmariadbId: string;\n}\nexport const ShowInternalMariadbCredentials = ({ mariadbId }: Props) => {\n\tconst { data } = api.mariadb.one.useQuery({ mariadbId });\n\treturn (\n\t\t<>\n\t\t\t<div className=\"flex w-full flex-col gap-5 \">\n\t\t\t\t<Card className=\"bg-background\">\n\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t<CardTitle className=\"text-xl\">Internal Credentials</CardTitle>\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<CardContent className=\"flex w-full flex-row gap-4\">\n\t\t\t\t\t\t<div className=\"grid w-full md:grid-cols-2 gap-4 md:gap-8\">\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t<Label>User</Label>\n\t\t\t\t\t\t\t\t<Input disabled value={data?.databaseUser} />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t<Label>Database Name</Label>\n\t\t\t\t\t\t\t\t<Input disabled value={data?.databaseName} />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t<Label>Password</Label>\n\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-4\">\n\t\t\t\t\t\t\t\t\t<ToggleVisibilityInput\n\t\t\t\t\t\t\t\t\t\tdisabled\n\t\t\t\t\t\t\t\t\t\tvalue={data?.databasePassword}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t<Label>Root Password</Label>\n\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-4\">\n\t\t\t\t\t\t\t\t\t<ToggleVisibilityInput\n\t\t\t\t\t\t\t\t\t\tdisabled\n\t\t\t\t\t\t\t\t\t\tvalue={data?.databaseRootPassword}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t<Label>Internal Port (Container)</Label>\n\t\t\t\t\t\t\t\t<Input disabled value=\"3306\" />\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t<Label>Internal Host</Label>\n\t\t\t\t\t\t\t\t<Input disabled value={data?.appName} />\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2 md:col-span-2\">\n\t\t\t\t\t\t\t\t<Label>Internal Connection URL </Label>\n\t\t\t\t\t\t\t\t<ToggleVisibilityInput\n\t\t\t\t\t\t\t\t\tdisabled\n\t\t\t\t\t\t\t\t\tvalue={`mariadb://${data?.databaseUser}:${data?.databasePassword}@${data?.appName}:3306/${data?.databaseName}`}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</CardContent>\n\t\t\t\t</Card>\n\t\t\t</div>\n\t\t</>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/mariadb/update-mariadb.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { PenBoxIcon } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { Textarea } from \"@/components/ui/textarea\";\nimport { api } from \"@/utils/api\";\n\nconst updateMariadbSchema = z.object({\n\tname: z.string().min(1, {\n\t\tmessage: \"Name is required\",\n\t}),\n\tdescription: z.string().optional(),\n});\n\ntype UpdateMariadb = z.infer<typeof updateMariadbSchema>;\n\ninterface Props {\n\tmariadbId: string;\n}\n\nexport const UpdateMariadb = ({ mariadbId }: Props) => {\n\tconst [isOpen, setIsOpen] = useState(false);\n\tconst utils = api.useUtils();\n\tconst { mutateAsync, error, isError, isPending } =\n\t\tapi.mariadb.update.useMutation();\n\tconst { data } = api.mariadb.one.useQuery(\n\t\t{\n\t\t\tmariadbId,\n\t\t},\n\t\t{\n\t\t\tenabled: !!mariadbId,\n\t\t},\n\t);\n\tconst form = useForm<UpdateMariadb>({\n\t\tdefaultValues: {\n\t\t\tdescription: data?.description ?? \"\",\n\t\t\tname: data?.name ?? \"\",\n\t\t},\n\t\tresolver: zodResolver(updateMariadbSchema),\n\t});\n\tuseEffect(() => {\n\t\tif (data) {\n\t\t\tform.reset({\n\t\t\t\tdescription: data.description ?? \"\",\n\t\t\t\tname: data.name,\n\t\t\t});\n\t\t}\n\t}, [data, form, form.reset]);\n\n\tconst onSubmit = async (formData: UpdateMariadb) => {\n\t\tawait mutateAsync({\n\t\t\tname: formData.name,\n\t\t\tmariadbId: mariadbId,\n\t\t\tdescription: formData.description || \"\",\n\t\t})\n\t\t\t.then(() => {\n\t\t\t\ttoast.success(\"MariaDB updated successfully\");\n\t\t\t\tutils.mariadb.one.invalidate({\n\t\t\t\t\tmariadbId: mariadbId,\n\t\t\t\t});\n\t\t\t\tsetIsOpen(false);\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error updating the Mariadb\");\n\t\t\t})\n\t\t\t.finally(() => {});\n\t};\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\tclassName=\"group hover:bg-blue-500/10 \"\n\t\t\t\t>\n\t\t\t\t\t<PenBoxIcon className=\"size-3.5  text-primary group-hover:text-blue-500\" />\n\t\t\t\t</Button>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-lg\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Modify MariaDB</DialogTitle>\n\t\t\t\t\t<DialogDescription>Update the MariaDB data</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t{isError && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\n\t\t\t\t<div className=\"grid gap-4\">\n\t\t\t\t\t<div className=\"grid items-center gap-4\">\n\t\t\t\t\t\t<Form {...form}>\n\t\t\t\t\t\t\t<form\n\t\t\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\t\t\tid=\"hook-form-update-mariadb\"\n\t\t\t\t\t\t\t\tclassName=\"grid w-full gap-4 \"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"name\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Name</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"Vandelay Industries\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"description\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Description</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Textarea\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Description about your project...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"resize-none\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tisLoading={isPending}\n\t\t\t\t\t\t\t\t\t\tform=\"hook-form-update-mariadb\"\n\t\t\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tUpdate\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</DialogFooter>\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t</Form>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/mongo/general/show-external-mongo-credentials.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport Link from \"next/link\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { ToggleVisibilityInput } from \"@/components/shared/toggle-visibility-input\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { Label } from \"@/components/ui/label\";\nimport { api } from \"@/utils/api\";\n\nconst DockerProviderSchema = z.object({\n\texternalPort: z.preprocess((a) => {\n\t\tif (a !== null) {\n\t\t\tconst parsed = Number.parseInt(z.string().parse(a), 10);\n\t\t\treturn Number.isNaN(parsed) ? null : parsed;\n\t\t}\n\t\treturn null;\n\t}, z\n\t\t.number()\n\t\t.gte(0, \"Range must be 0 - 65535\")\n\t\t.lte(65535, \"Range must be 0 - 65535\")\n\t\t.nullable()),\n});\n\ntype DockerProvider = z.infer<typeof DockerProviderSchema>;\n\ninterface Props {\n\tmongoId: string;\n}\nexport const ShowExternalMongoCredentials = ({ mongoId }: Props) => {\n\tconst { data: ip } = api.settings.getIp.useQuery();\n\tconst { data, refetch } = api.mongo.one.useQuery({ mongoId });\n\tconst { mutateAsync, isPending } = api.mongo.saveExternalPort.useMutation();\n\tconst [connectionUrl, setConnectionUrl] = useState(\"\");\n\tconst getIp = data?.server?.ipAddress || ip;\n\tconst form = useForm({\n\t\tdefaultValues: {},\n\t\tresolver: zodResolver(DockerProviderSchema),\n\t});\n\n\tuseEffect(() => {\n\t\tif (data?.externalPort) {\n\t\t\tform.reset({\n\t\t\t\texternalPort: data.externalPort,\n\t\t\t});\n\t\t}\n\t}, [form.reset, data, form]);\n\n\tconst onSubmit = async (values: DockerProvider) => {\n\t\tawait mutateAsync({\n\t\t\texternalPort: values.externalPort,\n\t\t\tmongoId,\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(\"External Port updated\");\n\t\t\t\tawait refetch();\n\t\t\t})\n\t\t\t.catch((error: Error) => {\n\t\t\t\ttoast.error(error?.message || \"Error saving the external port\");\n\t\t\t});\n\t};\n\n\tuseEffect(() => {\n\t\tconst buildConnectionUrl = () => {\n\t\t\tconst port = form.watch(\"externalPort\") || data?.externalPort;\n\n\t\t\treturn `mongodb://${data?.databaseUser}:${data?.databasePassword}@${getIp}:${port}`;\n\t\t};\n\n\t\tsetConnectionUrl(buildConnectionUrl());\n\t}, [\n\t\tdata?.appName,\n\t\tdata?.externalPort,\n\t\tdata?.databasePassword,\n\t\tform,\n\t\tdata?.databaseUser,\n\t\tgetIp,\n\t]);\n\n\treturn (\n\t\t<>\n\t\t\t<div className=\"flex w-full flex-col gap-5 \">\n\t\t\t\t<Card className=\"bg-background\">\n\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t<CardTitle className=\"text-xl\">External Credentials</CardTitle>\n\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\tIn order to make the database reachable through the internet, you\n\t\t\t\t\t\t\tmust set a port and ensure that the port is not being used by\n\t\t\t\t\t\t\tanother application or database\n\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<CardContent className=\"flex w-full flex-col gap-4\">\n\t\t\t\t\t\t{!getIp && (\n\t\t\t\t\t\t\t<AlertBlock type=\"warning\">\n\t\t\t\t\t\t\t\tYou need to set an IP address in your{\" \"}\n\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\thref=\"/dashboard/settings/server\"\n\t\t\t\t\t\t\t\t\tclassName=\"text-primary\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{data?.serverId\n\t\t\t\t\t\t\t\t\t\t? \"Remote Servers -> Server -> Edit Server -> Update IP Address\"\n\t\t\t\t\t\t\t\t\t\t: \"Web Server -> Server -> Update Server IP\"}\n\t\t\t\t\t\t\t\t</Link>{\" \"}\n\t\t\t\t\t\t\t\tto fix the database url connection.\n\t\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<Form {...form}>\n\t\t\t\t\t\t\t<form\n\t\t\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\t\t\tclassName=\"flex flex-col gap-4\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div className=\"grid grid-cols-2 gap-4 \">\n\t\t\t\t\t\t\t\t\t<div className=\"col-span-2 space-y-4\">\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"externalPort\"\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => {\n\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>External Port (Internet)</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"27017\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value as string}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t{!!data?.externalPort && (\n\t\t\t\t\t\t\t\t\t<div className=\"grid w-full gap-8\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-3\">\n\t\t\t\t\t\t\t\t\t\t\t<Label>External Host</Label>\n\t\t\t\t\t\t\t\t\t\t\t<ToggleVisibilityInput value={connectionUrl} disabled />\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t<div className=\"flex justify-end\">\n\t\t\t\t\t\t\t\t\t<Button type=\"submit\" isLoading={isPending}>\n\t\t\t\t\t\t\t\t\t\tSave\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t</Form>\n\t\t\t\t\t</CardContent>\n\t\t\t\t</Card>\n\t\t\t</div>\n\t\t</>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/mongo/general/show-general-mongo.tsx",
    "content": "import * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport { Ban, CheckCircle2, RefreshCcw, Rocket, Terminal } from \"lucide-react\";\nimport { useState } from \"react\";\nimport { toast } from \"sonner\";\nimport { DialogAction } from \"@/components/shared/dialog-action\";\nimport { DrawerLogs } from \"@/components/shared/drawer-logs\";\nimport { Button } from \"@/components/ui/button\";\nimport { Card, CardContent, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { api } from \"@/utils/api\";\nimport { type LogLine, parseLogs } from \"../../docker/logs/utils\";\nimport { DockerTerminalModal } from \"../../settings/web-server/docker-terminal-modal\";\n\ninterface Props {\n\tmongoId: string;\n}\n\nexport const ShowGeneralMongo = ({ mongoId }: Props) => {\n\tconst { data: permissions } = api.user.getPermissions.useQuery();\n\tconst canDeploy = permissions?.deployment.create ?? false;\n\tconst { data, refetch } = api.mongo.one.useQuery(\n\t\t{\n\t\t\tmongoId,\n\t\t},\n\t\t{ enabled: !!mongoId },\n\t);\n\n\tconst { mutateAsync: reload, isPending: isReloading } =\n\t\tapi.mongo.reload.useMutation();\n\n\tconst { mutateAsync: start, isPending: isStarting } =\n\t\tapi.mongo.start.useMutation();\n\n\tconst { mutateAsync: stop, isPending: isStopping } =\n\t\tapi.mongo.stop.useMutation();\n\n\tconst [isDrawerOpen, setIsDrawerOpen] = useState(false);\n\tconst [filteredLogs, setFilteredLogs] = useState<LogLine[]>([]);\n\tconst [isDeploying, setIsDeploying] = useState(false);\n\tapi.mongo.deployWithLogs.useSubscription(\n\t\t{\n\t\t\tmongoId: mongoId,\n\t\t},\n\t\t{\n\t\t\tenabled: isDeploying,\n\t\t\tonData(log) {\n\t\t\t\tif (!isDrawerOpen) {\n\t\t\t\t\tsetIsDrawerOpen(true);\n\t\t\t\t}\n\n\t\t\t\tif (log === \"Deployment completed successfully!\") {\n\t\t\t\t\tsetIsDeploying(false);\n\t\t\t\t}\n\n\t\t\t\tconst parsedLogs = parseLogs(log);\n\t\t\t\tsetFilteredLogs((prev) => [...prev, ...parsedLogs]);\n\t\t\t},\n\t\t\tonError(error) {\n\t\t\t\tconsole.error(\"Deployment logs error:\", error);\n\t\t\t\tsetIsDeploying(false);\n\t\t\t},\n\t\t},\n\t);\n\treturn (\n\t\t<>\n\t\t\t<div className=\"flex w-full flex-col gap-5 \">\n\t\t\t\t<Card className=\"bg-background\">\n\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t<CardTitle className=\"text-xl\">Deploy Settings</CardTitle>\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<CardContent className=\"flex flex-row gap-4 flex-wrap\">\n\t\t\t\t\t\t<TooltipProvider delayDuration={0}>\n\t\t\t\t\t\t\t{canDeploy && (\n\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\ttitle=\"Deploy Mongo\"\n\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to deploy this mongo?\"\n\t\t\t\t\t\t\t\t\ttype=\"default\"\n\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\tsetIsDeploying(true);\n\t\t\t\t\t\t\t\t\t\tawait new Promise((resolve) => setTimeout(resolve, 1000));\n\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tvariant=\"default\"\n\t\t\t\t\t\t\t\t\t\tisLoading={data?.applicationStatus === \"running\"}\n\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1.5 focus-visible:ring-2 focus-visible:ring-offset-2\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Rocket className=\"size-4 mr-1\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\tDeploy\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t<TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent sideOffset={5} className=\"z-[60]\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p>Downloads and sets up the MongoDB database</p>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t</TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{canDeploy && (\n\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\ttitle=\"Reload Mongo\"\n\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to reload this mongo?\"\n\t\t\t\t\t\t\t\t\ttype=\"default\"\n\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\tawait reload({\n\t\t\t\t\t\t\t\t\t\t\tmongoId: mongoId,\n\t\t\t\t\t\t\t\t\t\t\tappName: data?.appName || \"\",\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Mongo reloaded successfully\");\n\t\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error reloading Mongo\");\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\tisLoading={isReloading}\n\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1.5 focus-visible:ring-2 focus-visible:ring-offset-2\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<RefreshCcw className=\"size-4 mr-1\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\tReload\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t<TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent sideOffset={5} className=\"z-[60]\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p>Restart the MongoDB service without rebuilding</p>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t</TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{canDeploy &&\n\t\t\t\t\t\t\t\t(data?.applicationStatus === \"idle\" ? (\n\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\ttitle=\"Start Mongo\"\n\t\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to start this mongo?\"\n\t\t\t\t\t\t\t\t\t\ttype=\"default\"\n\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\tawait start({\n\t\t\t\t\t\t\t\t\t\t\t\tmongoId: mongoId,\n\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Mongo started successfully\");\n\t\t\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error starting Mongo\");\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\tisLoading={isStarting}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1.5 focus-visible:ring-2 focus-visible:ring-offset-2\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CheckCircle2 className=\"size-4 mr-1\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tStart\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent sideOffset={5} className=\"z-[60]\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tStart the MongoDB database (requires a previous\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsuccessful setup)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\ttitle=\"Stop Mongo\"\n\t\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to stop this mongo?\"\n\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\tawait stop({\n\t\t\t\t\t\t\t\t\t\t\t\tmongoId: mongoId,\n\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Mongo stopped successfully\");\n\t\t\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error stopping Mongo\");\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"destructive\"\n\t\t\t\t\t\t\t\t\t\t\tisLoading={isStopping}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1.5 focus-visible:ring-2 focus-visible:ring-offset-2\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Ban className=\"size-4 mr-1\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tStop\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent sideOffset={5} className=\"z-[60]\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>Stop the currently running MongoDB database</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t<DockerTerminalModal\n\t\t\t\t\t\t\tappName={data?.appName || \"\"}\n\t\t\t\t\t\t\tserverId={data?.serverId || \"\"}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1.5 focus-visible:ring-2 focus-visible:ring-offset-2\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center\">\n\t\t\t\t\t\t\t\t\t\t\t<Terminal className=\"size-4 mr-1\" />\n\t\t\t\t\t\t\t\t\t\t\tOpen Terminal\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t<TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t<TooltipContent sideOffset={5} className=\"z-[60]\">\n\t\t\t\t\t\t\t\t\t\t\t<p>Open a terminal to the MongoDB container</p>\n\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t</TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</DockerTerminalModal>\n\t\t\t\t\t</CardContent>\n\t\t\t\t</Card>\n\t\t\t\t<DrawerLogs\n\t\t\t\t\tisOpen={isDrawerOpen}\n\t\t\t\t\tonClose={() => {\n\t\t\t\t\t\tsetIsDrawerOpen(false);\n\t\t\t\t\t\tsetFilteredLogs([]);\n\t\t\t\t\t\tsetIsDeploying(false);\n\t\t\t\t\t\trefetch();\n\t\t\t\t\t}}\n\t\t\t\t\tfilteredLogs={filteredLogs}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/mongo/general/show-internal-mongo-credentials.tsx",
    "content": "import { ToggleVisibilityInput } from \"@/components/shared/toggle-visibility-input\";\nimport { Card, CardContent, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport { Input } from \"@/components/ui/input\";\nimport { Label } from \"@/components/ui/label\";\nimport { api } from \"@/utils/api\";\n\ninterface Props {\n\tmongoId: string;\n}\nexport const ShowInternalMongoCredentials = ({ mongoId }: Props) => {\n\tconst { data } = api.mongo.one.useQuery({ mongoId });\n\treturn (\n\t\t<>\n\t\t\t<div className=\"flex w-full flex-col gap-5 \">\n\t\t\t\t<Card className=\"bg-background\">\n\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t<CardTitle className=\"text-xl\">Internal Credentials</CardTitle>\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<CardContent className=\"flex w-full flex-row gap-4\">\n\t\t\t\t\t\t<div className=\"grid w-full md:grid-cols-2 gap-4 md:gap-8\">\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t<Label>User</Label>\n\t\t\t\t\t\t\t\t<Input disabled value={data?.databaseUser} />\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t<Label>Password</Label>\n\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-4\">\n\t\t\t\t\t\t\t\t\t<ToggleVisibilityInput\n\t\t\t\t\t\t\t\t\t\tdisabled\n\t\t\t\t\t\t\t\t\t\tvalue={data?.databasePassword}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t<Label>Internal Port (Container)</Label>\n\t\t\t\t\t\t\t\t<Input disabled value=\"27017\" />\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t<Label>Internal Host</Label>\n\t\t\t\t\t\t\t\t<Input disabled value={data?.appName} />\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2 md:col-span-2\">\n\t\t\t\t\t\t\t\t<Label>Internal Connection URL </Label>\n\t\t\t\t\t\t\t\t<ToggleVisibilityInput\n\t\t\t\t\t\t\t\t\tdisabled\n\t\t\t\t\t\t\t\t\tvalue={`mongodb://${data?.databaseUser}:${data?.databasePassword}@${data?.appName}:27017`}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</CardContent>\n\t\t\t\t</Card>\n\t\t\t</div>\n\t\t</>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/mongo/update-mongo.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { PenBoxIcon } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { Textarea } from \"@/components/ui/textarea\";\nimport { api } from \"@/utils/api\";\n\nconst updateMongoSchema = z.object({\n\tname: z.string().min(1, {\n\t\tmessage: \"Name is required\",\n\t}),\n\tdescription: z.string().optional(),\n});\n\ntype UpdateMongo = z.infer<typeof updateMongoSchema>;\n\ninterface Props {\n\tmongoId: string;\n}\n\nexport const UpdateMongo = ({ mongoId }: Props) => {\n\tconst [isOpen, setIsOpen] = useState(false);\n\tconst utils = api.useUtils();\n\tconst { mutateAsync, error, isError, isPending } =\n\t\tapi.mongo.update.useMutation();\n\tconst { data } = api.mongo.one.useQuery(\n\t\t{\n\t\t\tmongoId,\n\t\t},\n\t\t{\n\t\t\tenabled: !!mongoId,\n\t\t},\n\t);\n\tconst form = useForm<UpdateMongo>({\n\t\tdefaultValues: {\n\t\t\tdescription: data?.description ?? \"\",\n\t\t\tname: data?.name ?? \"\",\n\t\t},\n\t\tresolver: zodResolver(updateMongoSchema),\n\t});\n\tuseEffect(() => {\n\t\tif (data) {\n\t\t\tform.reset({\n\t\t\t\tdescription: data.description ?? \"\",\n\t\t\t\tname: data.name,\n\t\t\t});\n\t\t}\n\t}, [data, form, form.reset]);\n\n\tconst onSubmit = async (formData: UpdateMongo) => {\n\t\tawait mutateAsync({\n\t\t\tname: formData.name,\n\t\t\tmongoId: mongoId,\n\t\t\tdescription: formData.description || \"\",\n\t\t})\n\t\t\t.then(() => {\n\t\t\t\ttoast.success(\"Mongo updated successfully\");\n\t\t\t\tutils.mongo.one.invalidate({\n\t\t\t\t\tmongoId: mongoId,\n\t\t\t\t});\n\t\t\t\tsetIsOpen(false);\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error updating mongo database\");\n\t\t\t})\n\t\t\t.finally(() => {});\n\t};\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\tclassName=\"group hover:bg-blue-500/10 \"\n\t\t\t\t>\n\t\t\t\t\t<PenBoxIcon className=\"size-3.5  text-primary group-hover:text-blue-500\" />\n\t\t\t\t</Button>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-lg\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Modify MongoDB</DialogTitle>\n\t\t\t\t\t<DialogDescription>Update the MongoDB data</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t{isError && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\n\t\t\t\t<div className=\"grid gap-4\">\n\t\t\t\t\t<div className=\"grid items-center gap-4\">\n\t\t\t\t\t\t<Form {...form}>\n\t\t\t\t\t\t\t<form\n\t\t\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\t\t\tid=\"hook-form-update-mongo\"\n\t\t\t\t\t\t\t\tclassName=\"grid w-full gap-4 \"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"name\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Name</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"Vandelay Industries\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"description\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Description</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Textarea\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Description about your project...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"resize-none\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tisLoading={isPending}\n\t\t\t\t\t\t\t\t\t\tform=\"hook-form-update-mongo\"\n\t\t\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tUpdate\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</DialogFooter>\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t</Form>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/monitoring/free/container/docker-block-chart.tsx",
    "content": "import { format } from \"date-fns\";\nimport {\n\tArea,\n\tAreaChart,\n\tCartesianGrid,\n\tLegend,\n\tResponsiveContainer,\n\tTooltip,\n\tYAxis,\n} from \"recharts\";\nimport type { DockerStatsJSON } from \"./show-free-container-monitoring\";\n\ninterface Props {\n\tacummulativeData: DockerStatsJSON[\"block\"];\n}\n\nexport const DockerBlockChart = ({ acummulativeData }: Props) => {\n\tconst transformedData = acummulativeData.map((item, index) => {\n\t\treturn {\n\t\t\ttime: item.time,\n\t\t\tname: `Point ${index + 1}`,\n\t\t\treadMb: item.value.readMb,\n\t\t\twriteMb: item.value.writeMb,\n\t\t};\n\t});\n\n\treturn (\n\t\t<div className=\"mt-6 w-full h-[10rem]\">\n\t\t\t<ResponsiveContainer>\n\t\t\t\t<AreaChart\n\t\t\t\t\tdata={transformedData}\n\t\t\t\t\tmargin={{\n\t\t\t\t\t\ttop: 10,\n\t\t\t\t\t\tright: 30,\n\t\t\t\t\t\tleft: 0,\n\t\t\t\t\t\tbottom: 0,\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<defs>\n\t\t\t\t\t\t<linearGradient id=\"colorUv\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n\t\t\t\t\t\t\t<stop offset=\"5%\" stopColor=\"#27272A\" stopOpacity={0.8} />\n\t\t\t\t\t\t\t<stop offset=\"95%\" stopColor=\"#8884d8\" stopOpacity={0} />\n\t\t\t\t\t\t</linearGradient>\n\t\t\t\t\t\t<linearGradient id=\"colorWrite\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n\t\t\t\t\t\t\t<stop offset=\"5%\" stopColor=\"#82ca9d\" stopOpacity={0.8} />\n\t\t\t\t\t\t\t<stop offset=\"95%\" stopColor=\"#82ca9d\" stopOpacity={0} />\n\t\t\t\t\t\t</linearGradient>\n\t\t\t\t\t</defs>\n\t\t\t\t\t<YAxis stroke=\"#A1A1AA\" />\n\t\t\t\t\t<CartesianGrid strokeDasharray=\"3 3\" stroke=\"#27272A\" />\n\t\t\t\t\t{/* @ts-ignore */}\n\t\t\t\t\t<Tooltip content={<CustomTooltip />} />\n\t\t\t\t\t<Legend />\n\t\t\t\t\t<Area\n\t\t\t\t\t\ttype=\"monotone\"\n\t\t\t\t\t\tdataKey=\"readMb\"\n\t\t\t\t\t\tstroke=\"#27272A\"\n\t\t\t\t\t\tfillOpacity={1}\n\t\t\t\t\t\tfill=\"url(#colorUv)\"\n\t\t\t\t\t\tname=\"Read Mb\"\n\t\t\t\t\t/>\n\t\t\t\t\t<Area\n\t\t\t\t\t\ttype=\"monotone\"\n\t\t\t\t\t\tdataKey=\"writeMb\"\n\t\t\t\t\t\tstroke=\"#82ca9d\"\n\t\t\t\t\t\tfillOpacity={1}\n\t\t\t\t\t\tfill=\"url(#colorWrite)\"\n\t\t\t\t\t\tname=\"Write Mb\"\n\t\t\t\t\t/>\n\t\t\t\t</AreaChart>\n\t\t\t</ResponsiveContainer>\n\t\t</div>\n\t);\n};\ninterface CustomTooltipProps {\n\tactive: boolean;\n\tpayload?: {\n\t\tcolor?: string;\n\t\tdataKey?: string;\n\t\tvalue?: number;\n\t\tpayload: {\n\t\t\ttime: string;\n\t\t\treadMb: number;\n\t\t\twriteMb: number;\n\t\t};\n\t}[];\n}\n\nconst CustomTooltip = ({ active, payload }: CustomTooltipProps) => {\n\tif (active && payload && payload.length && payload[0]) {\n\t\treturn (\n\t\t\t<div className=\"custom-tooltip bg-background p-2 shadow-lg rounded-md text-primary border\">\n\t\t\t\t{payload[0].payload.time && (\n\t\t\t\t\t<p>{`Date: ${format(new Date(payload[0].payload.time), \"PPpp\")}`}</p>\n\t\t\t\t)}\n\t\t\t\t<p>{`Read ${payload[0].payload.readMb} `}</p>\n\t\t\t\t<p>{`Write: ${payload[0].payload.writeMb} `}</p>\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn null;\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/monitoring/free/container/docker-cpu-chart.tsx",
    "content": "import { format } from \"date-fns\";\nimport {\n\tArea,\n\tAreaChart,\n\tCartesianGrid,\n\tLegend,\n\tResponsiveContainer,\n\tTooltip,\n\tYAxis,\n} from \"recharts\";\nimport type { DockerStatsJSON } from \"./show-free-container-monitoring\";\n\ninterface Props {\n\tacummulativeData: DockerStatsJSON[\"cpu\"];\n}\n\nexport const DockerCpuChart = ({ acummulativeData }: Props) => {\n\tconst transformedData = acummulativeData.map((item, index) => {\n\t\treturn {\n\t\t\tname: `Point ${index + 1}`,\n\t\t\ttime: item.time,\n\t\t\tusage: item.value.toString().split(\"%\")[0],\n\t\t};\n\t});\n\treturn (\n\t\t<div className=\"mt-6 w-full h-[10rem]\">\n\t\t\t<ResponsiveContainer>\n\t\t\t\t<AreaChart\n\t\t\t\t\tdata={transformedData}\n\t\t\t\t\tmargin={{\n\t\t\t\t\t\ttop: 10,\n\t\t\t\t\t\tright: 30,\n\t\t\t\t\t\tleft: 0,\n\t\t\t\t\t\tbottom: 0,\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<defs>\n\t\t\t\t\t\t<linearGradient id=\"colorUv\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n\t\t\t\t\t\t\t<stop offset=\"5%\" stopColor=\"#27272A\" stopOpacity={0.8} />\n\t\t\t\t\t\t\t<stop offset=\"95%\" stopColor=\"white\" stopOpacity={0} />\n\t\t\t\t\t\t</linearGradient>\n\t\t\t\t\t</defs>\n\t\t\t\t\t<YAxis stroke=\"#A1A1AA\" domain={[0, 100]} />\n\t\t\t\t\t<CartesianGrid strokeDasharray=\"3 3\" stroke=\"#27272A\" />\n\t\t\t\t\t{/* @ts-ignore */}\n\t\t\t\t\t<Tooltip content={<CustomTooltip />} />\n\t\t\t\t\t<Legend />\n\t\t\t\t\t<Area\n\t\t\t\t\t\ttype=\"monotone\"\n\t\t\t\t\t\tdataKey=\"usage\"\n\t\t\t\t\t\tstroke=\"#27272A\"\n\t\t\t\t\t\tfillOpacity={1}\n\t\t\t\t\t\tfill=\"url(#colorUv)\"\n\t\t\t\t\t/>\n\t\t\t\t</AreaChart>\n\t\t\t</ResponsiveContainer>\n\t\t</div>\n\t);\n};\n\ninterface CustomTooltipProps {\n\tactive: boolean;\n\tpayload?: {\n\t\tcolor?: string;\n\t\tdataKey?: string;\n\t\tvalue?: number;\n\t\tpayload: {\n\t\t\ttime: string;\n\t\t\tusage: number;\n\t\t};\n\t}[];\n}\n\nconst CustomTooltip = ({ active, payload }: CustomTooltipProps) => {\n\tif (active && payload && payload.length && payload[0]) {\n\t\treturn (\n\t\t\t<div className=\"custom-tooltip bg-background p-2 shadow-lg rounded-md text-primary border\">\n\t\t\t\t{payload[0].payload.time && (\n\t\t\t\t\t<p>{`Date: ${format(new Date(payload[0].payload.time), \"PPpp\")}`}</p>\n\t\t\t\t)}\n\t\t\t\t<p>{`CPU Usage: ${payload[0].payload.usage}%`}</p>\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn null;\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/monitoring/free/container/docker-disk-chart.tsx",
    "content": "import { format } from \"date-fns\";\nimport {\n\tArea,\n\tAreaChart,\n\tCartesianGrid,\n\tLegend,\n\tResponsiveContainer,\n\tTooltip,\n\tYAxis,\n} from \"recharts\";\nimport type { DockerStatsJSON } from \"./show-free-container-monitoring\";\n\ninterface Props {\n\tacummulativeData: DockerStatsJSON[\"disk\"];\n\tdiskTotal: number;\n}\n\nexport const DockerDiskChart = ({ acummulativeData, diskTotal }: Props) => {\n\tconst transformedData = acummulativeData.map((item, index) => {\n\t\treturn {\n\t\t\ttime: item.time,\n\t\t\tname: `Point ${index + 1}`,\n\t\t\tusedGb: +item.value.diskUsage,\n\t\t\ttotalGb: +item.value.diskTotal,\n\t\t\tfreeGb: item.value.diskFree,\n\t\t};\n\t});\n\n\treturn (\n\t\t<div className=\"mt-6 w-full h-[10rem]\">\n\t\t\t<ResponsiveContainer>\n\t\t\t\t<AreaChart\n\t\t\t\t\tdata={transformedData}\n\t\t\t\t\tmargin={{\n\t\t\t\t\t\ttop: 10,\n\t\t\t\t\t\tright: 30,\n\t\t\t\t\t\tleft: 0,\n\t\t\t\t\t\tbottom: 0,\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<defs>\n\t\t\t\t\t\t<linearGradient id=\"colorUsed\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n\t\t\t\t\t\t\t<stop offset=\"5%\" stopColor=\"#6C28D9\" stopOpacity={0.8} />\n\t\t\t\t\t\t\t<stop offset=\"95%\" stopColor=\"#6C28D9\" stopOpacity={0} />\n\t\t\t\t\t\t</linearGradient>\n\t\t\t\t\t\t<linearGradient id=\"colorFree\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n\t\t\t\t\t\t\t<stop offset=\"5%\" stopColor=\"#6C28D9\" stopOpacity={0.2} />\n\t\t\t\t\t\t\t<stop offset=\"95%\" stopColor=\"#6C28D9\" stopOpacity={0} />\n\t\t\t\t\t\t</linearGradient>\n\t\t\t\t\t</defs>\n\t\t\t\t\t<YAxis stroke=\"#A1A1AA\" domain={[0, diskTotal]} />\n\t\t\t\t\t<CartesianGrid strokeDasharray=\"3 3\" stroke=\"#27272A\" />\n\t\t\t\t\t{/* @ts-ignore */}\n\t\t\t\t\t<Tooltip content={<CustomTooltip />} />\n\t\t\t\t\t<Legend />\n\t\t\t\t\t<Area\n\t\t\t\t\t\ttype=\"monotone\"\n\t\t\t\t\t\tdataKey=\"usedGb\"\n\t\t\t\t\t\tstroke=\"#6C28D9\"\n\t\t\t\t\t\tfillOpacity={1}\n\t\t\t\t\t\tfill=\"url(#colorUsed)\"\n\t\t\t\t\t\tname=\"Used GB\"\n\t\t\t\t\t/>\n\t\t\t\t\t<Area\n\t\t\t\t\t\ttype=\"monotone\"\n\t\t\t\t\t\tdataKey=\"freeGb\"\n\t\t\t\t\t\tstroke=\"#8884d8\"\n\t\t\t\t\t\tfillOpacity={1}\n\t\t\t\t\t\tfill=\"url(#colorFree)\"\n\t\t\t\t\t\tname=\"Free GB\"\n\t\t\t\t\t/>\n\t\t\t\t</AreaChart>\n\t\t\t</ResponsiveContainer>\n\t\t</div>\n\t);\n};\ninterface CustomTooltipProps {\n\tactive: boolean;\n\tpayload?: {\n\t\tcolor?: string;\n\t\tdataKey?: string;\n\t\tvalue?: number;\n\t\tpayload: {\n\t\t\ttime: string;\n\t\t\tusedGb: number;\n\t\t\tfreeGb: number;\n\t\t\ttotalGb: number;\n\t\t};\n\t}[];\n}\n\nconst CustomTooltip = ({ active, payload }: CustomTooltipProps) => {\n\tif (active && payload && payload.length && payload[0]) {\n\t\treturn (\n\t\t\t<div className=\"custom-tooltip bg-background p-2 shadow-lg rounded-md text-primary border\">\n\t\t\t\t<p>{`Date: ${format(new Date(payload[0].payload.time), \"PPpp\")}`}</p>\n\t\t\t\t<p>{`Disk usage: ${payload[0].payload.usedGb} GB`}</p>\n\t\t\t\t<p>{`Disk free: ${payload[0].payload.freeGb} GB`}</p>\n\t\t\t\t<p>{`Total disk: ${payload[0].payload.totalGb} GB`}</p>\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn null;\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/monitoring/free/container/docker-memory-chart.tsx",
    "content": "import { format } from \"date-fns\";\nimport {\n\tArea,\n\tAreaChart,\n\tCartesianGrid,\n\tLegend,\n\tResponsiveContainer,\n\tTooltip,\n\tYAxis,\n} from \"recharts\";\nimport type { DockerStatsJSON } from \"./show-free-container-monitoring\";\nimport { convertMemoryToBytes } from \"./show-free-container-monitoring\";\n\ninterface Props {\n\tacummulativeData: DockerStatsJSON[\"memory\"];\n\tmemoryLimitGB: number;\n}\n\nexport const DockerMemoryChart = ({\n\tacummulativeData,\n\tmemoryLimitGB,\n}: Props) => {\n\tconst transformedData = acummulativeData.map((item, index) => {\n\t\treturn {\n\t\t\ttime: item.time,\n\t\t\tname: `Point ${index + 1}`,\n\t\t\t// @ts-ignore\n\t\t\tusage: (convertMemoryToBytes(item.value.used) / 1024 ** 3).toFixed(2),\n\t\t};\n\t});\n\treturn (\n\t\t<div className=\"mt-6 w-full h-[10rem]\">\n\t\t\t<ResponsiveContainer>\n\t\t\t\t<AreaChart\n\t\t\t\t\tdata={transformedData}\n\t\t\t\t\tmargin={{\n\t\t\t\t\t\ttop: 10,\n\t\t\t\t\t\tright: 30,\n\t\t\t\t\t\tleft: 0,\n\t\t\t\t\t\tbottom: 0,\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<defs>\n\t\t\t\t\t\t<linearGradient id=\"colorUv\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n\t\t\t\t\t\t\t<stop offset=\"5%\" stopColor=\"#27272A\" stopOpacity={0.8} />\n\t\t\t\t\t\t\t<stop offset=\"95%\" stopColor=\"white\" stopOpacity={0} />\n\t\t\t\t\t\t</linearGradient>\n\t\t\t\t\t</defs>\n\t\t\t\t\t<YAxis stroke=\"#A1A1AA\" domain={[0, +memoryLimitGB.toFixed(2)]} />\n\t\t\t\t\t<CartesianGrid strokeDasharray=\"3 3\" stroke=\"#27272A\" />\n\t\t\t\t\t{/* @ts-ignore */}\n\t\t\t\t\t<Tooltip content={<CustomTooltip />} />\n\t\t\t\t\t<Legend />\n\t\t\t\t\t<Area\n\t\t\t\t\t\ttype=\"monotone\"\n\t\t\t\t\t\tdataKey=\"usage\"\n\t\t\t\t\t\tstroke=\"#27272A\"\n\t\t\t\t\t\tfillOpacity={1}\n\t\t\t\t\t\tfill=\"url(#colorUv)\"\n\t\t\t\t\t/>\n\t\t\t\t</AreaChart>\n\t\t\t</ResponsiveContainer>\n\t\t</div>\n\t);\n};\ninterface CustomTooltipProps {\n\tactive: boolean;\n\tpayload?: {\n\t\tcolor?: string;\n\t\tdataKey?: string;\n\t\tvalue?: number;\n\t\tpayload: {\n\t\t\ttime: string;\n\t\t\tusage: number;\n\t\t};\n\t}[];\n}\n\nconst CustomTooltip = ({ active, payload }: CustomTooltipProps) => {\n\tif (active && payload && payload.length && payload[0] && payload[0].payload) {\n\t\treturn (\n\t\t\t<div className=\"custom-tooltip bg-background p-2 shadow-lg rounded-md text-primary border\">\n\t\t\t\t{payload[0].payload.time && (\n\t\t\t\t\t<p>{`Date: ${format(new Date(payload[0].payload.time), \"PPpp\")}`}</p>\n\t\t\t\t)}\n\n\t\t\t\t<p>{`Memory usage: ${payload[0].payload.usage} GB`}</p>\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn null;\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/monitoring/free/container/docker-network-chart.tsx",
    "content": "import { format } from \"date-fns\";\nimport {\n\tArea,\n\tAreaChart,\n\tCartesianGrid,\n\tLegend,\n\tResponsiveContainer,\n\tTooltip,\n\tYAxis,\n} from \"recharts\";\nimport type { DockerStatsJSON } from \"./show-free-container-monitoring\";\n\ninterface Props {\n\tacummulativeData: DockerStatsJSON[\"network\"];\n}\n\nexport const DockerNetworkChart = ({ acummulativeData }: Props) => {\n\tconst transformedData = acummulativeData.map((item, index) => {\n\t\treturn {\n\t\t\ttime: item.time,\n\t\t\tname: `Point ${index + 1}`,\n\t\t\tinMB: item.value.inputMb,\n\t\t\toutMB: item.value.outputMb,\n\t\t};\n\t});\n\treturn (\n\t\t<div className=\"mt-6 w-full h-[10rem]\">\n\t\t\t<ResponsiveContainer>\n\t\t\t\t<AreaChart\n\t\t\t\t\tdata={transformedData}\n\t\t\t\t\tmargin={{\n\t\t\t\t\t\ttop: 10,\n\t\t\t\t\t\tright: 30,\n\t\t\t\t\t\tleft: 0,\n\t\t\t\t\t\tbottom: 0,\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<defs>\n\t\t\t\t\t\t<linearGradient id=\"colorUv\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n\t\t\t\t\t\t\t<stop offset=\"5%\" stopColor=\"#27272A\" stopOpacity={0.8} />\n\t\t\t\t\t\t\t<stop offset=\"95%\" stopColor=\"white\" stopOpacity={0} />\n\t\t\t\t\t\t</linearGradient>\n\t\t\t\t\t</defs>\n\t\t\t\t\t<YAxis stroke=\"#A1A1AA\" />\n\t\t\t\t\t<CartesianGrid strokeDasharray=\"3 3\" stroke=\"#27272A\" />\n\t\t\t\t\t{/* @ts-ignore */}\n\t\t\t\t\t<Tooltip content={<CustomTooltip />} />\n\t\t\t\t\t<Legend />\n\t\t\t\t\t<Area\n\t\t\t\t\t\ttype=\"monotone\"\n\t\t\t\t\t\tdataKey=\"inMB\"\n\t\t\t\t\t\tstroke=\"#8884d8\"\n\t\t\t\t\t\tfillOpacity={1}\n\t\t\t\t\t\tfill=\"url(#colorUv)\"\n\t\t\t\t\t\tname=\"In MB\"\n\t\t\t\t\t/>\n\t\t\t\t\t<Area\n\t\t\t\t\t\ttype=\"monotone\"\n\t\t\t\t\t\tdataKey=\"outMB\"\n\t\t\t\t\t\tstroke=\"#82ca9d\"\n\t\t\t\t\t\tfillOpacity={1}\n\t\t\t\t\t\tfill=\"url(#colorUv)\"\n\t\t\t\t\t\tname=\"Out MB\"\n\t\t\t\t\t/>\n\t\t\t\t</AreaChart>\n\t\t\t</ResponsiveContainer>\n\t\t</div>\n\t);\n};\n\ninterface CustomTooltipProps {\n\tactive: boolean;\n\tpayload?: {\n\t\tcolor?: string;\n\t\tdataKey?: string;\n\t\tvalue?: number;\n\t\tpayload: {\n\t\t\ttime: string;\n\t\t\tinMB: number;\n\t\t\toutMB: number;\n\t\t};\n\t}[];\n}\n\nconst CustomTooltip = ({ active, payload }: CustomTooltipProps) => {\n\tif (active && payload && payload.length && payload[0]) {\n\t\treturn (\n\t\t\t<div className=\"custom-tooltip bg-background p-2 shadow-lg rounded-md text-primary border\">\n\t\t\t\t{payload[0].payload.time && (\n\t\t\t\t\t<p>{`Date: ${format(new Date(payload[0].payload.time), \"PPpp\")}`}</p>\n\t\t\t\t)}\n\t\t\t\t<p>{`In  Usage: ${payload[0].payload.inMB} `}</p>\n\t\t\t\t<p>{`Out  Usage: ${payload[0].payload.outMB} `}</p>\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn null;\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/monitoring/free/container/show-free-compose-monitoring.tsx",
    "content": "import { Loader2 } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { toast } from \"sonner\";\nimport { badgeStateColor } from \"@/components/dashboard/application/logs/show\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport { Label } from \"@/components/ui/label\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectGroup,\n\tSelectItem,\n\tSelectLabel,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { api } from \"@/utils/api\";\nimport { ContainerFreeMonitoring } from \"./show-free-container-monitoring\";\n\ninterface Props {\n\tappName: string;\n\tserverId?: string;\n\tappType: \"stack\" | \"docker-compose\";\n}\n\nexport const ComposeFreeMonitoring = ({\n\tappName,\n\tappType = \"stack\",\n\tserverId,\n}: Props) => {\n\tconst { data, isPending } = api.docker.getContainersByAppNameMatch.useQuery(\n\t\t{\n\t\t\tappName: appName,\n\t\t\tappType,\n\t\t\tserverId,\n\t\t},\n\t\t{\n\t\t\tenabled: !!appName,\n\t\t},\n\t);\n\n\tconst [containerAppName, setContainerAppName] = useState<\n\t\tstring | undefined\n\t>();\n\n\tconst [containerId, setContainerId] = useState<string | undefined>();\n\n\tconst { mutateAsync: restart, isPending: isRestarting } =\n\t\tapi.docker.restartContainer.useMutation();\n\n\tuseEffect(() => {\n\t\tif (data && data?.length > 0) {\n\t\t\tsetContainerAppName(data[0]?.name);\n\t\t\tsetContainerId(data[0]?.containerId);\n\t\t}\n\t}, [data]);\n\n\treturn (\n\t\t<>\n\t\t\t<CardHeader>\n\t\t\t\t<CardTitle className=\"text-xl\">Monitoring</CardTitle>\n\t\t\t\t<CardDescription>Watch the usage of your compose</CardDescription>\n\t\t\t</CardHeader>\n\t\t\t<CardContent className=\"flex flex-col gap-4\">\n\t\t\t\t<Label>Select a container to watch the monitoring</Label>\n\t\t\t\t<div className=\"flex flex-row gap-4\">\n\t\t\t\t\t<Select\n\t\t\t\t\t\tonValueChange={(value) => {\n\t\t\t\t\t\t\tsetContainerAppName(value);\n\t\t\t\t\t\t\tsetContainerId(\n\t\t\t\t\t\t\t\tdata?.find((container) => container.name === value)\n\t\t\t\t\t\t\t\t\t?.containerId,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tvalue={containerAppName}\n\t\t\t\t\t>\n\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t{isPending ? (\n\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-2 items-center justify-center text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t<span>Loading...</span>\n\t\t\t\t\t\t\t\t\t<Loader2 className=\"animate-spin size-4\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a container\" />\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t<SelectGroup>\n\t\t\t\t\t\t\t\t{data?.map((container) => (\n\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\tkey={container.containerId}\n\t\t\t\t\t\t\t\t\t\tvalue={container.name}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{container.name} ({container.containerId}){\" \"}\n\t\t\t\t\t\t\t\t\t\t<Badge variant={badgeStateColor(container.state)}>\n\t\t\t\t\t\t\t\t\t\t\t{container.state}\n\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t<SelectLabel>Containers ({data?.length})</SelectLabel>\n\t\t\t\t\t\t\t</SelectGroup>\n\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t</Select>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tisLoading={isRestarting}\n\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\tif (!containerId) return;\n\t\t\t\t\t\t\ttoast.success(`Restarting container ${containerAppName}`);\n\t\t\t\t\t\t\tawait restart({ containerId }).then(() => {\n\t\t\t\t\t\t\t\ttoast.success(\"Container restarted\");\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tRestart\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t\t<ContainerFreeMonitoring\n\t\t\t\t\tappName={containerAppName || \"\"}\n\t\t\t\t\tappType={appType}\n\t\t\t\t/>\n\t\t\t</CardContent>\n\t\t</>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/monitoring/free/container/show-free-container-monitoring.tsx",
    "content": "import { useEffect, useState } from \"react\";\nimport { Card, CardContent, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport { Progress } from \"@/components/ui/progress\";\nimport { api } from \"@/utils/api\";\nimport { DockerBlockChart } from \"./docker-block-chart\";\nimport { DockerCpuChart } from \"./docker-cpu-chart\";\nimport { DockerDiskChart } from \"./docker-disk-chart\";\nimport { DockerMemoryChart } from \"./docker-memory-chart\";\nimport { DockerNetworkChart } from \"./docker-network-chart\";\n\nconst defaultData = {\n\tcpu: {\n\t\tvalue: \"0%\",\n\t\ttime: \"\",\n\t},\n\tmemory: {\n\t\tvalue: {\n\t\t\tused: 0,\n\t\t\ttotal: 0,\n\t\t},\n\t\ttime: \"\",\n\t},\n\tblock: {\n\t\tvalue: {\n\t\t\treadMb: 0,\n\t\t\twriteMb: 0,\n\t\t},\n\t\ttime: \"\",\n\t},\n\tnetwork: {\n\t\tvalue: {\n\t\t\tinputMb: 0,\n\t\t\toutputMb: 0,\n\t\t},\n\t\ttime: \"\",\n\t},\n\tdisk: {\n\t\tvalue: { diskTotal: 0, diskUsage: 0, diskUsedPercentage: 0, diskFree: 0 },\n\t\ttime: \"\",\n\t},\n};\n\ninterface Props {\n\tappName: string;\n\tappType?: \"application\" | \"stack\" | \"docker-compose\";\n}\nexport interface DockerStats {\n\tcpu: {\n\t\tvalue: string;\n\t\ttime: string;\n\t};\n\tmemory: {\n\t\tvalue: {\n\t\t\tused: number;\n\t\t\ttotal: number;\n\t\t};\n\t\ttime: string;\n\t};\n\tblock: {\n\t\tvalue: {\n\t\t\treadMb: number;\n\t\t\twriteMb: number;\n\t\t};\n\t\ttime: string;\n\t};\n\tnetwork: {\n\t\tvalue: {\n\t\t\tinputMb: number;\n\t\t\toutputMb: number;\n\t\t};\n\t\ttime: string;\n\t};\n\tdisk: {\n\t\tvalue: {\n\t\t\tdiskTotal: number;\n\t\t\tdiskUsage: number;\n\t\t\tdiskUsedPercentage: number;\n\t\t\tdiskFree: number;\n\t\t};\n\n\t\ttime: string;\n\t};\n}\n\nexport type DockerStatsJSON = {\n\tcpu: DockerStats[\"cpu\"][];\n\tmemory: DockerStats[\"memory\"][];\n\tblock: DockerStats[\"block\"][];\n\tnetwork: DockerStats[\"network\"][];\n\tdisk: DockerStats[\"disk\"][];\n};\n\nexport const convertMemoryToBytes = (\n\tmemoryString: string | undefined,\n): number => {\n\tif (!memoryString || typeof memoryString !== \"string\") {\n\t\treturn 0;\n\t}\n\n\tconst value = Number.parseFloat(memoryString) || 0;\n\tconst unit = memoryString.replace(/[0-9.]/g, \"\").trim();\n\n\tswitch (unit) {\n\t\tcase \"KiB\":\n\t\t\treturn value * 1024;\n\t\tcase \"MiB\":\n\t\t\treturn value * 1024 * 1024;\n\t\tcase \"GiB\":\n\t\t\treturn value * 1024 * 1024 * 1024;\n\t\tcase \"TiB\":\n\t\t\treturn value * 1024 * 1024 * 1024 * 1024;\n\t\tdefault:\n\t\t\treturn value;\n\t}\n};\n\nexport const ContainerFreeMonitoring = ({\n\tappName,\n\tappType = \"application\",\n}: Props) => {\n\tconst { data } = api.application.readAppMonitoring.useQuery(\n\t\t{ appName },\n\t\t{\n\t\t\trefetchOnWindowFocus: false,\n\t\t},\n\t);\n\tconst [acummulativeData, setAcummulativeData] = useState<DockerStatsJSON>({\n\t\tcpu: [],\n\t\tmemory: [],\n\t\tblock: [],\n\t\tnetwork: [],\n\t\tdisk: [],\n\t});\n\tconst [currentData, setCurrentData] = useState<DockerStats>(defaultData);\n\n\tuseEffect(() => {\n\t\tsetCurrentData(defaultData);\n\n\t\tsetAcummulativeData({\n\t\t\tcpu: [],\n\t\t\tmemory: [],\n\t\t\tblock: [],\n\t\t\tnetwork: [],\n\t\t\tdisk: [],\n\t\t});\n\t}, [appName]);\n\n\tuseEffect(() => {\n\t\tif (!data) return;\n\n\t\tsetCurrentData({\n\t\t\tcpu: data.cpu[data.cpu.length - 1] ?? currentData.cpu,\n\t\t\tmemory: data.memory[data.memory.length - 1] ?? currentData.memory,\n\t\t\tblock: data.block[data.block.length - 1] ?? currentData.block,\n\t\t\tnetwork: data.network[data.network.length - 1] ?? currentData.network,\n\t\t\tdisk: data.disk[data.disk.length - 1] ?? currentData.disk,\n\t\t});\n\t\tsetAcummulativeData({\n\t\t\tblock: data?.block || [],\n\t\t\tcpu: data?.cpu || [],\n\t\t\tdisk: data?.disk || [],\n\t\t\tmemory: data?.memory || [],\n\t\t\tnetwork: data?.network || [],\n\t\t});\n\t}, [data]);\n\n\tuseEffect(() => {\n\t\tconst protocol = window.location.protocol === \"https:\" ? \"wss:\" : \"ws:\";\n\t\tconst wsUrl = `${protocol}//${window.location.host}/listen-docker-stats-monitoring?appName=${appName}&appType=${appType}`;\n\t\tconst ws = new WebSocket(wsUrl);\n\n\t\tws.onmessage = (e) => {\n\t\t\tconst value = JSON.parse(e.data);\n\t\t\tif (!value) return;\n\n\t\t\tconst data = {\n\t\t\t\tcpu: value.data.cpu ?? currentData.cpu,\n\t\t\t\tmemory: value.data.memory ?? currentData.memory,\n\t\t\t\tblock: value.data.block ?? currentData.block,\n\t\t\t\tdisk: value.data.disk ?? currentData.disk,\n\t\t\t\tnetwork: value.data.network ?? currentData.network,\n\t\t\t};\n\n\t\t\tsetCurrentData(data);\n\n\t\t\tconst MAX_DATA_POINTS = 300;\n\t\t\tsetAcummulativeData((prevData) => ({\n\t\t\t\tcpu: [...prevData.cpu, data.cpu].slice(-MAX_DATA_POINTS),\n\t\t\t\tmemory: [...prevData.memory, data.memory].slice(-MAX_DATA_POINTS),\n\t\t\t\tblock: [...prevData.block, data.block].slice(-MAX_DATA_POINTS),\n\t\t\t\tnetwork: [...prevData.network, data.network].slice(-MAX_DATA_POINTS),\n\t\t\t\tdisk: [...prevData.disk, data.disk].slice(-MAX_DATA_POINTS),\n\t\t\t}));\n\t\t};\n\n\t\tws.onclose = (e) => {\n\t\t\tconsole.log(e.reason);\n\t\t};\n\n\t\treturn () => ws.close();\n\t}, [appName]);\n\n\treturn (\n\t\t<div className=\"rounded-xl bg-background flex flex-col gap-4\">\n\t\t\t<header className=\"flex items-center justify-between\">\n\t\t\t\t<div className=\"space-y-1\">\n\t\t\t\t\t<h1 className=\"text-2xl font-semibold tracking-tight\">Monitoring</h1>\n\t\t\t\t\t<p className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\tWatch the usage of your server in the current app\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t</header>\n\n\t\t\t<div className=\"grid gap-6 lg:grid-cols-2\">\n\t\t\t\t<Card className=\"bg-background\">\n\t\t\t\t\t<CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n\t\t\t\t\t\t<CardTitle className=\"text-sm font-medium\">CPU Usage</CardTitle>\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<CardContent>\n\t\t\t\t\t\t<div className=\"flex flex-col gap-2 w-full\">\n\t\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\tUsed: {currentData.cpu.value}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<Progress\n\t\t\t\t\t\t\t\tvalue={Number.parseInt(\n\t\t\t\t\t\t\t\t\tcurrentData.cpu.value.replace(\"%\", \"\"),\n\t\t\t\t\t\t\t\t\t10,\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\tclassName=\"w-[100%]\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<DockerCpuChart acummulativeData={acummulativeData.cpu} />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</CardContent>\n\t\t\t\t</Card>\n\t\t\t\t<Card className=\"bg-background\">\n\t\t\t\t\t<CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n\t\t\t\t\t\t<CardTitle className=\"text-sm font-medium\">Memory Usage</CardTitle>\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<CardContent>\n\t\t\t\t\t\t<div className=\"flex flex-col gap-2 w-full\">\n\t\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t{`Used:  ${currentData.memory.value.used} / Limit: ${currentData.memory.value.total} `}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<Progress\n\t\t\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t\t\t// @ts-ignore\n\t\t\t\t\t\t\t\t\t(convertMemoryToBytes(currentData.memory.value.used) /\n\t\t\t\t\t\t\t\t\t\t// @ts-ignore\n\t\t\t\t\t\t\t\t\t\tconvertMemoryToBytes(currentData.memory.value.total)) *\n\t\t\t\t\t\t\t\t\t100\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tclassName=\"w-[100%]\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<DockerMemoryChart\n\t\t\t\t\t\t\t\tacummulativeData={acummulativeData.memory}\n\t\t\t\t\t\t\t\tmemoryLimitGB={\n\t\t\t\t\t\t\t\t\t// @ts-ignore\n\t\t\t\t\t\t\t\t\tconvertMemoryToBytes(currentData.memory.value.total) /\n\t\t\t\t\t\t\t\t\t1024 ** 3\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</CardContent>\n\t\t\t\t</Card>\n\t\t\t\t{appName === \"dokploy\" && (\n\t\t\t\t\t<Card className=\"bg-background\">\n\t\t\t\t\t\t<CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n\t\t\t\t\t\t\t<CardTitle className=\"text-sm font-medium\">Disk Space</CardTitle>\n\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t<CardContent>\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2 w-full\">\n\t\t\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t{`Used:  ${currentData.disk.value.diskUsage} GB / Limit: ${currentData.disk.value.diskTotal} GB`}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<Progress\n\t\t\t\t\t\t\t\t\tvalue={currentData.disk.value.diskUsedPercentage}\n\t\t\t\t\t\t\t\t\tclassName=\"w-[100%]\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<DockerDiskChart\n\t\t\t\t\t\t\t\t\tacummulativeData={acummulativeData.disk}\n\t\t\t\t\t\t\t\t\tdiskTotal={currentData.disk.value.diskTotal}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t</Card>\n\t\t\t\t)}\n\n\t\t\t\t<Card className=\"bg-background\">\n\t\t\t\t\t<CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n\t\t\t\t\t\t<CardTitle className=\"text-sm font-medium\">Block I/O</CardTitle>\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<CardContent>\n\t\t\t\t\t\t<div className=\"flex flex-col gap-2 w-full\">\n\t\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t{`Read:  ${currentData.block.value.readMb}  / Write: ${currentData.block.value.writeMb} `}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<DockerBlockChart acummulativeData={acummulativeData.block} />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</CardContent>\n\t\t\t\t</Card>\n\t\t\t\t<Card className=\"bg-background\">\n\t\t\t\t\t<CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n\t\t\t\t\t\t<CardTitle className=\"text-sm font-medium\">Network I/O</CardTitle>\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<CardContent>\n\t\t\t\t\t\t<div className=\"flex flex-col gap-2 w-full\">\n\t\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t{`In MB: ${currentData.network.value.inputMb}  / Out MB: ${currentData.network.value.outputMb} `}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<DockerNetworkChart acummulativeData={acummulativeData.network} />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</CardContent>\n\t\t\t\t</Card>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/monitoring/paid/container/container-block-chart.tsx",
    "content": "import { Area, AreaChart, CartesianGrid, XAxis, YAxis } from \"recharts\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\ttype ChartConfig,\n\tChartContainer,\n\tChartLegend,\n\tChartLegendContent,\n\tChartTooltip,\n} from \"@/components/ui/chart\";\nimport { formatTimestamp } from \"@/lib/utils\";\n\ninterface ContainerMetric {\n\ttimestamp: string;\n\tBlockIO: {\n\t\tread: number;\n\t\twrite: number;\n\t\treadUnit: string;\n\t\twriteUnit: string;\n\t};\n}\n\ninterface Props {\n\tdata: ContainerMetric[];\n}\n\nconst chartConfig = {\n\tread: {\n\t\tlabel: \"Read\",\n\t\tcolor: \"hsl(217, 91%, 60%)\", // Azul brillante\n\t},\n\twrite: {\n\t\tlabel: \"Write\",\n\t\tcolor: \"hsl(142, 71%, 45%)\", // Verde brillante\n\t},\n} satisfies ChartConfig;\n\nexport const ContainerBlockChart = ({ data }: Props) => {\n\tconst formattedData = data.map((metric) => ({\n\t\ttimestamp: metric.timestamp,\n\t\tread: metric.BlockIO.read,\n\t\twrite: metric.BlockIO.write,\n\t\treadUnit: metric.BlockIO.readUnit,\n\t\twriteUnit: metric.BlockIO.writeUnit,\n\t}));\n\n\tconst latestData = formattedData[formattedData.length - 1] || {\n\t\ttimestamp: \"\",\n\t\tread: 0,\n\t\twrite: 0,\n\t\treadUnit: \"B\",\n\t\twriteUnit: \"B\",\n\t};\n\n\treturn (\n\t\t<Card className=\"bg-transparent\">\n\t\t\t<CardHeader className=\"border-b py-5\">\n\t\t\t\t<CardTitle>Block I/O</CardTitle>\n\t\t\t\t<CardDescription>\n\t\t\t\t\tRead: {latestData.read}\n\t\t\t\t\t{latestData.readUnit} / Write: {latestData.write}\n\t\t\t\t\t{latestData.writeUnit}\n\t\t\t\t</CardDescription>\n\t\t\t</CardHeader>\n\t\t\t<CardContent className=\"px-2 pt-4 sm:px-6 sm:pt-6\">\n\t\t\t\t<ChartContainer\n\t\t\t\t\tconfig={chartConfig}\n\t\t\t\t\tclassName=\"aspect-auto h-[250px] w-full\"\n\t\t\t\t>\n\t\t\t\t\t<AreaChart data={formattedData}>\n\t\t\t\t\t\t<defs>\n\t\t\t\t\t\t\t<linearGradient id=\"fillRead\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n\t\t\t\t\t\t\t\t<stop\n\t\t\t\t\t\t\t\t\toffset=\"5%\"\n\t\t\t\t\t\t\t\t\tstopColor=\"hsl(217, 91%, 60%)\"\n\t\t\t\t\t\t\t\t\tstopOpacity={0.3}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<stop\n\t\t\t\t\t\t\t\t\toffset=\"95%\"\n\t\t\t\t\t\t\t\t\tstopColor=\"hsl(217, 91%, 60%)\"\n\t\t\t\t\t\t\t\t\tstopOpacity={0.1}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</linearGradient>\n\t\t\t\t\t\t\t<linearGradient id=\"fillWrite\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n\t\t\t\t\t\t\t\t<stop\n\t\t\t\t\t\t\t\t\toffset=\"5%\"\n\t\t\t\t\t\t\t\t\tstopColor=\"hsl(142, 71%, 45%)\"\n\t\t\t\t\t\t\t\t\tstopOpacity={0.3}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<stop\n\t\t\t\t\t\t\t\t\toffset=\"95%\"\n\t\t\t\t\t\t\t\t\tstopColor=\"hsl(142, 71%, 45%)\"\n\t\t\t\t\t\t\t\t\tstopOpacity={0.1}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</linearGradient>\n\t\t\t\t\t\t</defs>\n\t\t\t\t\t\t<CartesianGrid vertical={false} />\n\t\t\t\t\t\t<XAxis\n\t\t\t\t\t\t\tdataKey=\"timestamp\"\n\t\t\t\t\t\t\ttickLine={false}\n\t\t\t\t\t\t\taxisLine={false}\n\t\t\t\t\t\t\ttickMargin={8}\n\t\t\t\t\t\t\tminTickGap={32}\n\t\t\t\t\t\t\ttickFormatter={(value) => formatTimestamp(value)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<YAxis />\n\t\t\t\t\t\t<ChartTooltip\n\t\t\t\t\t\t\tcursor={false}\n\t\t\t\t\t\t\tcontent={({ active, payload, label }) => {\n\t\t\t\t\t\t\t\tif (active && payload && payload.length) {\n\t\t\t\t\t\t\t\t\tconst data = payload?.[0]?.payload;\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<div className=\"rounded-lg border bg-background p-2 shadow-sm\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"grid grid-cols-2 gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-[0.70rem] uppercase text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tTime\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-bold\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{formatTimestamp(label)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-[0.70rem] uppercase text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tRead\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-bold\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{data.read}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{data.readUnit}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-[0.70rem] uppercase text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tWrite\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-bold\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{data.write}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{data.writeUnit}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Area\n\t\t\t\t\t\t\tname=\"Write\"\n\t\t\t\t\t\t\tdataKey=\"write\"\n\t\t\t\t\t\t\ttype=\"monotone\"\n\t\t\t\t\t\t\tfill=\"url(#fillWrite)\"\n\t\t\t\t\t\t\tstroke=\"hsl(142, 71%, 45%)\"\n\t\t\t\t\t\t\tstrokeWidth={2}\n\t\t\t\t\t\t\tfillOpacity={0.3}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Area\n\t\t\t\t\t\t\tname=\"Read\"\n\t\t\t\t\t\t\tdataKey=\"read\"\n\t\t\t\t\t\t\ttype=\"monotone\"\n\t\t\t\t\t\t\tfill=\"url(#fillRead)\"\n\t\t\t\t\t\t\tstroke=\"hsl(217, 91%, 60%)\"\n\t\t\t\t\t\t\tstrokeWidth={2}\n\t\t\t\t\t\t\tfillOpacity={0.3}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ChartLegend\n\t\t\t\t\t\t\tcontent={<ChartLegendContent />}\n\t\t\t\t\t\t\tverticalAlign=\"bottom\"\n\t\t\t\t\t\t\talign=\"center\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</AreaChart>\n\t\t\t\t</ChartContainer>\n\t\t\t</CardContent>\n\t\t</Card>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/monitoring/paid/container/container-cpu-chart.tsx",
    "content": "import { Area, AreaChart, CartesianGrid, XAxis, YAxis } from \"recharts\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\ttype ChartConfig,\n\tChartContainer,\n\tChartLegend,\n\tChartLegendContent,\n\tChartTooltip,\n} from \"@/components/ui/chart\";\nimport { formatTimestamp } from \"@/lib/utils\";\n\ninterface ContainerMetric {\n\ttimestamp: string;\n\tCPU: number;\n}\n\ninterface Props {\n\tdata: ContainerMetric[];\n}\n\nconst chartConfig = {\n\tcpu: {\n\t\tlabel: \"CPU\",\n\t\tcolor: \"hsl(var(--chart-1))\",\n\t},\n} satisfies ChartConfig;\n\nexport const ContainerCPUChart = ({ data }: Props) => {\n\tconst formattedData = data.map((metric) => ({\n\t\ttimestamp: metric.timestamp,\n\t\tcpu: metric.CPU,\n\t}));\n\n\tconst latestData = formattedData[formattedData.length - 1] || {\n\t\ttimestamp: \"\",\n\t\tcpu: 0,\n\t};\n\n\treturn (\n\t\t<Card className=\"bg-transparent\">\n\t\t\t<CardHeader className=\"border-b py-5\">\n\t\t\t\t<CardTitle>CPU</CardTitle>\n\t\t\t\t<CardDescription>CPU Usage: {latestData.cpu}%</CardDescription>\n\t\t\t</CardHeader>\n\t\t\t<CardContent className=\"px-2 pt-4 sm:px-6 sm:pt-6\">\n\t\t\t\t<ChartContainer\n\t\t\t\t\tconfig={chartConfig}\n\t\t\t\t\tclassName=\"aspect-auto h-[250px] w-full\"\n\t\t\t\t>\n\t\t\t\t\t<AreaChart data={formattedData}>\n\t\t\t\t\t\t<defs>\n\t\t\t\t\t\t\t<linearGradient id=\"fillCPU\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n\t\t\t\t\t\t\t\t<stop\n\t\t\t\t\t\t\t\t\toffset=\"5%\"\n\t\t\t\t\t\t\t\t\tstopColor=\"hsl(var(--chart-1))\"\n\t\t\t\t\t\t\t\t\tstopOpacity={0.8}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<stop\n\t\t\t\t\t\t\t\t\toffset=\"95%\"\n\t\t\t\t\t\t\t\t\tstopColor=\"hsl(var(--chart-1))\"\n\t\t\t\t\t\t\t\t\tstopOpacity={0.1}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</linearGradient>\n\t\t\t\t\t\t</defs>\n\t\t\t\t\t\t<CartesianGrid vertical={false} />\n\t\t\t\t\t\t<XAxis\n\t\t\t\t\t\t\tdataKey=\"timestamp\"\n\t\t\t\t\t\t\ttickLine={false}\n\t\t\t\t\t\t\taxisLine={false}\n\t\t\t\t\t\t\ttickMargin={8}\n\t\t\t\t\t\t\tminTickGap={32}\n\t\t\t\t\t\t\ttickFormatter={(value) => formatTimestamp(value)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<YAxis tickFormatter={(value) => `${value}%`} domain={[0, 100]} />\n\t\t\t\t\t\t<ChartTooltip\n\t\t\t\t\t\t\tcursor={false}\n\t\t\t\t\t\t\tcontent={({ active, payload, label }) => {\n\t\t\t\t\t\t\t\tif (active && payload && payload.length) {\n\t\t\t\t\t\t\t\t\tconst data = payload?.[0]?.payload;\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<div className=\"rounded-lg border bg-background p-2 shadow-sm\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"grid grid-cols-2 gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-[0.70rem] uppercase text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tTime\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-bold\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{formatTimestamp(label)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-[0.70rem] uppercase text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tCPU\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-bold\">{data.cpu}%</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Area\n\t\t\t\t\t\t\tname=\"CPU\"\n\t\t\t\t\t\t\tdataKey=\"cpu\"\n\t\t\t\t\t\t\ttype=\"monotone\"\n\t\t\t\t\t\t\tfill=\"url(#fillCPU)\"\n\t\t\t\t\t\t\tstroke=\"hsl(var(--chart-1))\"\n\t\t\t\t\t\t\tstrokeWidth={2}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ChartLegend\n\t\t\t\t\t\t\tcontent={<ChartLegendContent />}\n\t\t\t\t\t\t\tverticalAlign=\"bottom\"\n\t\t\t\t\t\t\talign=\"center\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</AreaChart>\n\t\t\t\t</ChartContainer>\n\t\t\t</CardContent>\n\t\t</Card>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/monitoring/paid/container/container-memory-chart.tsx",
    "content": "import { Area, AreaChart, CartesianGrid, XAxis, YAxis } from \"recharts\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\ttype ChartConfig,\n\tChartContainer,\n\tChartLegend,\n\tChartLegendContent,\n\tChartTooltip,\n} from \"@/components/ui/chart\";\nimport { formatTimestamp } from \"@/lib/utils\";\n\ninterface ContainerMetric {\n\ttimestamp: string;\n\tMemory: {\n\t\tpercentage: number;\n\t\tused: number;\n\t\ttotal: number;\n\t\tusedUnit: string;\n\t\ttotalUnit: string;\n\t};\n}\n\ninterface Props {\n\tdata: ContainerMetric[];\n}\n\nconst chartConfig = {\n\tmemory: {\n\t\tlabel: \"Memory\",\n\t\tcolor: \"hsl(var(--chart-2))\",\n\t},\n} satisfies ChartConfig;\n\nconst formatMemoryValue = (value: number) => {\n\treturn value.toLocaleString(\"en-US\", {\n\t\tminimumFractionDigits: 1,\n\t\tmaximumFractionDigits: 2,\n\t});\n};\n\nexport const ContainerMemoryChart = ({ data }: Props) => {\n\tconst formattedData = data.map((metric) => ({\n\t\ttimestamp: metric.timestamp,\n\t\tmemory: metric.Memory.percentage,\n\t\tusage: `${formatMemoryValue(metric.Memory.used)}${metric.Memory.usedUnit} / ${formatMemoryValue(metric.Memory.total)}${metric.Memory.totalUnit}`,\n\t}));\n\n\tconst latestData = formattedData[formattedData.length - 1] || {\n\t\ttimestamp: \"\",\n\t\tmemory: 0,\n\t\tusage: \"0 / 0 B\",\n\t};\n\n\treturn (\n\t\t<Card className=\"bg-transparent\">\n\t\t\t<CardHeader className=\"border-b py-5\">\n\t\t\t\t<CardTitle>Memory</CardTitle>\n\t\t\t\t<CardDescription>Memory Usage: {latestData.usage}</CardDescription>\n\t\t\t</CardHeader>\n\t\t\t<CardContent className=\"px-2 pt-4 sm:px-6 sm:pt-6\">\n\t\t\t\t<ChartContainer\n\t\t\t\t\tconfig={chartConfig}\n\t\t\t\t\tclassName=\"aspect-auto h-[250px] w-full\"\n\t\t\t\t>\n\t\t\t\t\t<AreaChart data={formattedData}>\n\t\t\t\t\t\t<defs>\n\t\t\t\t\t\t\t<linearGradient id=\"fillMemory\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n\t\t\t\t\t\t\t\t<stop\n\t\t\t\t\t\t\t\t\toffset=\"5%\"\n\t\t\t\t\t\t\t\t\tstopColor=\"hsl(var(--chart-2))\"\n\t\t\t\t\t\t\t\t\tstopOpacity={0.8}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<stop\n\t\t\t\t\t\t\t\t\toffset=\"95%\"\n\t\t\t\t\t\t\t\t\tstopColor=\"hsl(var(--chart-2))\"\n\t\t\t\t\t\t\t\t\tstopOpacity={0.1}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</linearGradient>\n\t\t\t\t\t\t</defs>\n\t\t\t\t\t\t<CartesianGrid vertical={false} />\n\t\t\t\t\t\t<XAxis\n\t\t\t\t\t\t\tdataKey=\"timestamp\"\n\t\t\t\t\t\t\ttickLine={false}\n\t\t\t\t\t\t\taxisLine={false}\n\t\t\t\t\t\t\ttickMargin={8}\n\t\t\t\t\t\t\tminTickGap={32}\n\t\t\t\t\t\t\ttickFormatter={(value) => formatTimestamp(value)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<YAxis tickFormatter={(value) => `${value}%`} domain={[0, 100]} />\n\t\t\t\t\t\t<ChartTooltip\n\t\t\t\t\t\t\tcursor={false}\n\t\t\t\t\t\t\tcontent={({ active, payload, label }) => {\n\t\t\t\t\t\t\t\tif (active && payload && payload.length) {\n\t\t\t\t\t\t\t\t\tconst data = payload?.[0]?.payload;\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<div className=\"rounded-lg border bg-background p-2 shadow-sm\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"grid grid-cols-2 gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-[0.70rem] uppercase text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tTime\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-bold\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{formatTimestamp(label)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-[0.70rem] uppercase text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tMemory\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-bold\">{data.memory}%</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col col-span-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-[0.70rem] uppercase text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tUsage\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-bold\">{data.usage}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Area\n\t\t\t\t\t\t\tname=\"Memory\"\n\t\t\t\t\t\t\tdataKey=\"memory\"\n\t\t\t\t\t\t\ttype=\"monotone\"\n\t\t\t\t\t\t\tfill=\"url(#fillMemory)\"\n\t\t\t\t\t\t\tstroke=\"hsl(var(--chart-2))\"\n\t\t\t\t\t\t\tstrokeWidth={2}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ChartLegend\n\t\t\t\t\t\t\tcontent={<ChartLegendContent />}\n\t\t\t\t\t\t\tverticalAlign=\"bottom\"\n\t\t\t\t\t\t\talign=\"center\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</AreaChart>\n\t\t\t\t</ChartContainer>\n\t\t\t</CardContent>\n\t\t</Card>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/monitoring/paid/container/container-network-chart.tsx",
    "content": "import { Area, AreaChart, CartesianGrid, XAxis, YAxis } from \"recharts\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\ttype ChartConfig,\n\tChartContainer,\n\tChartLegend,\n\tChartLegendContent,\n\tChartTooltip,\n} from \"@/components/ui/chart\";\nimport { formatTimestamp } from \"@/lib/utils\";\n\ninterface ContainerMetric {\n\ttimestamp: string;\n\tNetwork: {\n\t\tinput: number;\n\t\toutput: number;\n\t\tinputUnit: string;\n\t\toutputUnit: string;\n\t};\n}\n\ninterface Props {\n\tdata: ContainerMetric[];\n}\n\ninterface FormattedMetric {\n\ttimestamp: string;\n\tinput: number;\n\toutput: number;\n\tinputUnit: string;\n\toutputUnit: string;\n}\n\nconst chartConfig = {\n\tinput: {\n\t\tlabel: \"Input\",\n\t\tcolor: \"hsl(var(--chart-3))\",\n\t},\n\toutput: {\n\t\tlabel: \"Output\",\n\t\tcolor: \"hsl(var(--chart-4))\",\n\t},\n} satisfies ChartConfig;\n\nexport const ContainerNetworkChart = ({ data }: Props) => {\n\tconst formattedData: FormattedMetric[] = data.map((metric) => ({\n\t\ttimestamp: metric.timestamp,\n\t\tinput: metric.Network.input,\n\t\toutput: metric.Network.output,\n\t\tinputUnit: metric.Network.inputUnit,\n\t\toutputUnit: metric.Network.outputUnit,\n\t}));\n\n\tconst latestData = formattedData[formattedData.length - 1] || {\n\t\tinput: 0,\n\t\toutput: 0,\n\t\tinputUnit: \"B\",\n\t\toutputUnit: \"B\",\n\t};\n\n\treturn (\n\t\t<Card className=\"bg-transparent\">\n\t\t\t<CardHeader className=\"border-b py-5\">\n\t\t\t\t<CardTitle>Network I/O</CardTitle>\n\t\t\t\t<CardDescription>\n\t\t\t\t\tInput: {latestData.input}\n\t\t\t\t\t{latestData.inputUnit} / Output: {latestData.output}\n\t\t\t\t\t{latestData.outputUnit}\n\t\t\t\t</CardDescription>\n\t\t\t</CardHeader>\n\t\t\t<CardContent className=\"px-2 pt-4 sm:px-6 sm:pt-6\">\n\t\t\t\t<ChartContainer\n\t\t\t\t\tconfig={chartConfig}\n\t\t\t\t\tclassName=\"aspect-auto h-[250px] w-full\"\n\t\t\t\t>\n\t\t\t\t\t<AreaChart data={formattedData}>\n\t\t\t\t\t\t<defs>\n\t\t\t\t\t\t\t<linearGradient id=\"fillInput\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n\t\t\t\t\t\t\t\t<stop\n\t\t\t\t\t\t\t\t\toffset=\"5%\"\n\t\t\t\t\t\t\t\t\tstopColor=\"hsl(var(--chart-3))\"\n\t\t\t\t\t\t\t\t\tstopOpacity={0.8}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<stop\n\t\t\t\t\t\t\t\t\toffset=\"95%\"\n\t\t\t\t\t\t\t\t\tstopColor=\"hsl(var(--chart-3))\"\n\t\t\t\t\t\t\t\t\tstopOpacity={0.1}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</linearGradient>\n\t\t\t\t\t\t\t<linearGradient id=\"fillOutput\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n\t\t\t\t\t\t\t\t<stop\n\t\t\t\t\t\t\t\t\toffset=\"5%\"\n\t\t\t\t\t\t\t\t\tstopColor=\"hsl(var(--chart-4))\"\n\t\t\t\t\t\t\t\t\tstopOpacity={0.8}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<stop\n\t\t\t\t\t\t\t\t\toffset=\"95%\"\n\t\t\t\t\t\t\t\t\tstopColor=\"hsl(var(--chart-4))\"\n\t\t\t\t\t\t\t\t\tstopOpacity={0.1}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</linearGradient>\n\t\t\t\t\t\t</defs>\n\t\t\t\t\t\t<CartesianGrid vertical={false} />\n\t\t\t\t\t\t<XAxis\n\t\t\t\t\t\t\tdataKey=\"timestamp\"\n\t\t\t\t\t\t\ttickLine={false}\n\t\t\t\t\t\t\taxisLine={false}\n\t\t\t\t\t\t\ttickMargin={8}\n\t\t\t\t\t\t\tminTickGap={32}\n\t\t\t\t\t\t\ttickFormatter={(value) => formatTimestamp(value)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<YAxis />\n\t\t\t\t\t\t<ChartTooltip\n\t\t\t\t\t\t\tcursor={false}\n\t\t\t\t\t\t\tcontent={({ active, payload, label }) => {\n\t\t\t\t\t\t\t\tif (active && payload && payload.length) {\n\t\t\t\t\t\t\t\t\tconst data = payload?.[0]?.payload;\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<div className=\"rounded-lg border bg-background p-2 shadow-sm\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"grid grid-cols-2 gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-[0.70rem] uppercase text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tTime\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-bold\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{formatTimestamp(label)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-[0.70rem] uppercase text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tInput\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-bold\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{data.input}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{data.inputUnit}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-[0.70rem] uppercase text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOutput\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-bold\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{data.output}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{data.outputUnit}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Area\n\t\t\t\t\t\t\tname=\"Input\"\n\t\t\t\t\t\t\tdataKey=\"input\"\n\t\t\t\t\t\t\ttype=\"monotone\"\n\t\t\t\t\t\t\tfill=\"url(#fillInput)\"\n\t\t\t\t\t\t\tstroke=\"hsl(var(--chart-3))\"\n\t\t\t\t\t\t\tstrokeWidth={2}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Area\n\t\t\t\t\t\t\tname=\"Output\"\n\t\t\t\t\t\t\tdataKey=\"output\"\n\t\t\t\t\t\t\ttype=\"monotone\"\n\t\t\t\t\t\t\tfill=\"url(#fillOutput)\"\n\t\t\t\t\t\t\tstroke=\"hsl(var(--chart-4))\"\n\t\t\t\t\t\t\tstrokeWidth={2}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ChartLegend\n\t\t\t\t\t\t\tcontent={<ChartLegendContent />}\n\t\t\t\t\t\t\tverticalAlign=\"bottom\"\n\t\t\t\t\t\t\talign=\"center\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</AreaChart>\n\t\t\t\t</ChartContainer>\n\t\t\t</CardContent>\n\t\t</Card>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/monitoring/paid/container/show-paid-compose-monitoring.tsx",
    "content": "import { Loader2 } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { toast } from \"sonner\";\nimport { badgeStateColor } from \"@/components/dashboard/application/logs/show\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport { Label } from \"@/components/ui/label\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectGroup,\n\tSelectItem,\n\tSelectLabel,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { api } from \"@/utils/api\";\nimport { ContainerPaidMonitoring } from \"./show-paid-container-monitoring\";\n\ninterface Props {\n\tappName: string;\n\tserverId?: string;\n\tappType: \"stack\" | \"docker-compose\";\n\tbaseUrl: string;\n\ttoken: string;\n}\n\nexport const ComposePaidMonitoring = ({\n\tappName,\n\tappType = \"stack\",\n\tserverId,\n\tbaseUrl,\n\ttoken,\n}: Props) => {\n\tconst { data, isPending } = api.docker.getContainersByAppNameMatch.useQuery(\n\t\t{\n\t\t\tappName: appName,\n\t\t\tappType,\n\t\t\tserverId,\n\t\t},\n\t\t{\n\t\t\tenabled: !!appName,\n\t\t},\n\t);\n\n\tconst [containerAppName, setContainerAppName] = useState<string | undefined>(\n\t\t\"\",\n\t);\n\n\tconst [containerId, setContainerId] = useState<string | undefined>();\n\n\tconst { mutateAsync: restart, isPending: isRestarting } =\n\t\tapi.docker.restartContainer.useMutation();\n\n\tuseEffect(() => {\n\t\tif (data && data?.length > 0) {\n\t\t\tsetContainerAppName(data[0]?.name);\n\t\t\tsetContainerId(data[0]?.containerId);\n\t\t}\n\t}, [data]);\n\n\treturn (\n\t\t<div>\n\t\t\t<Card className=\"bg-background border-0\">\n\t\t\t\t<CardHeader>\n\t\t\t\t\t<CardTitle className=\"text-xl\">Monitoring</CardTitle>\n\t\t\t\t\t<CardDescription>Watch the usage of your compose</CardDescription>\n\t\t\t\t</CardHeader>\n\t\t\t\t<CardContent className=\"flex flex-col gap-4\">\n\t\t\t\t\t<Label>Select a container to watch the monitoring</Label>\n\t\t\t\t\t<div className=\"flex flex-row gap-4\">\n\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\tonValueChange={(value) => {\n\t\t\t\t\t\t\t\tsetContainerAppName(value);\n\t\t\t\t\t\t\t\tsetContainerId(\n\t\t\t\t\t\t\t\t\tdata?.find((container) => container.name === value)\n\t\t\t\t\t\t\t\t\t\t?.containerId,\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tvalue={containerAppName}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t{isPending ? (\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-2 items-center justify-center text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t<span>Loading...</span>\n\t\t\t\t\t\t\t\t\t\t<Loader2 className=\"animate-spin size-4\" />\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a container\" />\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t<SelectGroup>\n\t\t\t\t\t\t\t\t\t{data?.map((container) => (\n\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\tkey={container.containerId}\n\t\t\t\t\t\t\t\t\t\t\tvalue={container.name}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{container.name} ({container.containerId}){\" \"}\n\t\t\t\t\t\t\t\t\t\t\t<Badge variant={badgeStateColor(container.state)}>\n\t\t\t\t\t\t\t\t\t\t\t\t{container.state}\n\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t<SelectLabel>Containers ({data?.length})</SelectLabel>\n\t\t\t\t\t\t\t\t</SelectGroup>\n\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tisLoading={isRestarting}\n\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\tif (!containerId) return;\n\t\t\t\t\t\t\t\ttoast.success(`Restarting container ${containerAppName}`);\n\t\t\t\t\t\t\t\tawait restart({ containerId }).then(() => {\n\t\t\t\t\t\t\t\t\ttoast.success(\"Container restarted\");\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tRestart\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t<ContainerPaidMonitoring\n\t\t\t\t\t\t\tappName={containerAppName || \"\"}\n\t\t\t\t\t\t\tbaseUrl={baseUrl}\n\t\t\t\t\t\t\ttoken={token}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</CardContent>\n\t\t\t</Card>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/monitoring/paid/container/show-paid-container-monitoring.tsx",
    "content": "import { Cpu, HardDrive, Loader2, MemoryStick, Network } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { Card } from \"@/components/ui/card\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { api } from \"@/utils/api\";\nimport { ContainerBlockChart } from \"./container-block-chart\";\nimport { ContainerCPUChart } from \"./container-cpu-chart\";\nimport { ContainerMemoryChart } from \"./container-memory-chart\";\nimport { ContainerNetworkChart } from \"./container-network-chart\";\n\nconst REFRESH_INTERVALS = {\n\t\"5000\": \"5 Seconds\",\n\t\"10000\": \"10 Seconds\",\n\t\"20000\": \"20 Seconds\",\n\t\"30000\": \"30 Seconds\",\n} as const;\n\nconst DATA_POINTS_OPTIONS = {\n\t\"50\": \"50 points\",\n\t\"200\": \"200 points\",\n\t\"500\": \"500 points\",\n\t\"800\": \"800 points\",\n\t\"1200\": \"1200 points\",\n\t\"1600\": \"1600 points\",\n\t\"2000\": \"2000 points\",\n\tall: \"All points\",\n} as const;\n\ninterface ContainerMetric {\n\ttimestamp: string;\n\tCPU: number;\n\tMemory: {\n\t\tpercentage: number;\n\t\tused: number;\n\t\ttotal: number;\n\t\tunit: string;\n\t\tusedUnit: string;\n\t\ttotalUnit: string;\n\t};\n\tNetwork: {\n\t\tinput: number;\n\t\toutput: number;\n\t\tinputUnit: string;\n\t\toutputUnit: string;\n\t};\n\tBlockIO: {\n\t\tread: number;\n\t\twrite: number;\n\t\treadUnit: string;\n\t\twriteUnit: string;\n\t};\n\tContainer: string;\n\tID: string;\n\tName: string;\n}\n\ninterface Props {\n\tappName: string;\n\tbaseUrl: string;\n\ttoken: string;\n}\n\nexport const ContainerPaidMonitoring = ({ appName, baseUrl, token }: Props) => {\n\tconst [historicalData, setHistoricalData] = useState<ContainerMetric[]>([]);\n\tconst [metrics, setMetrics] = useState<ContainerMetric>(\n\t\t{} as ContainerMetric,\n\t);\n\tconst [dataPoints, setDataPoints] =\n\t\tuseState<keyof typeof DATA_POINTS_OPTIONS>(\"50\");\n\tconst [refreshInterval, setRefreshInterval] = useState<string>(\"5000\");\n\n\tconst {\n\t\tdata,\n\t\tisLoading,\n\t\terror: queryError,\n\t} = api.user.getContainerMetrics.useQuery(\n\t\t{\n\t\t\turl: baseUrl,\n\t\t\ttoken,\n\t\t\tdataPoints,\n\t\t\tappName,\n\t\t},\n\t\t{\n\t\t\trefetchInterval:\n\t\t\t\tdataPoints === \"all\" ? undefined : Number.parseInt(refreshInterval),\n\t\t\tenabled: !!appName,\n\t\t},\n\t);\n\n\tuseEffect(() => {\n\t\tif (!data) return;\n\n\t\t// @ts-ignore\n\t\tsetHistoricalData(data);\n\t\t// @ts-ignore\n\t\tsetMetrics(data[data.length - 1]);\n\t}, [data]);\n\n\tif (isLoading) {\n\t\treturn (\n\t\t\t<div className=\"flex h-[400px] w-full items-center justify-center\">\n\t\t\t\t<Loader2 className=\"h-8 w-8 animate-spin text-muted-foreground\" />\n\t\t\t</div>\n\t\t);\n\t}\n\n\tif (queryError) {\n\t\treturn (\n\t\t\t<div className=\"mt-5 flex min-h-[55vh] w-full items-center justify-center p-4\">\n\t\t\t\t<div className=\"max-w-xl text-center\">\n\t\t\t\t\t<p className=\"mb-2 text-base font-medium leading-none text-muted-foreground\">\n\t\t\t\t\t\tError fetching metrics for{\" \"}\n\t\t\t\t\t\t<strong className=\"text-primary\">{appName}</strong>\n\t\t\t\t\t</p>\n\t\t\t\t\t<p className=\"whitespace-pre-line text-sm text-destructive\">\n\t\t\t\t\t\t{queryError instanceof Error\n\t\t\t\t\t\t\t? queryError.message\n\t\t\t\t\t\t\t: \"Failed to fetch metrics, Please check your monitoring Instance is Configured correctly.\"}\n\t\t\t\t\t</p>\n\t\t\t\t\t<p className=\"text-sm text-muted-foreground\">URL: {baseUrl}</p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<div className=\"flex items-center justify-between flex-wrap\t gap-2\">\n\t\t\t\t<h2 className=\"text-2xl font-bold tracking-tight\">\n\t\t\t\t\tContainer Monitoring\n\t\t\t\t</h2>\n\t\t\t\t<div className=\"flex items-center gap-4 flex-wrap\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">Data points:</span>\n\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\tvalue={dataPoints}\n\t\t\t\t\t\t\tonValueChange={(value: keyof typeof DATA_POINTS_OPTIONS) =>\n\t\t\t\t\t\t\t\tsetDataPoints(value)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<SelectTrigger className=\"w-[180px]\">\n\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select points\" />\n\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t{Object.entries(DATA_POINTS_OPTIONS).map(([value, label]) => (\n\t\t\t\t\t\t\t\t\t<SelectItem key={value} value={value}>\n\t\t\t\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t</Select>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\tRefresh interval:\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\tvalue={refreshInterval}\n\t\t\t\t\t\t\tonValueChange={(value: keyof typeof REFRESH_INTERVALS) =>\n\t\t\t\t\t\t\t\tsetRefreshInterval(value)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<SelectTrigger className=\"w-[180px]\">\n\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select interval\" />\n\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t{Object.entries(REFRESH_INTERVALS).map(([value, label]) => (\n\t\t\t\t\t\t\t\t\t<SelectItem key={value} value={value}>\n\t\t\t\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t</Select>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t{/* Stats Cards */}\n\t\t\t<div className=\"grid gap-4 grid-cols-1 sm:grid-cols-2 xl:grid-cols-4\">\n\t\t\t\t<Card className=\"p-6 bg-transparent\">\n\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t<Cpu className=\"h-4 w-4 text-muted-foreground\" />\n\t\t\t\t\t\t<h3 className=\"text-sm font-medium\">CPU Usage</h3>\n\t\t\t\t\t</div>\n\t\t\t\t\t<p className=\"mt-2 text-2xl font-bold\">{metrics.CPU}%</p>\n\t\t\t\t</Card>\n\n\t\t\t\t<Card className=\"p-6 bg-transparent\">\n\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t<MemoryStick className=\"h-4 w-4 text-muted-foreground\" />\n\t\t\t\t\t\t<h3 className=\"text-sm font-medium\">Memory Usage</h3>\n\t\t\t\t\t</div>\n\t\t\t\t\t<p className=\"mt-2 text-2xl font-bold\">\n\t\t\t\t\t\t{metrics?.Memory?.percentage}%\n\t\t\t\t\t</p>\n\t\t\t\t\t<p className=\"mt-1 text-sm text-muted-foreground\">\n\t\t\t\t\t\t{metrics?.Memory?.used} {metrics?.Memory?.unit} /{\" \"}\n\t\t\t\t\t\t{metrics?.Memory?.total} {metrics?.Memory?.unit}\n\t\t\t\t\t</p>\n\t\t\t\t</Card>\n\n\t\t\t\t<Card className=\"p-6 bg-transparent\">\n\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t<Network className=\"h-4 w-4 text-muted-foreground\" />\n\t\t\t\t\t\t<h3 className=\"text-sm font-medium\">Network I/O</h3>\n\t\t\t\t\t</div>\n\t\t\t\t\t<p className=\"mt-2 text-2xl font-bold\">\n\t\t\t\t\t\t{metrics?.Network?.input} {metrics?.Network?.inputUnit} /{\" \"}\n\t\t\t\t\t\t{metrics?.Network?.output} {metrics?.Network?.outputUnit}\n\t\t\t\t\t</p>\n\t\t\t\t</Card>\n\n\t\t\t\t<Card className=\"p-6 bg-transparent\">\n\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t<HardDrive className=\"h-4 w-4 text-muted-foreground\" />\n\t\t\t\t\t\t<h3 className=\"text-sm font-medium\">Block I/O</h3>\n\t\t\t\t\t</div>\n\t\t\t\t\t<p className=\"mt-2 text-2xl font-bold\">\n\t\t\t\t\t\t{metrics?.BlockIO?.read} {metrics?.BlockIO?.readUnit} /{\" \"}\n\t\t\t\t\t\t{metrics?.BlockIO?.write} {metrics?.BlockIO?.writeUnit}\n\t\t\t\t\t</p>\n\t\t\t\t</Card>\n\t\t\t</div>\n\n\t\t\t{/* Container Information */}\n\t\t\t<Card className=\"p-6 bg-transparent\">\n\t\t\t\t<h3 className=\"text-lg font-medium mb-4\">Container Information</h3>\n\t\t\t\t<div className=\"grid gap-4 md:grid-cols-2\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<h4 className=\"text-sm font-medium text-muted-foreground\">\n\t\t\t\t\t\t\tContainer ID\n\t\t\t\t\t\t</h4>\n\t\t\t\t\t\t<p className=\"mt-1\">{metrics.ID}</p>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<h4 className=\"text-sm font-medium text-muted-foreground\">Name</h4>\n\t\t\t\t\t\t<p className=\"mt-1 truncate\">{metrics.Name}</p>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</Card>\n\n\t\t\t{/* Charts Grid */}\n\t\t\t<div className=\"grid gap-4 grid-cols-1 md:grid-cols-1 xl:grid-cols-2\">\n\t\t\t\t<ContainerCPUChart data={historicalData} />\n\t\t\t\t<ContainerMemoryChart data={historicalData} />\n\t\t\t\t<ContainerBlockChart data={historicalData} />\n\t\t\t\t<ContainerNetworkChart data={historicalData} />\n\t\t\t</div>\n\t\t</>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/monitoring/paid/servers/cpu-chart.tsx",
    "content": "import { Area, AreaChart, CartesianGrid, XAxis, YAxis } from \"recharts\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\ttype ChartConfig,\n\tChartContainer,\n\tChartLegend,\n\tChartLegendContent,\n\tChartTooltip,\n} from \"@/components/ui/chart\";\nimport { formatTimestamp } from \"@/lib/utils\";\n\ninterface CPUChartProps {\n\tdata: any[];\n}\n\nconst chartConfig = {\n\tcpu: {\n\t\tlabel: \"CPU\",\n\t\tcolor: \"hsl(var(--chart-1))\",\n\t},\n} satisfies ChartConfig;\n\nexport function CPUChart({ data }: CPUChartProps) {\n\tconst latestData = data[data.length - 1] || {};\n\n\treturn (\n\t\t<Card className=\"bg-transparent\">\n\t\t\t<CardHeader className=\"border-b py-5\">\n\t\t\t\t<CardTitle>CPU</CardTitle>\n\t\t\t\t<CardDescription>CPU Usage: {latestData.cpu}%</CardDescription>\n\t\t\t</CardHeader>\n\t\t\t<CardContent className=\"px-2 pt-4 sm:px-6 sm:pt-6\">\n\t\t\t\t<ChartContainer\n\t\t\t\t\tconfig={chartConfig}\n\t\t\t\t\tclassName=\"aspect-auto h-[250px] w-full\"\n\t\t\t\t>\n\t\t\t\t\t<AreaChart data={data}>\n\t\t\t\t\t\t<defs>\n\t\t\t\t\t\t\t<linearGradient id=\"fillCPU\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n\t\t\t\t\t\t\t\t<stop\n\t\t\t\t\t\t\t\t\toffset=\"5%\"\n\t\t\t\t\t\t\t\t\tstopColor=\"hsl(var(--chart-1))\"\n\t\t\t\t\t\t\t\t\tstopOpacity={0.8}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<stop\n\t\t\t\t\t\t\t\t\toffset=\"95%\"\n\t\t\t\t\t\t\t\t\tstopColor=\"hsl(var(--chart-1))\"\n\t\t\t\t\t\t\t\t\tstopOpacity={0.1}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</linearGradient>\n\t\t\t\t\t\t</defs>\n\t\t\t\t\t\t<CartesianGrid vertical={false} />\n\t\t\t\t\t\t<XAxis\n\t\t\t\t\t\t\tdataKey=\"timestamp\"\n\t\t\t\t\t\t\ttickLine={false}\n\t\t\t\t\t\t\taxisLine={false}\n\t\t\t\t\t\t\ttickMargin={8}\n\t\t\t\t\t\t\tminTickGap={32}\n\t\t\t\t\t\t\ttickFormatter={(value) => formatTimestamp(value)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<YAxis tickFormatter={(value) => `${value}%`} domain={[0, 100]} />\n\t\t\t\t\t\t<ChartTooltip\n\t\t\t\t\t\t\tcursor={false}\n\t\t\t\t\t\t\tcontent={({ active, payload, label }) => {\n\t\t\t\t\t\t\t\tif (active && payload && payload.length) {\n\t\t\t\t\t\t\t\t\tconst data = payload?.[0]?.payload;\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<div className=\"rounded-lg border bg-background p-2 shadow-sm\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"grid grid-cols-2 gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-[0.70rem] uppercase text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tTime\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-bold\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{formatTimestamp(label)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-[0.70rem] uppercase text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tCPU\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-bold\">{data.cpu}%</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Area\n\t\t\t\t\t\t\tname=\"CPU\"\n\t\t\t\t\t\t\tdataKey=\"cpu\"\n\t\t\t\t\t\t\ttype=\"monotone\"\n\t\t\t\t\t\t\tfill=\"url(#fillCPU)\"\n\t\t\t\t\t\t\tstroke=\"hsl(var(--chart-1))\"\n\t\t\t\t\t\t\tstrokeWidth={2}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ChartLegend\n\t\t\t\t\t\t\tcontent={<ChartLegendContent />}\n\t\t\t\t\t\t\tverticalAlign=\"bottom\"\n\t\t\t\t\t\t\talign=\"center\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</AreaChart>\n\t\t\t\t</ChartContainer>\n\t\t\t</CardContent>\n\t\t</Card>\n\t);\n}\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/monitoring/paid/servers/disk-chart.tsx",
    "content": "import { HardDrive } from \"lucide-react\";\nimport {\n\tLabel,\n\tPolarGrid,\n\tPolarRadiusAxis,\n\tRadialBar,\n\tRadialBarChart,\n} from \"recharts\";\n\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardFooter,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport { type ChartConfig, ChartContainer } from \"@/components/ui/chart\";\n\ninterface RadialChartProps {\n\tdata: any;\n}\n\nexport function DiskChart({ data }: RadialChartProps) {\n\tconst diskUsed = Number.parseFloat(data.diskUsed || 0);\n\tconst totalDiskGB = Number.parseFloat(data.totalDisk || 0);\n\tconst usedDiskGB = (totalDiskGB * diskUsed) / 100;\n\n\tconst chartData = [\n\t\t{\n\t\t\tdisk: 25,\n\t\t\tfill: \"hsl(var(--chart-2))\",\n\t\t},\n\t];\n\n\tconst chartConfig = {\n\t\tdisk: {\n\t\t\tlabel: \"Disk\",\n\t\t\tcolor: \"hsl(var(--chart-2))\",\n\t\t},\n\t} satisfies ChartConfig;\n\n\tconst endAngle = (diskUsed * 360) / 100;\n\n\treturn (\n\t\t<Card className=\"flex flex-col bg-transparent\">\n\t\t\t<CardHeader className=\"items-center border-b pb-5\">\n\t\t\t\t<CardTitle>Disk</CardTitle>\n\t\t\t\t<CardDescription>Storage Space</CardDescription>\n\t\t\t</CardHeader>\n\t\t\t<CardContent className=\"flex-1 pb-0\">\n\t\t\t\t<ChartContainer\n\t\t\t\t\tconfig={chartConfig}\n\t\t\t\t\tclassName=\"mx-auto aspect-square max-h-[250px]\"\n\t\t\t\t>\n\t\t\t\t\t<RadialBarChart\n\t\t\t\t\t\tdata={chartData}\n\t\t\t\t\t\tstartAngle={0}\n\t\t\t\t\t\tendAngle={endAngle}\n\t\t\t\t\t\tinnerRadius={80}\n\t\t\t\t\t\touterRadius={110}\n\t\t\t\t\t>\n\t\t\t\t\t\t<PolarGrid\n\t\t\t\t\t\t\tgridType=\"circle\"\n\t\t\t\t\t\t\tradialLines={false}\n\t\t\t\t\t\t\tstroke=\"none\"\n\t\t\t\t\t\t\tclassName=\"first:fill-muted last:fill-background\"\n\t\t\t\t\t\t\tpolarRadius={[86, 74]}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<RadialBar\n\t\t\t\t\t\t\tdataKey=\"disk\"\n\t\t\t\t\t\t\tbackground\n\t\t\t\t\t\t\tcornerRadius={10}\n\t\t\t\t\t\t\tfill=\"hsl(var(--chart-2))\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<PolarRadiusAxis tick={false} tickLine={false} axisLine={false}>\n\t\t\t\t\t\t\t<Label\n\t\t\t\t\t\t\t\tcontent={({ viewBox }) => {\n\t\t\t\t\t\t\t\t\tif (viewBox && \"cx\" in viewBox && \"cy\" in viewBox) {\n\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t<text\n\t\t\t\t\t\t\t\t\t\t\t\tx={viewBox.cx}\n\t\t\t\t\t\t\t\t\t\t\t\ty={viewBox.cy}\n\t\t\t\t\t\t\t\t\t\t\t\ttextAnchor=\"middle\"\n\t\t\t\t\t\t\t\t\t\t\t\tdominantBaseline=\"middle\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<tspan\n\t\t\t\t\t\t\t\t\t\t\t\t\tx={viewBox.cx}\n\t\t\t\t\t\t\t\t\t\t\t\t\ty={viewBox.cy}\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"fill-foreground text-4xl font-bold\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{diskUsed.toFixed(1)}%\n\t\t\t\t\t\t\t\t\t\t\t\t</tspan>\n\t\t\t\t\t\t\t\t\t\t\t\t<tspan\n\t\t\t\t\t\t\t\t\t\t\t\t\tx={viewBox.cx}\n\t\t\t\t\t\t\t\t\t\t\t\t\ty={(viewBox.cy || 0) + 24}\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"fill-muted-foreground text-sm\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\tUsed\n\t\t\t\t\t\t\t\t\t\t\t\t</tspan>\n\t\t\t\t\t\t\t\t\t\t\t</text>\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</PolarRadiusAxis>\n\t\t\t\t\t</RadialBarChart>\n\t\t\t\t</ChartContainer>\n\t\t\t</CardContent>\n\t\t\t<CardFooter className=\"flex-col gap-2 text-sm\">\n\t\t\t\t<div className=\"flex items-center gap-2 font-medium leading-none\">\n\t\t\t\t\t<HardDrive className=\"h-4 w-4\" /> {usedDiskGB.toFixed(1)} GB used\n\t\t\t\t</div>\n\t\t\t\t<div className=\"leading-none text-muted-foreground\">\n\t\t\t\t\tOf {totalDiskGB.toFixed(1)} GB total\n\t\t\t\t</div>\n\t\t\t</CardFooter>\n\t\t</Card>\n\t);\n}\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/monitoring/paid/servers/memory-chart.tsx",
    "content": "import { Area, AreaChart, CartesianGrid, XAxis, YAxis } from \"recharts\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\ttype ChartConfig,\n\tChartContainer,\n\tChartTooltip,\n} from \"@/components/ui/chart\";\nimport { formatTimestamp } from \"@/lib/utils\";\n\ninterface MemoryChartProps {\n\tdata: any[];\n}\n\nconst chartConfig = {\n\tMemory: {\n\t\tlabel: \"Memory\",\n\t\tcolor: \"hsl(var(--chart-2))\",\n\t},\n} satisfies ChartConfig;\n\nexport function MemoryChart({ data }: MemoryChartProps) {\n\tconst latestData = data[data.length - 1] || {};\n\n\treturn (\n\t\t<Card className=\"bg-transparent\">\n\t\t\t<CardHeader className=\"border-b py-5\">\n\t\t\t\t<CardTitle>Memory</CardTitle>\n\t\t\t\t<CardDescription>\n\t\t\t\t\tMemory Usage: {latestData.memUsedGB} GB of {latestData.memTotal} GB (\n\t\t\t\t\t{latestData.memUsed}%)\n\t\t\t\t</CardDescription>\n\t\t\t</CardHeader>\n\t\t\t<CardContent className=\"px-2 pt-4 sm:px-6 sm:pt-6\">\n\t\t\t\t<ChartContainer\n\t\t\t\t\tconfig={chartConfig}\n\t\t\t\t\tclassName=\"aspect-auto h-[250px] w-full\"\n\t\t\t\t>\n\t\t\t\t\t<AreaChart data={data}>\n\t\t\t\t\t\t<defs>\n\t\t\t\t\t\t\t<linearGradient id=\"fillMemory\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n\t\t\t\t\t\t\t\t<stop\n\t\t\t\t\t\t\t\t\toffset=\"5%\"\n\t\t\t\t\t\t\t\t\tstopColor=\"hsl(var(--chart-2))\"\n\t\t\t\t\t\t\t\t\tstopOpacity={0.8}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<stop\n\t\t\t\t\t\t\t\t\toffset=\"95%\"\n\t\t\t\t\t\t\t\t\tstopColor=\"hsl(var(--chart-2))\"\n\t\t\t\t\t\t\t\t\tstopOpacity={0.1}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</linearGradient>\n\t\t\t\t\t\t</defs>\n\t\t\t\t\t\t<CartesianGrid vertical={false} />\n\t\t\t\t\t\t<XAxis\n\t\t\t\t\t\t\tdataKey=\"timestamp\"\n\t\t\t\t\t\t\ttickLine={false}\n\t\t\t\t\t\t\taxisLine={false}\n\t\t\t\t\t\t\ttickMargin={8}\n\t\t\t\t\t\t\tminTickGap={32}\n\t\t\t\t\t\t\ttickFormatter={(value) => formatTimestamp(value)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<YAxis\n\t\t\t\t\t\t\tyAxisId=\"left\"\n\t\t\t\t\t\t\torientation=\"left\"\n\t\t\t\t\t\t\ttickFormatter={(value) => `${value}%`}\n\t\t\t\t\t\t\tdomain={[0, 100]}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<YAxis\n\t\t\t\t\t\t\tyAxisId=\"right\"\n\t\t\t\t\t\t\torientation=\"right\"\n\t\t\t\t\t\t\ttickFormatter={(value) => `${value.toFixed(1)} GB`}\n\t\t\t\t\t\t\tdomain={[\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tMath.ceil(Number.parseFloat(latestData.memTotal || \"0\")),\n\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ChartTooltip\n\t\t\t\t\t\t\tcursor={false}\n\t\t\t\t\t\t\tcontent={({ active, payload, label }) => {\n\t\t\t\t\t\t\t\tif (active && payload && payload.length) {\n\t\t\t\t\t\t\t\t\tconst data = payload?.[0]?.payload;\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<div className=\"rounded-lg border bg-background p-2 shadow-sm\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"grid grid-cols-2 gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-[0.70rem] uppercase text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tTime\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-bold\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{formatTimestamp(label)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-[0.70rem] uppercase text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tMemory\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-bold\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{data.memUsed}% ({data.memUsedGB} GB)\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Area\n\t\t\t\t\t\t\tyAxisId=\"left\"\n\t\t\t\t\t\t\tdataKey=\"memUsed\"\n\t\t\t\t\t\t\ttype=\"monotone\"\n\t\t\t\t\t\t\tfill=\"url(#fillMemory)\"\n\t\t\t\t\t\t\tstroke=\"hsl(var(--chart-2))\"\n\t\t\t\t\t\t\tstrokeWidth={2}\n\t\t\t\t\t\t\tname=\"Memory\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</AreaChart>\n\t\t\t\t</ChartContainer>\n\t\t\t</CardContent>\n\t\t</Card>\n\t);\n}\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/monitoring/paid/servers/network-chart.tsx",
    "content": "import { Area, AreaChart, CartesianGrid, XAxis, YAxis } from \"recharts\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\ttype ChartConfig,\n\tChartContainer,\n\tChartLegend,\n\tChartLegendContent,\n\tChartTooltip,\n} from \"@/components/ui/chart\";\nimport { formatTimestamp } from \"@/lib/utils\";\n\ninterface NetworkChartProps {\n\tdata: any[];\n}\n\nconst chartConfig = {\n\tnetworkIn: {\n\t\tlabel: \"Network In\",\n\t\tcolor: \"hsl(var(--chart-3))\",\n\t},\n\tnetworkOut: {\n\t\tlabel: \"Network Out\",\n\t\tcolor: \"hsl(var(--chart-4))\",\n\t},\n} satisfies ChartConfig;\n\nexport function NetworkChart({ data }: NetworkChartProps) {\n\tconst latestData = data[data.length - 1] || {};\n\n\treturn (\n\t\t<Card className=\"bg-transparent\">\n\t\t\t<CardHeader className=\"border-b py-5\">\n\t\t\t\t<CardTitle>Network</CardTitle>\n\t\t\t\t<CardDescription>\n\t\t\t\t\tNetwork Traffic: ↑ {latestData.networkOut} KB/s ↓{\" \"}\n\t\t\t\t\t{latestData.networkIn} KB/s\n\t\t\t\t</CardDescription>\n\t\t\t</CardHeader>\n\t\t\t<CardContent className=\"px-2 pt-4 sm:px-6 sm:pt-6\">\n\t\t\t\t<ChartContainer\n\t\t\t\t\tconfig={chartConfig}\n\t\t\t\t\tclassName=\"aspect-auto h-[250px] w-full\"\n\t\t\t\t>\n\t\t\t\t\t<AreaChart data={data}>\n\t\t\t\t\t\t<defs>\n\t\t\t\t\t\t\t<linearGradient id=\"fillNetworkIn\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n\t\t\t\t\t\t\t\t<stop\n\t\t\t\t\t\t\t\t\toffset=\"5%\"\n\t\t\t\t\t\t\t\t\tstopColor=\"hsl(var(--chart-3))\"\n\t\t\t\t\t\t\t\t\tstopOpacity={0.8}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<stop\n\t\t\t\t\t\t\t\t\toffset=\"95%\"\n\t\t\t\t\t\t\t\t\tstopColor=\"hsl(var(--chart-3))\"\n\t\t\t\t\t\t\t\t\tstopOpacity={0.1}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</linearGradient>\n\t\t\t\t\t\t\t<linearGradient id=\"fillNetworkOut\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n\t\t\t\t\t\t\t\t<stop\n\t\t\t\t\t\t\t\t\toffset=\"5%\"\n\t\t\t\t\t\t\t\t\tstopColor=\"hsl(var(--chart-4))\"\n\t\t\t\t\t\t\t\t\tstopOpacity={0.8}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<stop\n\t\t\t\t\t\t\t\t\toffset=\"95%\"\n\t\t\t\t\t\t\t\t\tstopColor=\"hsl(var(--chart-4))\"\n\t\t\t\t\t\t\t\t\tstopOpacity={0.1}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</linearGradient>\n\t\t\t\t\t\t</defs>\n\t\t\t\t\t\t<CartesianGrid vertical={false} />\n\t\t\t\t\t\t<XAxis\n\t\t\t\t\t\t\tdataKey=\"timestamp\"\n\t\t\t\t\t\t\ttickLine={false}\n\t\t\t\t\t\t\taxisLine={false}\n\t\t\t\t\t\t\ttickMargin={8}\n\t\t\t\t\t\t\tminTickGap={32}\n\t\t\t\t\t\t\ttickFormatter={(value) => formatTimestamp(value)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<YAxis tickFormatter={(value) => `${value} KB/s`} />\n\t\t\t\t\t\t<ChartTooltip\n\t\t\t\t\t\t\tcursor={false}\n\t\t\t\t\t\t\tcontent={({ active, payload, label }) => {\n\t\t\t\t\t\t\t\tif (active && payload && payload.length) {\n\t\t\t\t\t\t\t\t\tconst data = payload?.[0]?.payload;\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<div className=\"rounded-lg border bg-background p-2 shadow-sm\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"grid grid-cols-2 gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-[0.70rem] uppercase text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tTime\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-bold\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{formatTimestamp(label)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-[0.70rem] uppercase text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tNetwork\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-bold\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t↑ {data.networkOut} KB/s\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<br />↓ {data.networkIn} KB/s\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Area\n\t\t\t\t\t\t\tname=\"Network In\"\n\t\t\t\t\t\t\tdataKey=\"networkIn\"\n\t\t\t\t\t\t\ttype=\"monotone\"\n\t\t\t\t\t\t\tfill=\"url(#fillNetworkIn)\"\n\t\t\t\t\t\t\tstroke=\"hsl(var(--chart-3))\"\n\t\t\t\t\t\t\tstrokeWidth={2}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Area\n\t\t\t\t\t\t\tname=\"Network Out\"\n\t\t\t\t\t\t\tdataKey=\"networkOut\"\n\t\t\t\t\t\t\ttype=\"monotone\"\n\t\t\t\t\t\t\tfill=\"url(#fillNetworkOut)\"\n\t\t\t\t\t\t\tstroke=\"hsl(var(--chart-4))\"\n\t\t\t\t\t\t\tstrokeWidth={2}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ChartLegend\n\t\t\t\t\t\t\tcontent={<ChartLegendContent />}\n\t\t\t\t\t\t\tverticalAlign=\"bottom\"\n\t\t\t\t\t\t\talign=\"center\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</AreaChart>\n\t\t\t\t</ChartContainer>\n\t\t\t</CardContent>\n\t\t</Card>\n\t);\n}\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/monitoring/paid/servers/show-paid-monitoring.tsx",
    "content": "import { Clock, Cpu, HardDrive, Loader2, MemoryStick } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { api } from \"@/utils/api\";\nimport { CPUChart } from \"./cpu-chart\";\nimport { DiskChart } from \"./disk-chart\";\nimport { MemoryChart } from \"./memory-chart\";\nimport { NetworkChart } from \"./network-chart\";\n\nconst REFRESH_INTERVALS = {\n\t\"5000\": \"5 Seconds\",\n\t\"10000\": \"10 Seconds\",\n\t\"20000\": \"20 Seconds\",\n\t\"30000\": \"30 Seconds\",\n} as const;\n\nconst DATA_POINTS_OPTIONS = {\n\t\"50\": \"50 points\",\n\t\"200\": \"200 points\",\n\t\"500\": \"500 points\",\n\t\"800\": \"800 points\",\n\t\"1200\": \"1200 points\",\n\t\"1600\": \"1600 points\",\n\t\"2000\": \"2000 points\",\n\tall: \"All points\",\n} as const;\n\ninterface SystemMetrics {\n\tcpu: string;\n\tcpuModel: string;\n\tcpuCores: number;\n\tcpuPhysicalCores: number;\n\tcpuSpeed: number;\n\tos: string;\n\tdistro: string;\n\tkernel: string;\n\tarch: string;\n\tmemUsed: string;\n\tmemUsedGB: string;\n\tmemTotal: string;\n\tuptime: number;\n\tdiskUsed: string;\n\ttotalDisk: string;\n\tnetworkIn: string;\n\tnetworkOut: string;\n\ttimestamp: string;\n}\n\ninterface Props {\n\tBASE_URL?: string;\n\ttoken?: string;\n}\n\nexport const ShowPaidMonitoring = ({\n\tBASE_URL = process.env.NEXT_PUBLIC_METRICS_URL ||\n\t\t\"http://localhost:3001/metrics\",\n\ttoken = process.env.NEXT_PUBLIC_METRICS_TOKEN || \"my-token\",\n}: Props) => {\n\tconst [historicalData, setHistoricalData] = useState<SystemMetrics[]>([]);\n\tconst [metrics, setMetrics] = useState<SystemMetrics>({} as SystemMetrics);\n\tconst [dataPoints, setDataPoints] =\n\t\tuseState<keyof typeof DATA_POINTS_OPTIONS>(\"50\");\n\tconst [refreshInterval, setRefreshInterval] = useState<string>(\"5000\");\n\n\tconst {\n\t\tdata,\n\t\tisLoading,\n\t\terror: queryError,\n\t} = api.server.getServerMetrics.useQuery(\n\t\t{\n\t\t\turl: BASE_URL,\n\t\t\ttoken,\n\t\t\tdataPoints,\n\t\t},\n\t\t{\n\t\t\trefetchInterval:\n\t\t\t\tdataPoints === \"all\" ? undefined : Number.parseInt(refreshInterval),\n\t\t\tenabled: true,\n\t\t},\n\t);\n\n\tuseEffect(() => {\n\t\tif (!data) return;\n\n\t\tconst formattedData = data.map((metric: SystemMetrics) => ({\n\t\t\ttimestamp: metric.timestamp,\n\t\t\tcpu: Number.parseFloat(metric.cpu),\n\t\t\tcpuModel: metric.cpuModel,\n\t\t\tcpuCores: metric.cpuCores,\n\t\t\tcpuPhysicalCores: metric.cpuPhysicalCores,\n\t\t\tcpuSpeed: metric.cpuSpeed,\n\t\t\tos: metric.os,\n\t\t\tdistro: metric.distro,\n\t\t\tkernel: metric.kernel,\n\t\t\tarch: metric.arch,\n\t\t\tmemUsed: Number.parseFloat(metric.memUsed),\n\t\t\tmemUsedGB: Number.parseFloat(metric.memUsedGB),\n\t\t\tmemTotal: Number.parseFloat(metric.memTotal),\n\t\t\tnetworkIn: Number.parseFloat(metric.networkIn),\n\t\t\tnetworkOut: Number.parseFloat(metric.networkOut),\n\t\t\tdiskUsed: Number.parseFloat(metric.diskUsed),\n\t\t\ttotalDisk: Number.parseFloat(metric.totalDisk),\n\t\t\tuptime: metric.uptime,\n\t\t}));\n\n\t\t// @ts-ignore\n\t\tsetHistoricalData(formattedData);\n\t\t// @ts-ignore\n\t\tsetMetrics(formattedData[formattedData.length - 1] || {});\n\t}, [data]);\n\n\tconst formatUptime = (seconds: number): string => {\n\t\tconst days = Math.floor(seconds / (24 * 60 * 60));\n\t\tconst hours = Math.floor((seconds % (24 * 60 * 60)) / (60 * 60));\n\t\tconst minutes = Math.floor((seconds % (60 * 60)) / 60);\n\n\t\treturn `${days}d ${hours}h ${minutes}m`;\n\t};\n\n\tif (isLoading) {\n\t\treturn (\n\t\t\t<div className=\"flex h-[400px] w-full items-center justify-center\">\n\t\t\t\t<Loader2 className=\"h-8 w-8 animate-spin text-muted-foreground\" />\n\t\t\t</div>\n\t\t);\n\t}\n\n\tif (queryError) {\n\t\treturn (\n\t\t\t<div className=\"flex min-h-[55vh] w-full items-center justify-center p-4\">\n\t\t\t\t<div className=\"max-w-xl text-center\">\n\t\t\t\t\t<p className=\"mb-2 text-base font-medium leading-none text-muted-foreground\">\n\t\t\t\t\t\tError fetching metrics{\" \"}\n\t\t\t\t\t</p>\n\t\t\t\t\t<p className=\"whitespace-pre-line text-sm text-destructive\">\n\t\t\t\t\t\t{queryError instanceof Error\n\t\t\t\t\t\t\t? queryError.message\n\t\t\t\t\t\t\t: \"Failed to fetch metrics, Please check your monitoring Instance is Configured correctly.\"}\n\t\t\t\t\t</p>\n\t\t\t\t\t<p className=\"text-sm text-muted-foreground\">URL: {BASE_URL}</p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div className=\"space-y-4 pt-5 pb-10 w-full md:px-4\">\n\t\t\t<div className=\"flex items-center justify-between flex-wrap\t gap-2\">\n\t\t\t\t<h2 className=\"text-2xl font-bold tracking-tight\">System Monitoring</h2>\n\t\t\t\t<div className=\"flex items-center gap-4 flex-wrap\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">Data points:</span>\n\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\tvalue={dataPoints}\n\t\t\t\t\t\t\tonValueChange={(value: keyof typeof DATA_POINTS_OPTIONS) =>\n\t\t\t\t\t\t\t\tsetDataPoints(value)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<SelectTrigger className=\"w-[180px]\">\n\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select points\" />\n\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t{Object.entries(DATA_POINTS_OPTIONS).map(([value, label]) => (\n\t\t\t\t\t\t\t\t\t<SelectItem key={value} value={value}>\n\t\t\t\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t</Select>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\tRefresh interval:\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\tvalue={refreshInterval}\n\t\t\t\t\t\t\tonValueChange={(value: keyof typeof REFRESH_INTERVALS) =>\n\t\t\t\t\t\t\t\tsetRefreshInterval(value)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<SelectTrigger className=\"w-[180px]\">\n\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select interval\" />\n\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t{Object.entries(REFRESH_INTERVALS).map(([value, label]) => (\n\t\t\t\t\t\t\t\t\t<SelectItem key={value} value={value}>\n\t\t\t\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t</Select>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t{/* Stats Cards */}\n\t\t\t<div className=\"grid gap-4 grid-cols-1 sm:grid-cols-2 xl:grid-cols-4\">\n\t\t\t\t<div className=\"rounded-lg border text-card-foreground shadow-sm p-6\">\n\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t<Clock className=\"h-4 w-4 text-muted-foreground\" />\n\t\t\t\t\t\t<h3 className=\"text-sm font-medium\">Uptime</h3>\n\t\t\t\t\t</div>\n\t\t\t\t\t<p className=\"mt-2 text-2xl font-bold\">\n\t\t\t\t\t\t{formatUptime(metrics.uptime || 0)}\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"rounded-lg border text-card-foreground shadow-sm p-6\">\n\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t<Cpu className=\"h-4 w-4 text-muted-foreground\" />\n\t\t\t\t\t\t<h3 className=\"text-sm font-medium\">CPU Usage</h3>\n\t\t\t\t\t</div>\n\t\t\t\t\t<p className=\"mt-2 text-2xl font-bold\">{metrics.cpu}%</p>\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"rounded-lg border text-card-foreground bg-transparent shadow-sm p-6\">\n\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t<MemoryStick className=\"h-4 w-4 text-muted-foreground\" />\n\t\t\t\t\t\t<h3 className=\"text-sm font-medium\">Memory Usage</h3>\n\t\t\t\t\t</div>\n\t\t\t\t\t<p className=\"mt-2 text-2xl font-bold\">\n\t\t\t\t\t\t{metrics.memUsedGB} GB / {metrics.memTotal} GB\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"rounded-lg border text-card-foreground shadow-sm p-6\">\n\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t<HardDrive className=\"h-4 w-4 text-muted-foreground\" />\n\t\t\t\t\t\t<h3 className=\"text-sm font-medium\">Disk Usage</h3>\n\t\t\t\t\t</div>\n\t\t\t\t\t<p className=\"mt-2 text-2xl font-bold\">{metrics.diskUsed}%</p>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t{/* System Information */}\n\t\t\t<div className=\"rounded-lg border text-card-foreground shadow-sm p-6\">\n\t\t\t\t<h3 className=\"text-lg font-medium mb-4\">System Information</h3>\n\t\t\t\t<div className=\"grid gap-4 md:grid-cols-2\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<h4 className=\"text-sm font-medium text-muted-foreground\">CPU</h4>\n\t\t\t\t\t\t<p className=\"mt-1\">{metrics.cpuModel}</p>\n\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground mt-1\">\n\t\t\t\t\t\t\t{metrics.cpuPhysicalCores} Physical Cores ({metrics.cpuCores}{\" \"}\n\t\t\t\t\t\t\tThreads) @ {metrics.cpuSpeed}GHz\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<h4 className=\"text-sm font-medium text-muted-foreground\">\n\t\t\t\t\t\t\tOperating System\n\t\t\t\t\t\t</h4>\n\t\t\t\t\t\t<p className=\"mt-1\">{metrics.distro}</p>\n\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground mt-1\">\n\t\t\t\t\t\t\tKernel: {metrics.kernel} ({metrics.arch})\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t{/* Charts Grid */}\n\t\t\t<div className=\"grid gap-4 grid-cols-1 md:grid-cols-1 xl:grid-cols-2\">\n\t\t\t\t<CPUChart data={historicalData} />\n\t\t\t\t<MemoryChart data={historicalData} />\n\t\t\t\t<DiskChart data={metrics} />\n\t\t\t\t<NetworkChart data={historicalData} />\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/mysql/general/show-external-mysql-credentials.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport Link from \"next/link\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { ToggleVisibilityInput } from \"@/components/shared/toggle-visibility-input\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { Label } from \"@/components/ui/label\";\nimport { api } from \"@/utils/api\";\n\nconst DockerProviderSchema = z.object({\n\texternalPort: z.preprocess((a) => {\n\t\tif (a !== null) {\n\t\t\tconst parsed = Number.parseInt(z.string().parse(a), 10);\n\t\t\treturn Number.isNaN(parsed) ? null : parsed;\n\t\t}\n\t\treturn null;\n\t}, z\n\t\t.number()\n\t\t.gte(0, \"Range must be 0 - 65535\")\n\t\t.lte(65535, \"Range must be 0 - 65535\")\n\t\t.nullable()),\n});\n\ntype DockerProvider = z.infer<typeof DockerProviderSchema>;\n\ninterface Props {\n\tmysqlId: string;\n}\nexport const ShowExternalMysqlCredentials = ({ mysqlId }: Props) => {\n\tconst { data: ip } = api.settings.getIp.useQuery();\n\tconst { data, refetch } = api.mysql.one.useQuery({ mysqlId });\n\tconst { mutateAsync, isPending } = api.mysql.saveExternalPort.useMutation();\n\tconst [connectionUrl, setConnectionUrl] = useState(\"\");\n\tconst getIp = data?.server?.ipAddress || ip;\n\tconst form = useForm({\n\t\tdefaultValues: {},\n\t\tresolver: zodResolver(DockerProviderSchema),\n\t});\n\n\tuseEffect(() => {\n\t\tif (data?.externalPort) {\n\t\t\tform.reset({\n\t\t\t\texternalPort: data.externalPort,\n\t\t\t});\n\t\t}\n\t}, [form.reset, data, form]);\n\n\tconst onSubmit = async (values: DockerProvider) => {\n\t\tawait mutateAsync({\n\t\t\texternalPort: values.externalPort,\n\t\t\tmysqlId,\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(\"External Port updated\");\n\t\t\t\tawait refetch();\n\t\t\t})\n\t\t\t.catch((error: Error) => {\n\t\t\t\ttoast.error(error?.message || \"Error saving the external port\");\n\t\t\t});\n\t};\n\n\tuseEffect(() => {\n\t\tconst buildConnectionUrl = () => {\n\t\t\tconst port = form.watch(\"externalPort\") || data?.externalPort;\n\n\t\t\treturn `mysql://${data?.databaseUser}:${data?.databasePassword}@${getIp}:${port}/${data?.databaseName}`;\n\t\t};\n\n\t\tsetConnectionUrl(buildConnectionUrl());\n\t}, [\n\t\tdata?.appName,\n\t\tdata?.externalPort,\n\t\tdata?.databasePassword,\n\t\tdata?.databaseName,\n\t\tdata?.databaseUser,\n\t\tform,\n\t\tgetIp,\n\t]);\n\treturn (\n\t\t<>\n\t\t\t<div className=\"flex w-full flex-col gap-5 \">\n\t\t\t\t<Card className=\"bg-background\">\n\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t<CardTitle className=\"text-xl\">External Credentials</CardTitle>\n\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\tIn order to make the database reachable through the internet, you\n\t\t\t\t\t\t\tmust set a port and ensure that the port is not being used by\n\t\t\t\t\t\t\tanother application or database\n\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<CardContent className=\"flex w-full flex-col gap-4\">\n\t\t\t\t\t\t{!getIp && (\n\t\t\t\t\t\t\t<AlertBlock type=\"warning\">\n\t\t\t\t\t\t\t\tYou need to set an IP address in your{\" \"}\n\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\thref=\"/dashboard/settings/server\"\n\t\t\t\t\t\t\t\t\tclassName=\"text-primary\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{data?.serverId\n\t\t\t\t\t\t\t\t\t\t? \"Remote Servers -> Server -> Edit Server -> Update IP Address\"\n\t\t\t\t\t\t\t\t\t\t: \"Web Server -> Server -> Update Server IP\"}\n\t\t\t\t\t\t\t\t</Link>{\" \"}\n\t\t\t\t\t\t\t\tto fix the database url connection.\n\t\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<Form {...form}>\n\t\t\t\t\t\t\t<form\n\t\t\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\t\t\tclassName=\"flex flex-col gap-4\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div className=\"grid grid-cols-2 gap-4 \">\n\t\t\t\t\t\t\t\t\t<div className=\"col-span-2 space-y-4\">\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"externalPort\"\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => {\n\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>External Port (Internet)</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"3306\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value as string}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t{!!data?.externalPort && (\n\t\t\t\t\t\t\t\t\t<div className=\"grid w-full gap-8\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-3\">\n\t\t\t\t\t\t\t\t\t\t\t<Label>External Host</Label>\n\t\t\t\t\t\t\t\t\t\t\t<ToggleVisibilityInput disabled value={connectionUrl} />\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t<div className=\"flex justify-end\">\n\t\t\t\t\t\t\t\t\t<Button type=\"submit\" isLoading={isPending}>\n\t\t\t\t\t\t\t\t\t\tSave\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t</Form>\n\t\t\t\t\t</CardContent>\n\t\t\t\t</Card>\n\t\t\t</div>\n\t\t</>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/mysql/general/show-general-mysql.tsx",
    "content": "import * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport { Ban, CheckCircle2, RefreshCcw, Rocket, Terminal } from \"lucide-react\";\nimport { useState } from \"react\";\nimport { toast } from \"sonner\";\nimport { DialogAction } from \"@/components/shared/dialog-action\";\nimport { DrawerLogs } from \"@/components/shared/drawer-logs\";\nimport { Button } from \"@/components/ui/button\";\nimport { Card, CardContent, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { api } from \"@/utils/api\";\nimport { type LogLine, parseLogs } from \"../../docker/logs/utils\";\nimport { DockerTerminalModal } from \"../../settings/web-server/docker-terminal-modal\";\n\ninterface Props {\n\tmysqlId: string;\n}\n\nexport const ShowGeneralMysql = ({ mysqlId }: Props) => {\n\tconst { data: permissions } = api.user.getPermissions.useQuery();\n\tconst canDeploy = permissions?.deployment.create ?? false;\n\tconst { data, refetch } = api.mysql.one.useQuery(\n\t\t{\n\t\t\tmysqlId,\n\t\t},\n\t\t{ enabled: !!mysqlId },\n\t);\n\n\tconst { mutateAsync: reload, isPending: isReloading } =\n\t\tapi.mysql.reload.useMutation();\n\tconst { mutateAsync: start, isPending: isStarting } =\n\t\tapi.mysql.start.useMutation();\n\n\tconst { mutateAsync: stop, isPending: isStopping } =\n\t\tapi.mysql.stop.useMutation();\n\n\tconst [isDrawerOpen, setIsDrawerOpen] = useState(false);\n\tconst [filteredLogs, setFilteredLogs] = useState<LogLine[]>([]);\n\tconst [isDeploying, setIsDeploying] = useState(false);\n\tapi.mysql.deployWithLogs.useSubscription(\n\t\t{\n\t\t\tmysqlId: mysqlId,\n\t\t},\n\t\t{\n\t\t\tenabled: isDeploying,\n\t\t\tonData(log) {\n\t\t\t\tif (!isDrawerOpen) {\n\t\t\t\t\tsetIsDrawerOpen(true);\n\t\t\t\t}\n\n\t\t\t\tif (log === \"Deployment completed successfully!\") {\n\t\t\t\t\tsetIsDeploying(false);\n\t\t\t\t}\n\t\t\t\tconst parsedLogs = parseLogs(log);\n\t\t\t\tsetFilteredLogs((prev) => [...prev, ...parsedLogs]);\n\t\t\t},\n\t\t\tonError(error) {\n\t\t\t\tconsole.error(\"Deployment logs error:\", error);\n\t\t\t\tsetIsDeploying(false);\n\t\t\t},\n\t\t},\n\t);\n\treturn (\n\t\t<>\n\t\t\t<div className=\"flex w-full flex-col gap-5 \">\n\t\t\t\t<Card className=\"bg-background\">\n\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t<CardTitle className=\"text-xl\">Deploy Settings</CardTitle>\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<CardContent className=\"flex flex-row gap-4 flex-wrap\">\n\t\t\t\t\t\t<TooltipProvider delayDuration={0}>\n\t\t\t\t\t\t\t{canDeploy && (\n\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\ttitle=\"Deploy MySQL\"\n\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to deploy this mysql?\"\n\t\t\t\t\t\t\t\t\ttype=\"default\"\n\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\tsetIsDeploying(true);\n\t\t\t\t\t\t\t\t\t\tawait new Promise((resolve) => setTimeout(resolve, 1000));\n\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tvariant=\"default\"\n\t\t\t\t\t\t\t\t\t\tisLoading={data?.applicationStatus === \"running\"}\n\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1.5 focus-visible:ring-2 focus-visible:ring-offset-2\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Rocket className=\"size-4 mr-1\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\tDeploy\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t<TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent sideOffset={5} className=\"z-[60]\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p>Downloads and sets up the MySQL database</p>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t</TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{canDeploy && (\n\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\ttitle=\"Reload MySQL\"\n\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to reload this mysql?\"\n\t\t\t\t\t\t\t\t\ttype=\"default\"\n\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\tawait reload({\n\t\t\t\t\t\t\t\t\t\t\tmysqlId: mysqlId,\n\t\t\t\t\t\t\t\t\t\t\tappName: data?.appName || \"\",\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"MySQL reloaded successfully\");\n\t\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error reloading MySQL\");\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\tisLoading={isReloading}\n\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1.5 focus-visible:ring-2 focus-visible:ring-offset-2\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<RefreshCcw className=\"size-4 mr-1\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\tReload\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t<TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent sideOffset={5} className=\"z-[60]\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p>Restart the MySQL service without rebuilding</p>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t</TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{canDeploy &&\n\t\t\t\t\t\t\t\t(data?.applicationStatus === \"idle\" ? (\n\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\ttitle=\"Start MySQL\"\n\t\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to start this mysql?\"\n\t\t\t\t\t\t\t\t\t\ttype=\"default\"\n\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\tawait start({\n\t\t\t\t\t\t\t\t\t\t\t\tmysqlId: mysqlId,\n\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"MySQL started successfully\");\n\t\t\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error starting MySQL\");\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\tisLoading={isStarting}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1.5 focus-visible:ring-2 focus-visible:ring-offset-2\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CheckCircle2 className=\"size-4 mr-1\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tStart\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent sideOffset={5} className=\"z-[60]\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tStart the MySQL database (requires a previous\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsuccessful setup)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\ttitle=\"Stop MySQL\"\n\t\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to stop this mysql?\"\n\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\tawait stop({\n\t\t\t\t\t\t\t\t\t\t\t\tmysqlId: mysqlId,\n\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"MySQL stopped successfully\");\n\t\t\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error stopping MySQL\");\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"destructive\"\n\t\t\t\t\t\t\t\t\t\t\tisLoading={isStopping}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1.5 focus-visible:ring-2 focus-visible:ring-offset-2\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Ban className=\"size-4 mr-1\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tStop\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent sideOffset={5} className=\"z-[60]\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>Stop the currently running MySQL database</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t<DockerTerminalModal\n\t\t\t\t\t\t\tappName={data?.appName || \"\"}\n\t\t\t\t\t\t\tserverId={data?.serverId || \"\"}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1.5 focus-visible:ring-2 focus-visible:ring-offset-2\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center\">\n\t\t\t\t\t\t\t\t\t\t\t<Terminal className=\"size-4 mr-1\" />\n\t\t\t\t\t\t\t\t\t\t\tOpen Terminal\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t<TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t<TooltipContent sideOffset={5} className=\"z-[60]\">\n\t\t\t\t\t\t\t\t\t\t\t<p>Open a terminal to the MySQL container</p>\n\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t</TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</DockerTerminalModal>\n\t\t\t\t\t</CardContent>\n\t\t\t\t</Card>\n\t\t\t\t<DrawerLogs\n\t\t\t\t\tisOpen={isDrawerOpen}\n\t\t\t\t\tonClose={() => {\n\t\t\t\t\t\tsetIsDrawerOpen(false);\n\t\t\t\t\t\tsetFilteredLogs([]);\n\t\t\t\t\t\tsetIsDeploying(false);\n\t\t\t\t\t\trefetch();\n\t\t\t\t\t}}\n\t\t\t\t\tfilteredLogs={filteredLogs}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/mysql/general/show-internal-mysql-credentials.tsx",
    "content": "import { ToggleVisibilityInput } from \"@/components/shared/toggle-visibility-input\";\nimport { Card, CardContent, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport { Input } from \"@/components/ui/input\";\nimport { Label } from \"@/components/ui/label\";\nimport { api } from \"@/utils/api\";\n\ninterface Props {\n\tmysqlId: string;\n}\nexport const ShowInternalMysqlCredentials = ({ mysqlId }: Props) => {\n\tconst { data } = api.mysql.one.useQuery({ mysqlId });\n\treturn (\n\t\t<>\n\t\t\t<div className=\"flex w-full flex-col gap-5 \">\n\t\t\t\t<Card className=\"bg-background\">\n\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t<CardTitle className=\"text-xl\">Internal Credentials</CardTitle>\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<CardContent className=\"flex w-full flex-row gap-4\">\n\t\t\t\t\t\t<div className=\"grid w-full md:grid-cols-2 gap-4 md:gap-8\">\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t<Label>User</Label>\n\t\t\t\t\t\t\t\t<Input disabled value={data?.databaseUser} />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t<Label>Database Name</Label>\n\t\t\t\t\t\t\t\t<Input disabled value={data?.databaseName} />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t<Label>Password</Label>\n\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-4\">\n\t\t\t\t\t\t\t\t\t<ToggleVisibilityInput\n\t\t\t\t\t\t\t\t\t\tdisabled\n\t\t\t\t\t\t\t\t\t\tvalue={data?.databasePassword}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t<Label>Root Password</Label>\n\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-4\">\n\t\t\t\t\t\t\t\t\t<ToggleVisibilityInput\n\t\t\t\t\t\t\t\t\t\tdisabled\n\t\t\t\t\t\t\t\t\t\tvalue={data?.databaseRootPassword}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t<Label>Internal Port (Container)</Label>\n\t\t\t\t\t\t\t\t<Input disabled value=\"3306\" />\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t<Label>Internal Host</Label>\n\t\t\t\t\t\t\t\t<Input disabled value={data?.appName} />\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2 md:col-span-2\">\n\t\t\t\t\t\t\t\t<Label>Internal Connection URL </Label>\n\t\t\t\t\t\t\t\t<ToggleVisibilityInput\n\t\t\t\t\t\t\t\t\tdisabled\n\t\t\t\t\t\t\t\t\tvalue={`mysql://${data?.databaseUser}:${data?.databasePassword}@${data?.appName}:3306/${data?.databaseName}`}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</CardContent>\n\t\t\t\t</Card>\n\t\t\t</div>\n\t\t</>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/mysql/update-mysql.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { PenBoxIcon } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { Textarea } from \"@/components/ui/textarea\";\nimport { api } from \"@/utils/api\";\n\nconst updateMysqlSchema = z.object({\n\tname: z.string().min(1, {\n\t\tmessage: \"Name is required\",\n\t}),\n\tdescription: z.string().optional(),\n});\n\ntype UpdateMysql = z.infer<typeof updateMysqlSchema>;\n\ninterface Props {\n\tmysqlId: string;\n}\n\nexport const UpdateMysql = ({ mysqlId }: Props) => {\n\tconst [isOpen, setIsOpen] = useState(false);\n\tconst utils = api.useUtils();\n\tconst { mutateAsync, error, isError, isPending } =\n\t\tapi.mysql.update.useMutation();\n\tconst { data } = api.mysql.one.useQuery(\n\t\t{\n\t\t\tmysqlId,\n\t\t},\n\t\t{\n\t\t\tenabled: !!mysqlId,\n\t\t},\n\t);\n\tconst form = useForm<UpdateMysql>({\n\t\tdefaultValues: {\n\t\t\tdescription: data?.description ?? \"\",\n\t\t\tname: data?.name ?? \"\",\n\t\t},\n\t\tresolver: zodResolver(updateMysqlSchema),\n\t});\n\tuseEffect(() => {\n\t\tif (data) {\n\t\t\tform.reset({\n\t\t\t\tdescription: data.description ?? \"\",\n\t\t\t\tname: data.name,\n\t\t\t});\n\t\t}\n\t}, [data, form, form.reset]);\n\n\tconst onSubmit = async (formData: UpdateMysql) => {\n\t\tawait mutateAsync({\n\t\t\tname: formData.name,\n\t\t\tmysqlId: mysqlId,\n\t\t\tdescription: formData.description || \"\",\n\t\t})\n\t\t\t.then(() => {\n\t\t\t\ttoast.success(\"MySQL updated successfully\");\n\t\t\t\tutils.mysql.one.invalidate({\n\t\t\t\t\tmysqlId: mysqlId,\n\t\t\t\t});\n\t\t\t\tsetIsOpen(false);\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error updating MySQL\");\n\t\t\t})\n\t\t\t.finally(() => {});\n\t};\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\tclassName=\"group hover:bg-blue-500/10 \"\n\t\t\t\t>\n\t\t\t\t\t<PenBoxIcon className=\"size-3.5  text-primary group-hover:text-blue-500\" />\n\t\t\t\t</Button>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-lg\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Modify MySQL</DialogTitle>\n\t\t\t\t\t<DialogDescription>Update the MySQL data</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t{isError && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\n\t\t\t\t<div className=\"grid gap-4\">\n\t\t\t\t\t<div className=\"grid items-center gap-4\">\n\t\t\t\t\t\t<Form {...form}>\n\t\t\t\t\t\t\t<form\n\t\t\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\t\t\tid=\"hook-form-mysql-update\"\n\t\t\t\t\t\t\t\tclassName=\"grid w-full gap-4 \"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"name\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Name</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"Vandelay Industries\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"description\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Description</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Textarea\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Description about your project...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"resize-none\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tisLoading={isPending}\n\t\t\t\t\t\t\t\t\t\tform=\"hook-form-mysql-update\"\n\t\t\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tUpdate\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</DialogFooter>\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t</Form>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/organization/handle-organization.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { PenBoxIcon, Plus } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport { DropdownMenuItem } from \"@/components/ui/dropdown-menu\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { api } from \"@/utils/api\";\n\nconst organizationSchema = z.object({\n\tname: z.string().min(1, {\n\t\tmessage: \"Organization name is required\",\n\t}),\n\tlogo: z.string().optional(),\n});\n\ntype OrganizationFormValues = z.infer<typeof organizationSchema>;\n\ninterface Props {\n\torganizationId?: string;\n\tchildren?: React.ReactNode;\n}\n\nexport function AddOrganization({ organizationId }: Props) {\n\tconst [open, setOpen] = useState(false);\n\tconst utils = api.useUtils();\n\tconst { data: organization } = api.organization.one.useQuery(\n\t\t{\n\t\t\torganizationId: organizationId ?? \"\",\n\t\t},\n\t\t{\n\t\t\tenabled: !!organizationId,\n\t\t},\n\t);\n\tconst { mutateAsync, isPending } = organizationId\n\t\t? api.organization.update.useMutation()\n\t\t: api.organization.create.useMutation();\n\n\tconst form = useForm<OrganizationFormValues>({\n\t\tresolver: zodResolver(organizationSchema),\n\t\tdefaultValues: {\n\t\t\tname: \"\",\n\t\t\tlogo: \"\",\n\t\t},\n\t});\n\n\tuseEffect(() => {\n\t\tif (organization) {\n\t\t\tform.reset({\n\t\t\t\tname: organization.name,\n\t\t\t\tlogo: organization.logo || \"\",\n\t\t\t});\n\t\t}\n\t}, [organization, form]);\n\n\tconst onSubmit = async (values: OrganizationFormValues) => {\n\t\tawait mutateAsync({\n\t\t\tname: values.name,\n\t\t\tlogo: values.logo,\n\t\t\torganizationId: organizationId ?? \"\",\n\t\t})\n\t\t\t.then(() => {\n\t\t\t\tform.reset();\n\t\t\t\ttoast.success(\n\t\t\t\t\t`Organization ${organizationId ? \"updated\" : \"created\"} successfully`,\n\t\t\t\t);\n\t\t\t\tutils.organization.all.invalidate();\n\t\t\t\tif (organizationId) {\n\t\t\t\t\tutils.organization.one.invalidate({ organizationId });\n\t\t\t\t\tutils.organization.active.invalidate();\n\t\t\t\t}\n\t\t\t\tsetOpen(false);\n\t\t\t})\n\t\t\t.catch((error) => {\n\t\t\t\tconsole.error(error);\n\t\t\t\ttoast.error(\n\t\t\t\t\t`Failed to ${organizationId ? \"update\" : \"create\"} organization`,\n\t\t\t\t);\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<Dialog open={open} onOpenChange={setOpen}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t{organizationId ? (\n\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\tclassName=\"group cursor-pointer hover:bg-blue-500/10\"\n\t\t\t\t\t\tonSelect={(e) => e.preventDefault()}\n\t\t\t\t\t>\n\t\t\t\t\t\t<PenBoxIcon className=\"size-3.5 text-primary group-hover:text-blue-500\" />\n\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t) : (\n\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\tclassName=\"gap-2 p-2\"\n\t\t\t\t\t\tonSelect={(e) => e.preventDefault()}\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"flex size-6 items-center justify-center rounded-md border bg-background\">\n\t\t\t\t\t\t\t<Plus className=\"size-4\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"font-medium text-muted-foreground\">\n\t\t\t\t\t\t\tAdd organization\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t)}\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-[425px]\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>\n\t\t\t\t\t\t{organizationId ? \"Update organization\" : \"Add organization\"}\n\t\t\t\t\t</DialogTitle>\n\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\t{organizationId\n\t\t\t\t\t\t\t? \"Update the organization name and logo\"\n\t\t\t\t\t\t\t: \"Create a new organization to manage your projects.\"}\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\tclassName=\"grid gap-4 py-4\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"name\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"tems-center gap-4\">\n\t\t\t\t\t\t\t\t\t<FormLabel className=\"text-right\">Name</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Organization name\"\n\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"col-span-3\"\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage className=\"\" />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"logo\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"gap-4\">\n\t\t\t\t\t\t\t\t\t<FormLabel className=\"text-right\">Logo URL</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"https://example.com/logo.png\"\n\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\tvalue={field.value || \"\"}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"col-span-3\"\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage className=\"col-span-3 col-start-2\" />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t\t<Button type=\"submit\" isLoading={isPending}>\n\t\t\t\t\t\t\t\t{organizationId ? \"Update organization\" : \"Create organization\"}\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</DialogFooter>\n\t\t\t\t\t</form>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n}\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/postgres/advanced/show-custom-command.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { Plus, Trash2 } from \"lucide-react\";\nimport { useEffect } from \"react\";\nimport { useFieldArray, useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { Button } from \"@/components/ui/button\";\nimport { Card, CardContent, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { api } from \"@/utils/api\";\nimport type { ServiceType } from \"../../application/advanced/show-resources\";\n\nconst addDockerImage = z.object({\n\tdockerImage: z.string().min(1, \"Docker image is required\"),\n\tcommand: z.string(),\n\targs: z\n\t\t.array(\n\t\t\tz.object({\n\t\t\t\tvalue: z.string().min(1, \"Argument cannot be empty\"),\n\t\t\t}),\n\t\t)\n\t\t.optional(),\n});\n\ninterface Props {\n\tid: string;\n\ttype: Exclude<ServiceType, \"application\">;\n}\n\ntype AddDockerImage = z.infer<typeof addDockerImage>;\nexport const ShowCustomCommand = ({ id, type }: Props) => {\n\tconst queryMap = {\n\t\tpostgres: () =>\n\t\t\tapi.postgres.one.useQuery({ postgresId: id }, { enabled: !!id }),\n\t\tredis: () => api.redis.one.useQuery({ redisId: id }, { enabled: !!id }),\n\t\tmysql: () => api.mysql.one.useQuery({ mysqlId: id }, { enabled: !!id }),\n\t\tmariadb: () =>\n\t\t\tapi.mariadb.one.useQuery({ mariadbId: id }, { enabled: !!id }),\n\t\tapplication: () =>\n\t\t\tapi.application.one.useQuery({ applicationId: id }, { enabled: !!id }),\n\t\tmongo: () => api.mongo.one.useQuery({ mongoId: id }, { enabled: !!id }),\n\t};\n\tconst { data, refetch } = queryMap[type]\n\t\t? queryMap[type]()\n\t\t: api.mongo.one.useQuery({ mongoId: id }, { enabled: !!id });\n\n\tconst mutationMap = {\n\t\tpostgres: () => api.postgres.update.useMutation(),\n\t\tredis: () => api.redis.update.useMutation(),\n\t\tmysql: () => api.mysql.update.useMutation(),\n\t\tmariadb: () => api.mariadb.update.useMutation(),\n\t\tapplication: () => api.application.update.useMutation(),\n\t\tmongo: () => api.mongo.update.useMutation(),\n\t};\n\n\tconst { mutateAsync } = mutationMap[type]\n\t\t? mutationMap[type]()\n\t\t: api.mongo.update.useMutation();\n\n\tconst form = useForm<AddDockerImage>({\n\t\tdefaultValues: {\n\t\t\tdockerImage: \"\",\n\t\t\tcommand: \"\",\n\t\t\targs: [],\n\t\t},\n\t\tresolver: zodResolver(addDockerImage),\n\t});\n\n\tconst { fields, append, remove } = useFieldArray({\n\t\tcontrol: form.control,\n\t\tname: \"args\",\n\t});\n\n\tuseEffect(() => {\n\t\tif (data) {\n\t\t\tform.reset({\n\t\t\t\tdockerImage: data.dockerImage,\n\t\t\t\tcommand: data.command || \"\",\n\t\t\t\targs: data.args?.map((arg) => ({ value: arg })) || [],\n\t\t\t});\n\t\t}\n\t}, [data, form]);\n\n\tconst onSubmit = async (formData: AddDockerImage) => {\n\t\tawait mutateAsync({\n\t\t\tmongoId: id || \"\",\n\t\t\tpostgresId: id || \"\",\n\t\t\tredisId: id || \"\",\n\t\t\tmysqlId: id || \"\",\n\t\t\tmariadbId: id || \"\",\n\t\t\tdockerImage: formData?.dockerImage,\n\t\t\tcommand: formData?.command,\n\t\t\targs: formData?.args?.map((arg) => arg.value).filter(Boolean),\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(\"Custom Command Updated\");\n\t\t\t\tawait refetch();\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error updating the custom command\");\n\t\t\t});\n\t};\n\treturn (\n\t\t<>\n\t\t\t<div className=\"flex w-full flex-col gap-5 \">\n\t\t\t\t<Card className=\"bg-background\">\n\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t<CardTitle className=\"text-xl\">Advanced Settings</CardTitle>\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<CardContent className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t<Form {...form}>\n\t\t\t\t\t\t\t<form\n\t\t\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\t\t\tclassName=\"grid w-full gap-4 \"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div className=\"grid w-full gap-4\">\n\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\tname=\"dockerImage\"\n\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Docker Image</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"postgres:18\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"command\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Command</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"/bin/sh\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<div className=\"space-y-2\">\n\t\t\t\t\t\t\t\t\t<div className=\"flex items-center justify-between\">\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Arguments (Args)</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={() => append({ value: \"\" })}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<Plus className=\"h-4 w-4 mr-1\" />\n\t\t\t\t\t\t\t\t\t\t\tAdd Argument\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t{fields.length === 0 && (\n\t\t\t\t\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\tNo arguments added yet. Click \"Add Argument\" to add one.\n\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t{fields.map((field, index) => (\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tkey={field.id}\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname={`args.${index}.value`}\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tindex === 0\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"-c\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"redis-server --port 6379\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"destructive\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => remove(index)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Trash2 className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t<div className=\"flex w-full justify-end\">\n\t\t\t\t\t\t\t\t\t<Button isLoading={form.formState.isSubmitting} type=\"submit\">\n\t\t\t\t\t\t\t\t\t\tSave\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t</Form>\n\t\t\t\t\t</CardContent>\n\t\t\t\t</Card>\n\t\t\t</div>\n\t\t</>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/postgres/general/show-external-postgres-credentials.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport Link from \"next/link\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { ToggleVisibilityInput } from \"@/components/shared/toggle-visibility-input\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { Label } from \"@/components/ui/label\";\nimport { api } from \"@/utils/api\";\n\nconst DockerProviderSchema = z.object({\n\texternalPort: z.preprocess((a) => {\n\t\tif (a !== null) {\n\t\t\tconst parsed = Number.parseInt(z.string().parse(a), 10);\n\t\t\treturn Number.isNaN(parsed) ? null : parsed;\n\t\t}\n\t\treturn null;\n\t}, z\n\t\t.number()\n\t\t.gte(0, \"Range must be 0 - 65535\")\n\t\t.lte(65535, \"Range must be 0 - 65535\")\n\t\t.nullable()),\n});\n\ntype DockerProvider = z.infer<typeof DockerProviderSchema>;\n\ninterface Props {\n\tpostgresId: string;\n}\nexport const ShowExternalPostgresCredentials = ({ postgresId }: Props) => {\n\tconst { data: ip } = api.settings.getIp.useQuery();\n\tconst { data, refetch } = api.postgres.one.useQuery({ postgresId });\n\tconst { mutateAsync, isPending } =\n\t\tapi.postgres.saveExternalPort.useMutation();\n\tconst getIp = data?.server?.ipAddress || ip;\n\tconst [connectionUrl, setConnectionUrl] = useState(\"\");\n\n\tconst form = useForm({\n\t\tdefaultValues: {},\n\t\tresolver: zodResolver(DockerProviderSchema),\n\t});\n\n\tuseEffect(() => {\n\t\tif (data?.externalPort) {\n\t\t\tform.reset({\n\t\t\t\texternalPort: data.externalPort,\n\t\t\t});\n\t\t}\n\t}, [form.reset, data, form]);\n\n\tconst onSubmit = async (values: DockerProvider) => {\n\t\tawait mutateAsync({\n\t\t\texternalPort: values.externalPort,\n\t\t\tpostgresId,\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(\"External Port updated\");\n\t\t\t\tawait refetch();\n\t\t\t})\n\t\t\t.catch((error: Error) => {\n\t\t\t\ttoast.error(error?.message || \"Error saving the external port\");\n\t\t\t});\n\t};\n\n\tuseEffect(() => {\n\t\tconst buildConnectionUrl = () => {\n\t\t\tconst port = form.watch(\"externalPort\") || data?.externalPort;\n\n\t\t\treturn `postgresql://${data?.databaseUser}:${data?.databasePassword}@${getIp}:${port}/${data?.databaseName}`;\n\t\t};\n\n\t\tsetConnectionUrl(buildConnectionUrl());\n\t}, [\n\t\tdata?.appName,\n\t\tdata?.externalPort,\n\t\tdata?.databasePassword,\n\t\tform,\n\t\tdata?.databaseName,\n\t\tgetIp,\n\t]);\n\n\treturn (\n\t\t<>\n\t\t\t<div className=\"flex w-full flex-col gap-5 \">\n\t\t\t\t<Card className=\"bg-background\">\n\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t<CardTitle className=\"text-xl\">External Credentials</CardTitle>\n\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\tIn order to make the database reachable through the internet, you\n\t\t\t\t\t\t\tmust set a port and ensure that the port is not being used by\n\t\t\t\t\t\t\tanother application or database\n\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<CardContent className=\"flex w-full flex-col gap-4\">\n\t\t\t\t\t\t{!getIp && (\n\t\t\t\t\t\t\t<AlertBlock type=\"warning\">\n\t\t\t\t\t\t\t\tYou need to set an IP address in your{\" \"}\n\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\thref=\"/dashboard/settings/server\"\n\t\t\t\t\t\t\t\t\tclassName=\"text-primary\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{data?.serverId\n\t\t\t\t\t\t\t\t\t\t? \"Remote Servers -> Server -> Edit Server -> Update IP Address\"\n\t\t\t\t\t\t\t\t\t\t: \"Web Server -> Server -> Update Server IP\"}\n\t\t\t\t\t\t\t\t</Link>{\" \"}\n\t\t\t\t\t\t\t\tto fix the database url connection.\n\t\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<Form {...form}>\n\t\t\t\t\t\t\t<form\n\t\t\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\t\t\tclassName=\"flex flex-col gap-4\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div className=\"grid grid-cols-2 gap-4 \">\n\t\t\t\t\t\t\t\t\t<div className=\"col-span-2 space-y-4\">\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"externalPort\"\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => {\n\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>External Port (Internet)</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"5432\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value as string}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t{!!data?.externalPort && (\n\t\t\t\t\t\t\t\t\t<div className=\"grid w-full gap-8\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-3\">\n\t\t\t\t\t\t\t\t\t\t\t<Label>External Host</Label>\n\t\t\t\t\t\t\t\t\t\t\t<ToggleVisibilityInput value={connectionUrl} disabled />\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t<div className=\"flex justify-end\">\n\t\t\t\t\t\t\t\t\t<Button type=\"submit\" isLoading={isPending}>\n\t\t\t\t\t\t\t\t\t\tSave\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t</Form>\n\t\t\t\t\t</CardContent>\n\t\t\t\t</Card>\n\t\t\t</div>\n\t\t</>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/postgres/general/show-general-postgres.tsx",
    "content": "import * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport { Ban, CheckCircle2, RefreshCcw, Rocket, Terminal } from \"lucide-react\";\nimport { useState } from \"react\";\nimport { toast } from \"sonner\";\nimport { DialogAction } from \"@/components/shared/dialog-action\";\nimport { DrawerLogs } from \"@/components/shared/drawer-logs\";\nimport { Button } from \"@/components/ui/button\";\nimport { Card, CardContent, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { api } from \"@/utils/api\";\nimport { type LogLine, parseLogs } from \"../../docker/logs/utils\";\nimport { DockerTerminalModal } from \"../../settings/web-server/docker-terminal-modal\";\n\ninterface Props {\n\tpostgresId: string;\n}\n\nexport const ShowGeneralPostgres = ({ postgresId }: Props) => {\n\tconst { data: permissions } = api.user.getPermissions.useQuery();\n\tconst canDeploy = permissions?.deployment.create ?? false;\n\tconst { data, refetch } = api.postgres.one.useQuery(\n\t\t{\n\t\t\tpostgresId: postgresId,\n\t\t},\n\t\t{ enabled: !!postgresId },\n\t);\n\n\tconst { mutateAsync: reload, isPending: isReloading } =\n\t\tapi.postgres.reload.useMutation();\n\n\tconst { mutateAsync: stop, isPending: isStopping } =\n\t\tapi.postgres.stop.useMutation();\n\n\tconst { mutateAsync: start, isPending: isStarting } =\n\t\tapi.postgres.start.useMutation();\n\n\tconst [isDrawerOpen, setIsDrawerOpen] = useState(false);\n\tconst [filteredLogs, setFilteredLogs] = useState<LogLine[]>([]);\n\tconst [isDeploying, setIsDeploying] = useState(false);\n\tapi.postgres.deployWithLogs.useSubscription(\n\t\t{\n\t\t\tpostgresId: postgresId,\n\t\t},\n\t\t{\n\t\t\tenabled: isDeploying,\n\t\t\tonData(log) {\n\t\t\t\tif (!isDrawerOpen) {\n\t\t\t\t\tsetIsDrawerOpen(true);\n\t\t\t\t}\n\n\t\t\t\tif (log === \"Deployment completed successfully!\") {\n\t\t\t\t\tsetIsDeploying(false);\n\t\t\t\t}\n\t\t\t\tconst parsedLogs = parseLogs(log);\n\t\t\t\tsetFilteredLogs((prev) => [...prev, ...parsedLogs]);\n\t\t\t},\n\t\t\tonError(error) {\n\t\t\t\tconsole.error(\"Deployment logs error:\", error);\n\t\t\t\tsetIsDeploying(false);\n\t\t\t},\n\t\t},\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<div className=\"flex w-full flex-col gap-5 \">\n\t\t\t\t<Card className=\"bg-background\">\n\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t<CardTitle className=\"text-xl\">Deploy Settings</CardTitle>\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<CardContent className=\"flex flex-row gap-4 flex-wrap\">\n\t\t\t\t\t\t<TooltipProvider disableHoverableContent={false}>\n\t\t\t\t\t\t\t{canDeploy && (\n\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\ttitle=\"Deploy PostgreSQL\"\n\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to deploy this postgres?\"\n\t\t\t\t\t\t\t\t\ttype=\"default\"\n\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\tsetIsDeploying(true);\n\t\t\t\t\t\t\t\t\t\tawait new Promise((resolve) => setTimeout(resolve, 1000));\n\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tvariant=\"default\"\n\t\t\t\t\t\t\t\t\t\tisLoading={data?.applicationStatus === \"running\"}\n\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1.5 focus-visible:ring-2 focus-visible:ring-offset-2\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Rocket className=\"size-4 mr-1\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\tDeploy\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t<TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent sideOffset={5} className=\"z-[60]\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p>Downloads and sets up the PostgreSQL database</p>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t</TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{canDeploy && (\n\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\ttitle=\"Reload PostgreSQL\"\n\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to reload this postgres?\"\n\t\t\t\t\t\t\t\t\ttype=\"default\"\n\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\tawait reload({\n\t\t\t\t\t\t\t\t\t\t\tpostgresId: postgresId,\n\t\t\t\t\t\t\t\t\t\t\tappName: data?.appName || \"\",\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"PostgreSQL reloaded successfully\");\n\t\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error reloading PostgreSQL\");\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\tisLoading={isReloading}\n\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1.5 focus-visible:ring-2 focus-visible:ring-offset-2\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<RefreshCcw className=\"size-4 mr-1\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\tReload\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t<TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent sideOffset={5} className=\"z-[60]\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tRestart the PostgreSQL service without rebuilding\n\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t</TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{canDeploy &&\n\t\t\t\t\t\t\t\t(data?.applicationStatus === \"idle\" ? (\n\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\ttitle=\"Start PostgreSQL\"\n\t\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to start this postgres?\"\n\t\t\t\t\t\t\t\t\t\ttype=\"default\"\n\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\tawait start({\n\t\t\t\t\t\t\t\t\t\t\t\tpostgresId: postgresId,\n\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"PostgreSQL started successfully\");\n\t\t\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error starting PostgreSQL\");\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\tisLoading={isStarting}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1.5 focus-visible:ring-2 focus-visible:ring-offset-2\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CheckCircle2 className=\"size-4 mr-1\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tStart\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent sideOffset={5} className=\"z-[60]\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tStart the PostgreSQL database (requires a previous\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsuccessful setup)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\ttitle=\"Stop PostgreSQL\"\n\t\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to stop this postgres?\"\n\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\tawait stop({\n\t\t\t\t\t\t\t\t\t\t\t\tpostgresId: postgresId,\n\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"PostgreSQL stopped successfully\");\n\t\t\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error stopping PostgreSQL\");\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"destructive\"\n\t\t\t\t\t\t\t\t\t\t\tisLoading={isStopping}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1.5 focus-visible:ring-2 focus-visible:ring-offset-2\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Ban className=\"size-4 mr-1\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tStop\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent sideOffset={5} className=\"z-[60]\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tStop the currently running PostgreSQL database\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t<DockerTerminalModal\n\t\t\t\t\t\t\tappName={data?.appName || \"\"}\n\t\t\t\t\t\t\tserverId={data?.serverId || \"\"}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1.5 focus-visible:ring-2 focus-visible:ring-offset-2\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center\">\n\t\t\t\t\t\t\t\t\t\t\t<Terminal className=\"size-4 mr-1\" />\n\t\t\t\t\t\t\t\t\t\t\tOpen Terminal\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t<TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t<TooltipContent sideOffset={5} className=\"z-[60]\">\n\t\t\t\t\t\t\t\t\t\t\t<p>Open a terminal to the PostgreSQL container</p>\n\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t</TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</DockerTerminalModal>\n\t\t\t\t\t</CardContent>\n\t\t\t\t</Card>\n\t\t\t\t<DrawerLogs\n\t\t\t\t\tisOpen={isDrawerOpen}\n\t\t\t\t\tonClose={() => {\n\t\t\t\t\t\tsetIsDrawerOpen(false);\n\t\t\t\t\t\tsetFilteredLogs([]);\n\t\t\t\t\t\tsetIsDeploying(false);\n\t\t\t\t\t\trefetch();\n\t\t\t\t\t}}\n\t\t\t\t\tfilteredLogs={filteredLogs}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/postgres/general/show-internal-postgres-credentials.tsx",
    "content": "import { ToggleVisibilityInput } from \"@/components/shared/toggle-visibility-input\";\nimport { Card, CardContent, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport { Input } from \"@/components/ui/input\";\nimport { Label } from \"@/components/ui/label\";\nimport { api } from \"@/utils/api\";\n\ninterface Props {\n\tpostgresId: string;\n}\nexport const ShowInternalPostgresCredentials = ({ postgresId }: Props) => {\n\tconst { data } = api.postgres.one.useQuery({ postgresId });\n\treturn (\n\t\t<>\n\t\t\t<div className=\"flex w-full flex-col gap-5 \">\n\t\t\t\t<Card className=\"bg-background\">\n\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t<CardTitle className=\"text-xl\">Internal Credentials</CardTitle>\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<CardContent className=\"flex w-full flex-row gap-4\">\n\t\t\t\t\t\t<div className=\"grid w-full md:grid-cols-2 gap-4 md:gap-8\">\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t<Label>User</Label>\n\t\t\t\t\t\t\t\t<Input disabled value={data?.databaseUser} />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t<Label>Database Name</Label>\n\t\t\t\t\t\t\t\t<Input disabled value={data?.databaseName} />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t<Label>Password</Label>\n\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-4\">\n\t\t\t\t\t\t\t\t\t<ToggleVisibilityInput\n\t\t\t\t\t\t\t\t\t\tvalue={data?.databasePassword}\n\t\t\t\t\t\t\t\t\t\tdisabled\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t<Label>Internal Port (Container)</Label>\n\t\t\t\t\t\t\t\t<Input disabled value=\"5432\" />\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t<Label>Internal Host</Label>\n\t\t\t\t\t\t\t\t<Input disabled value={data?.appName} />\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t<Label>Internal Connection URL </Label>\n\t\t\t\t\t\t\t\t<ToggleVisibilityInput\n\t\t\t\t\t\t\t\t\tdisabled\n\t\t\t\t\t\t\t\t\tvalue={`postgresql://${data?.databaseUser}:${data?.databasePassword}@${data?.appName}:5432/${data?.databaseName}`}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</CardContent>\n\t\t\t\t</Card>\n\t\t\t</div>\n\t\t</>\n\t);\n};\n// ReplyError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-w\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/postgres/update-postgres.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { PenBox } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { Textarea } from \"@/components/ui/textarea\";\nimport { api } from \"@/utils/api\";\n\nconst updatePostgresSchema = z.object({\n\tname: z.string().min(1, {\n\t\tmessage: \"Name is required\",\n\t}),\n\tdescription: z.string().optional(),\n});\n\ntype UpdatePostgres = z.infer<typeof updatePostgresSchema>;\n\ninterface Props {\n\tpostgresId: string;\n}\n\nexport const UpdatePostgres = ({ postgresId }: Props) => {\n\tconst [isOpen, setIsOpen] = useState(false);\n\tconst utils = api.useUtils();\n\tconst { mutateAsync, error, isError, isPending } =\n\t\tapi.postgres.update.useMutation();\n\tconst { data } = api.postgres.one.useQuery(\n\t\t{\n\t\t\tpostgresId,\n\t\t},\n\t\t{\n\t\t\tenabled: !!postgresId,\n\t\t},\n\t);\n\tconst form = useForm<UpdatePostgres>({\n\t\tdefaultValues: {\n\t\t\tdescription: data?.description ?? \"\",\n\t\t\tname: data?.name ?? \"\",\n\t\t},\n\t\tresolver: zodResolver(updatePostgresSchema),\n\t});\n\tuseEffect(() => {\n\t\tif (data) {\n\t\t\tform.reset({\n\t\t\t\tdescription: data.description ?? \"\",\n\t\t\t\tname: data.name,\n\t\t\t});\n\t\t}\n\t}, [data, form, form.reset]);\n\n\tconst onSubmit = async (formData: UpdatePostgres) => {\n\t\tawait mutateAsync({\n\t\t\tname: formData.name,\n\t\t\tpostgresId: postgresId,\n\t\t\tdescription: formData.description || \"\",\n\t\t})\n\t\t\t.then(() => {\n\t\t\t\ttoast.success(\"Postgres updated successfully\");\n\t\t\t\tutils.postgres.one.invalidate({\n\t\t\t\t\tpostgresId: postgresId,\n\t\t\t\t});\n\t\t\t\tsetIsOpen(false);\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error updating Postgres\");\n\t\t\t})\n\t\t\t.finally(() => {});\n\t};\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\tclassName=\"group hover:bg-blue-500/10 focus-visible:ring-2 focus-visible:ring-offset-2\"\n\t\t\t\t>\n\t\t\t\t\t<PenBox className=\"size-3.5 text-primary group-hover:text-blue-500\" />\n\t\t\t\t</Button>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-lg\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Modify Postgres</DialogTitle>\n\t\t\t\t\t<DialogDescription>Update the Postgres data</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t{isError && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\n\t\t\t\t<div className=\"grid gap-4\">\n\t\t\t\t\t<div className=\"grid items-center gap-4\">\n\t\t\t\t\t\t<Form {...form}>\n\t\t\t\t\t\t\t<form\n\t\t\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\t\t\tid=\"hook-form-update-postgres\"\n\t\t\t\t\t\t\t\tclassName=\"grid w-full gap-4 \"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"name\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Name</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"Vandelay Industries\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"description\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Description</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Textarea\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Description about your project...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"resize-none\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tisLoading={isPending}\n\t\t\t\t\t\t\t\t\t\tform=\"hook-form-update-postgres\"\n\t\t\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1.5 focus-visible:ring-2 focus-visible:ring-offset-2\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tUpdate\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</DialogFooter>\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t</Form>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/project/add-ai-assistant.tsx",
    "content": "import { TemplateGenerator } from \"@/components/dashboard/project/ai/template-generator\";\n\ninterface Props {\n\tenvironmentId: string;\n\tprojectName?: string;\n}\n\nexport const AddAiAssistant = ({ environmentId }: Props) => {\n\treturn <TemplateGenerator environmentId={environmentId} />;\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/project/add-application.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { Folder, HelpCircle } from \"lucide-react\";\nimport { useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport { DropdownMenuItem } from \"@/components/ui/dropdown-menu\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectGroup,\n\tSelectItem,\n\tSelectLabel,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { Textarea } from \"@/components/ui/textarea\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { slugify } from \"@/lib/slug\";\nimport { api } from \"@/utils/api\";\n\nconst AddTemplateSchema = z.object({\n\tname: z.string().min(1, {\n\t\tmessage: \"Name is required\",\n\t}),\n\tappName: z\n\t\t.string()\n\t\t.min(1, {\n\t\t\tmessage: \"App name is required\",\n\t\t})\n\t\t.regex(/^[a-z](?!.*--)([a-z0-9-]*[a-z])?$/, {\n\t\t\tmessage:\n\t\t\t\t\"App name supports lowercase letters, numbers, '-' and can only start and end letters, and does not support continuous '-'\",\n\t\t}),\n\tdescription: z.string().optional(),\n\tserverId: z.string().optional(),\n});\n\ntype AddTemplate = z.infer<typeof AddTemplateSchema>;\n\ninterface Props {\n\tenvironmentId: string;\n\tprojectName?: string;\n}\n\nexport const AddApplication = ({ environmentId, projectName }: Props) => {\n\tconst utils = api.useUtils();\n\tconst { data: isCloud } = api.settings.isCloud.useQuery();\n\tconst [visible, setVisible] = useState(false);\n\tconst slug = slugify(projectName);\n\tconst { data: servers } = api.server.withSSHKey.useQuery();\n\n\tconst hasServers = servers && servers.length > 0;\n\t// Show dropdown logic based on cloud environment\n\t// Cloud: show only if there are remote servers (no Dokploy option)\n\t// Self-hosted: show only if there are remote servers (Dokploy is default, hide if no remote servers)\n\tconst shouldShowServerDropdown = hasServers;\n\n\tconst { mutateAsync, isPending, error, isError } =\n\t\tapi.application.create.useMutation();\n\n\tconst form = useForm<AddTemplate>({\n\t\tdefaultValues: {\n\t\t\tname: \"\",\n\t\t\tappName: `${slug}-`,\n\t\t\tdescription: \"\",\n\t\t},\n\t\tresolver: zodResolver(AddTemplateSchema),\n\t});\n\n\tconst onSubmit = async (data: AddTemplate) => {\n\t\tawait mutateAsync({\n\t\t\tname: data.name,\n\t\t\tappName: data.appName,\n\t\t\tdescription: data.description,\n\t\t\tserverId: data.serverId === \"dokploy\" ? undefined : data.serverId,\n\t\t\tenvironmentId,\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(\"Service Created\");\n\t\t\t\tform.reset();\n\t\t\t\tsetVisible(false);\n\t\t\t\tawait utils.environment.one.invalidate({\n\t\t\t\t\tenvironmentId,\n\t\t\t\t});\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error creating the service\");\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<Dialog open={visible} onOpenChange={setVisible}>\n\t\t\t<DialogTrigger className=\"w-full\">\n\t\t\t\t<DropdownMenuItem\n\t\t\t\t\tclassName=\"w-full cursor-pointer space-x-3\"\n\t\t\t\t\tonSelect={(e) => e.preventDefault()}\n\t\t\t\t>\n\t\t\t\t\t<Folder className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t<span>Application</span>\n\t\t\t\t</DropdownMenuItem>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-lg\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Create</DialogTitle>\n\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\tAssign a name and description to your application\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t{isError && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tid=\"hook-form\"\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\tclassName=\"grid w-full gap-4\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"name\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Name</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Frontend\"\n\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\tconst val = e.target.value || \"\";\n\t\t\t\t\t\t\t\t\t\t\t\tconst serviceName = slugify(val.trim());\n\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"appName\", `${slug}-${serviceName}`);\n\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(val);\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{shouldShowServerDropdown && (\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"serverId\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<TooltipProvider delayDuration={0}>\n\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel className=\"break-all w-fit flex flex-row gap-1 items-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSelect a Server {!isCloud ? \"(Optional)\" : \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<HelpCircle className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"z-[999] w-[300px]\"\n\t\t\t\t\t\t\t\t\t\t\t\t\talign=\"start\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tside=\"top\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tIf no server is selected, the application will be\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdeployed on the server where the user is logged in.\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\n\t\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\t\tonValueChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\tdefaultValue={\n\t\t\t\t\t\t\t\t\t\t\t\tfield.value || (!isCloud ? \"dokploy\" : undefined)\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder={!isCloud ? \"Dokploy\" : \"Select a Server\"}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{!isCloud && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"dokploy\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-2 justify-between w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>Dokploy</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground text-xs self-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDefault\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t{servers?.map((server) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={server.serverId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={server.serverId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-2 justify-between w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>{server.name}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground text-xs self-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{server.ipAddress}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tServers ({servers?.length + (!isCloud ? 1 : 0)})\n\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectGroup>\n\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"appName\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\tApp Name\n\t\t\t\t\t\t\t\t\t\t<TooltipProvider delayDuration={0}>\n\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<HelpCircle className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent side=\"right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tThis will be the name of the Docker Swarm service\n\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"my-app\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"description\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Description</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Textarea\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Description of your service...\"\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"resize-none\"\n\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</form>\n\n\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t<Button isLoading={isPending} form=\"hook-form\" type=\"submit\">\n\t\t\t\t\t\t\tCreate\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</DialogFooter>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/project/add-compose.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { CircuitBoard, HelpCircle } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport { DropdownMenuItem } from \"@/components/ui/dropdown-menu\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectGroup,\n\tSelectItem,\n\tSelectLabel,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { Textarea } from \"@/components/ui/textarea\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { slugify } from \"@/lib/slug\";\nimport { api } from \"@/utils/api\";\n\nconst AddComposeSchema = z.object({\n\tcomposeType: z.enum([\"docker-compose\", \"stack\"]).optional(),\n\tname: z.string().min(1, {\n\t\tmessage: \"Name is required\",\n\t}),\n\tappName: z\n\t\t.string()\n\t\t.min(1, {\n\t\t\tmessage: \"App name is required\",\n\t\t})\n\t\t.regex(/^[a-z](?!.*--)([a-z0-9-]*[a-z])?$/, {\n\t\t\tmessage:\n\t\t\t\t\"App name supports lowercase letters, numbers, '-' and can only start and end letters, and does not support continuous '-'\",\n\t\t}),\n\tdescription: z.string().optional(),\n\tserverId: z.string().optional(),\n});\n\ntype AddCompose = z.infer<typeof AddComposeSchema>;\n\ninterface Props {\n\tenvironmentId: string;\n\tprojectName?: string;\n}\n\nexport const AddCompose = ({ environmentId, projectName }: Props) => {\n\tconst utils = api.useUtils();\n\tconst [visible, setVisible] = useState(false);\n\tconst slug = slugify(projectName);\n\tconst { data: isCloud } = api.settings.isCloud.useQuery();\n\tconst { data: servers } = api.server.withSSHKey.useQuery();\n\tconst { mutateAsync, isPending, error, isError } =\n\t\tapi.compose.create.useMutation();\n\n\t// Get environment data to extract projectId\n\t// const { data: environment } = api.environment.one.useQuery({ environmentId });\n\n\tconst hasServers = servers && servers.length > 0;\n\t// Show dropdown logic based on cloud environment\n\t// Cloud: show only if there are remote servers (no Dokploy option)\n\t// Self-hosted: show only if there are remote servers (Dokploy is default, hide if no remote servers)\n\tconst shouldShowServerDropdown = hasServers;\n\n\tconst form = useForm<AddCompose>({\n\t\tdefaultValues: {\n\t\t\tname: \"\",\n\t\t\tdescription: \"\",\n\t\t\tcomposeType: \"docker-compose\",\n\t\t\tappName: `${slug}-`,\n\t\t},\n\t\tresolver: zodResolver(AddComposeSchema),\n\t});\n\n\tuseEffect(() => {\n\t\tform.reset();\n\t}, [form, form.reset, form.formState.isSubmitSuccessful]);\n\n\tconst onSubmit = async (data: AddCompose) => {\n\t\tawait mutateAsync({\n\t\t\tname: data.name,\n\t\t\tdescription: data.description,\n\t\t\tenvironmentId,\n\t\t\tcomposeType: data.composeType,\n\t\t\tappName: data.appName,\n\t\t\tserverId: data.serverId === \"dokploy\" ? undefined : data.serverId,\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(\"Compose Created\");\n\t\t\t\tsetVisible(false);\n\t\t\t\t// Invalidate the project query to refresh the environment data\n\t\t\t\tawait utils.environment.one.invalidate({\n\t\t\t\t\tenvironmentId,\n\t\t\t\t});\n\t\t\t\t// Invalidate the project query to refresh the project data for the advance-breadcrumb\n\t\t\t\tawait utils.project.all.invalidate();\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error creating the compose\");\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<Dialog open={visible} onOpenChange={setVisible}>\n\t\t\t<DialogTrigger className=\"w-full\">\n\t\t\t\t<DropdownMenuItem\n\t\t\t\t\tclassName=\"w-full cursor-pointer space-x-3\"\n\t\t\t\t\tonSelect={(e) => e.preventDefault()}\n\t\t\t\t>\n\t\t\t\t\t<CircuitBoard className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t<span>Compose</span>\n\t\t\t\t</DropdownMenuItem>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-xl\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Create Compose</DialogTitle>\n\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\tAssign a name and description to your compose\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t{isError && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tid=\"hook-form\"\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\tclassName=\"grid w-full gap-4\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"name\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Name</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Frontend\"\n\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst val = e.target.value || \"\";\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst serviceName = slugify(val.trim());\n\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"appName\", `${slug}-${serviceName}`);\n\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(val);\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{shouldShowServerDropdown && (\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"serverId\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<TooltipProvider delayDuration={0}>\n\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel className=\"break-all w-fit flex flex-row gap-1 items-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSelect a Server {!isCloud ? \"(Optional)\" : \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<HelpCircle className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"z-[999] w-[300px]\"\n\t\t\t\t\t\t\t\t\t\t\t\t\talign=\"start\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tside=\"top\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tIf no server is selected, the application will be\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdeployed on the server where the user is logged in.\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\n\t\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\t\tonValueChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\tdefaultValue={\n\t\t\t\t\t\t\t\t\t\t\t\tfield.value || (!isCloud ? \"dokploy\" : undefined)\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder={!isCloud ? \"Dokploy\" : \"Select a Server\"}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{!isCloud && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"dokploy\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-2 justify-between w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>Dokploy</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground text-xs self-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDefault\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t{servers?.map((server) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={server.serverId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={server.serverId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-2 justify-between w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>{server.name}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground text-xs self-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{server.ipAddress}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tServers ({servers?.length + (!isCloud ? 1 : 0)})\n\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectGroup>\n\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"appName\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>App Name</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"my-app\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"composeType\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Compose Type</FormLabel>\n\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\tonValueChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\tdefaultValue={field.value}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a compose type\" />\n\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"docker-compose\">\n\t\t\t\t\t\t\t\t\t\t\t\tDocker Compose\n\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"stack\">Stack</SelectItem>\n\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"description\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Description</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Textarea\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Description of your service...\"\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"resize-none\"\n\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</form>\n\n\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t<Button isLoading={isPending} form=\"hook-form\" type=\"submit\">\n\t\t\t\t\t\t\tCreate\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</DialogFooter>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/project/add-database.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { AlertTriangle, Database, HelpCircle } from \"lucide-react\";\nimport { useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport {\n\tMariadbIcon,\n\tMongodbIcon,\n\tMysqlIcon,\n\tPostgresqlIcon,\n\tRedisIcon,\n} from \"@/components/icons/data-tools-icons\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport { DropdownMenuItem } from \"@/components/ui/dropdown-menu\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { Label } from \"@/components/ui/label\";\nimport { RadioGroup, RadioGroupItem } from \"@/components/ui/radio-group\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectGroup,\n\tSelectItem,\n\tSelectLabel,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { Switch } from \"@/components/ui/switch\";\nimport { Textarea } from \"@/components/ui/textarea\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { slugify } from \"@/lib/slug\";\nimport { api } from \"@/utils/api\";\n\ntype DbType = z.infer<typeof mySchema>[\"type\"];\n\nconst dockerImageDefaultPlaceholder: Record<DbType, string> = {\n\tmongo: \"mongo:7\",\n\tmariadb: \"mariadb:11\",\n\tmysql: \"mysql:8\",\n\tpostgres: \"postgres:18\",\n\tredis: \"redis:7\",\n};\n\nconst databasesUserDefaultPlaceholder: Record<\n\tExclude<DbType, \"redis\">,\n\tstring\n> = {\n\tmongo: \"mongo\",\n\tmariadb: \"mariadb\",\n\tmysql: \"mysql\",\n\tpostgres: \"postgres\",\n};\n\nconst baseDatabaseSchema = z.object({\n\tname: z.string().min(1, \"Name required\"),\n\tappName: z\n\t\t.string()\n\t\t.min(1, {\n\t\t\tmessage: \"App name is required\",\n\t\t})\n\t\t.regex(/^[a-z](?!.*--)([a-z0-9-]*[a-z])?$/, {\n\t\t\tmessage:\n\t\t\t\t\"App name supports lowercase letters, numbers, '-' and can only start and end letters, and does not support continuous '-'\",\n\t\t}),\n\tdatabasePassword: z\n\t\t.string()\n\t\t.regex(/^[a-zA-Z0-9@#%^&*()_+\\-=[\\]{}|;:,.<>?~`]*$/, {\n\t\t\tmessage:\n\t\t\t\t\"Password contains invalid characters. Please avoid: $ ! ' \\\" \\\\ / and space characters for database compatibility\",\n\t\t}),\n\tdockerImage: z.string(),\n\tdescription: z.string().nullable(),\n\tserverId: z.string().nullable(),\n});\n\nconst mySchema = z.discriminatedUnion(\"type\", [\n\tz\n\t\t.object({\n\t\t\ttype: z.literal(\"postgres\"),\n\t\t\tdatabaseName: z.string().default(\"postgres\"),\n\t\t\tdatabaseUser: z.string().default(\"postgres\"),\n\t\t})\n\t\t.merge(baseDatabaseSchema),\n\tz\n\t\t.object({\n\t\t\ttype: z.literal(\"mongo\"),\n\t\t\tdatabaseUser: z.string().default(\"mongo\"),\n\t\t\treplicaSets: z.boolean().default(false),\n\t\t})\n\t\t.merge(baseDatabaseSchema),\n\tz\n\t\t.object({\n\t\t\ttype: z.literal(\"redis\"),\n\t\t})\n\t\t.merge(baseDatabaseSchema),\n\tz\n\t\t.object({\n\t\t\ttype: z.literal(\"mysql\"),\n\t\t\tdatabaseRootPassword: z\n\t\t\t\t.string()\n\t\t\t\t.regex(/^[a-zA-Z0-9@#%^&*()_+\\-=[\\]{}|;:,.<>?~`]*$/, {\n\t\t\t\t\tmessage:\n\t\t\t\t\t\t\"Password contains invalid characters. Please avoid: $ ! ' \\\" \\\\ / and space characters for database compatibility\",\n\t\t\t\t})\n\t\t\t\t.optional(),\n\t\t\tdatabaseUser: z.string().default(\"mysql\"),\n\t\t\tdatabaseName: z.string().default(\"mysql\"),\n\t\t})\n\t\t.merge(baseDatabaseSchema),\n\tz\n\t\t.object({\n\t\t\ttype: z.literal(\"mariadb\"),\n\t\t\tdockerImage: z.string().default(\"mariadb:4\"),\n\t\t\tdatabaseRootPassword: z\n\t\t\t\t.string()\n\t\t\t\t.regex(/^[a-zA-Z0-9@#%^&*()_+\\-=[\\]{}|;:,.<>?~`]*$/, {\n\t\t\t\t\tmessage:\n\t\t\t\t\t\t\"Password contains invalid characters. Please avoid: $ ! ' \\\" \\\\ / and space characters for database compatibility\",\n\t\t\t\t})\n\t\t\t\t.optional(),\n\t\t\tdatabaseUser: z.string().default(\"mariadb\"),\n\t\t\tdatabaseName: z.string().default(\"mariadb\"),\n\t\t})\n\t\t.merge(baseDatabaseSchema),\n]);\n\nconst databasesMap = {\n\tpostgres: {\n\t\ticon: <PostgresqlIcon />,\n\t\tlabel: \"PostgreSQL\",\n\t},\n\tmongo: {\n\t\ticon: <MongodbIcon />,\n\t\tlabel: \"MongoDB\",\n\t},\n\tmariadb: {\n\t\ticon: <MariadbIcon />,\n\t\tlabel: \"MariaDB\",\n\t},\n\tmysql: {\n\t\ticon: <MysqlIcon />,\n\t\tlabel: \"MySQL\",\n\t},\n\tredis: {\n\t\ticon: <RedisIcon />,\n\t\tlabel: \"Redis\",\n\t},\n};\n\ntype AddDatabase = z.infer<typeof mySchema>;\n\ninterface Props {\n\tenvironmentId: string;\n\tprojectName?: string;\n}\n\nexport const AddDatabase = ({ environmentId, projectName }: Props) => {\n\tconst utils = api.useUtils();\n\tconst [visible, setVisible] = useState(false);\n\tconst slug = slugify(projectName);\n\tconst { data: isCloud } = api.settings.isCloud.useQuery();\n\tconst { data: servers } = api.server.withSSHKey.useQuery();\n\tconst postgresMutation = api.postgres.create.useMutation();\n\tconst mongoMutation = api.mongo.create.useMutation();\n\tconst redisMutation = api.redis.create.useMutation();\n\tconst mariadbMutation = api.mariadb.create.useMutation();\n\tconst mysqlMutation = api.mysql.create.useMutation();\n\n\t// Get environment data to extract projectId\n\tconst { data: environment } = api.environment.one.useQuery({ environmentId });\n\n\tconst hasServers = servers && servers.length > 0;\n\t// Show dropdown logic based on cloud environment\n\t// Cloud: show only if there are remote servers (no Dokploy option)\n\t// Self-hosted: show only if there are remote servers (Dokploy is default, hide if no remote servers)\n\tconst shouldShowServerDropdown = hasServers;\n\n\tconst form = useForm({\n\t\tdefaultValues: {\n\t\t\ttype: \"postgres\",\n\t\t\tdockerImage: \"\",\n\t\t\tname: \"\",\n\t\t\tappName: `${slug}-`,\n\t\t\tdatabasePassword: \"\",\n\t\t\tdescription: \"\",\n\t\t\tdatabaseName: \"\",\n\t\t\tdatabaseUser: \"\",\n\t\t\tserverId: null,\n\t\t},\n\t\tresolver: zodResolver(mySchema),\n\t});\n\tconst type = form.watch(\"type\");\n\tconst activeMutation = {\n\t\tpostgres: postgresMutation,\n\t\tmongo: mongoMutation,\n\t\tredis: redisMutation,\n\t\tmariadb: mariadbMutation,\n\t\tmysql: mysqlMutation,\n\t};\n\n\tconst onSubmit = async (data: AddDatabase) => {\n\t\tconst defaultDockerImage =\n\t\t\tdata.dockerImage || dockerImageDefaultPlaceholder[data.type];\n\n\t\tlet promise: Promise<unknown> | null = null;\n\t\tconst commonParams = {\n\t\t\tname: data.name,\n\t\t\tappName: data.appName,\n\t\t\tdockerImage: defaultDockerImage,\n\t\t\tserverId: data.serverId === \"dokploy\" ? undefined : data.serverId,\n\t\t\tenvironmentId,\n\t\t\tdescription: data.description,\n\t\t};\n\n\t\tif (data.type === \"postgres\") {\n\t\t\tpromise = postgresMutation.mutateAsync({\n\t\t\t\t...commonParams,\n\t\t\t\tdatabasePassword: data.databasePassword,\n\t\t\t\tdatabaseName: data.databaseName || \"postgres\",\n\n\t\t\t\tdatabaseUser:\n\t\t\t\t\tdata.databaseUser || databasesUserDefaultPlaceholder[data.type],\n\t\t\t\tserverId: data.serverId === \"dokploy\" ? null : data.serverId,\n\t\t\t});\n\t\t} else if (data.type === \"mongo\") {\n\t\t\tpromise = mongoMutation.mutateAsync({\n\t\t\t\t...commonParams,\n\t\t\t\tdatabasePassword: data.databasePassword,\n\t\t\t\tdatabaseUser:\n\t\t\t\t\tdata.databaseUser || databasesUserDefaultPlaceholder[data.type],\n\t\t\t\tserverId: data.serverId === \"dokploy\" ? null : data.serverId,\n\t\t\t\treplicaSets: data.replicaSets,\n\t\t\t});\n\t\t} else if (data.type === \"redis\") {\n\t\t\tpromise = redisMutation.mutateAsync({\n\t\t\t\t...commonParams,\n\t\t\t\tdatabasePassword: data.databasePassword,\n\t\t\t\tserverId: data.serverId === \"dokploy\" ? null : data.serverId,\n\t\t\t});\n\t\t} else if (data.type === \"mariadb\") {\n\t\t\tpromise = mariadbMutation.mutateAsync({\n\t\t\t\t...commonParams,\n\t\t\t\tdatabasePassword: data.databasePassword,\n\t\t\t\tdatabaseRootPassword: data.databaseRootPassword || \"\",\n\t\t\t\tdatabaseName: data.databaseName || \"mariadb\",\n\t\t\t\tdatabaseUser:\n\t\t\t\t\tdata.databaseUser || databasesUserDefaultPlaceholder[data.type],\n\t\t\t\tserverId: data.serverId === \"dokploy\" ? null : data.serverId,\n\t\t\t});\n\t\t} else if (data.type === \"mysql\") {\n\t\t\tpromise = mysqlMutation.mutateAsync({\n\t\t\t\t...commonParams,\n\t\t\t\tdatabasePassword: data.databasePassword,\n\t\t\t\tdatabaseName: data.databaseName || \"mysql\",\n\t\t\t\tdatabaseUser:\n\t\t\t\t\tdata.databaseUser || databasesUserDefaultPlaceholder[data.type],\n\t\t\t\tserverId: data.serverId === \"dokploy\" ? null : data.serverId,\n\t\t\t\tdatabaseRootPassword: data.databaseRootPassword || \"\",\n\t\t\t});\n\t\t}\n\n\t\tif (promise) {\n\t\t\tawait promise\n\t\t\t\t.then(async () => {\n\t\t\t\t\ttoast.success(\"Database Created\");\n\t\t\t\t\tform.reset({\n\t\t\t\t\t\ttype: \"postgres\",\n\t\t\t\t\t\tdockerImage: \"\",\n\t\t\t\t\t\tname: \"\",\n\t\t\t\t\t\tappName: `${projectName}-`,\n\t\t\t\t\t\tdatabasePassword: \"\",\n\t\t\t\t\t\tdescription: \"\",\n\t\t\t\t\t\tdatabaseName: \"\",\n\t\t\t\t\t\tdatabaseUser: \"\",\n\t\t\t\t\t});\n\t\t\t\t\tsetVisible(false);\n\t\t\t\t\t// Invalidate the project query to refresh the environment data\n\t\t\t\t\tawait utils.environment.one.invalidate({\n\t\t\t\t\t\tenvironmentId,\n\t\t\t\t\t});\n\t\t\t\t})\n\t\t\t\t.catch(() => {\n\t\t\t\t\ttoast.error(\"Error creating a database\");\n\t\t\t\t});\n\t\t}\n\t};\n\treturn (\n\t\t<Dialog open={visible} onOpenChange={setVisible}>\n\t\t\t<DialogTrigger className=\"w-full\">\n\t\t\t\t<DropdownMenuItem\n\t\t\t\t\tclassName=\"w-full cursor-pointer space-x-3\"\n\t\t\t\t\tonSelect={(e) => e.preventDefault()}\n\t\t\t\t>\n\t\t\t\t\t<Database className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t<span>Database</span>\n\t\t\t\t</DropdownMenuItem>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"md:max-h-[90vh]  sm:max-w-2xl\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Databases</DialogTitle>\n\t\t\t\t</DialogHeader>\n\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tid=\"hook-form\"\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\tclassName=\"grid w-full gap-8 \"\n\t\t\t\t\t>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tdefaultValue={form.control._defaultValues.type}\n\t\t\t\t\t\t\tname=\"type\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"space-y-3\">\n\t\t\t\t\t\t\t\t\t<FormLabel className=\"text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\tSelect a database\n\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<RadioGroup\n\t\t\t\t\t\t\t\t\t\t\tonValueChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\tdefaultValue={field.value}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"grid w-full grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{Object.entries(databasesMap).map(([key, value]) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={key}\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex w-full items-center space-x-3 space-y-0\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl className=\"w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<RadioGroupItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={key}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tid={key}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"peer sr-only\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Label\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtmlFor={key}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex flex-col items-center justify-between rounded-md border-2 border-muted bg-popover p-4 hover:bg-accent hover:text-accent-foreground peer-data-[state=checked]:border-primary [&:has([data-state=checked])]:border-primary cursor-pointer\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{value.icon}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{value.label}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Label>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t</RadioGroup>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t{activeMutation[field.value].isError && (\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-4 rounded-lg bg-red-50 p-2 dark:bg-red-950\">\n\t\t\t\t\t\t\t\t\t\t\t<AlertTriangle className=\"text-red-600 dark:text-red-400\" />\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm text-red-600 dark:text-red-400\">\n\t\t\t\t\t\t\t\t\t\t\t\t{activeMutation[field.value].error?.message}\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t\t<FormLabel className=\"text-lg font-semibold leading-none tracking-tight\">\n\t\t\t\t\t\t\t\tFill the next fields.\n\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"name\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Name</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Name\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst val = e.target.value || \"\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst serviceName = slugify(val.trim());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"appName\", `${slug}-${serviceName}`);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(val);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t{shouldShowServerDropdown && (\n\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\tname=\"serverId\"\n\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Select a Server</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\t\t\t\tonValueChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t\tdefaultValue={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.value || (!isCloud ? \"dokploy\" : undefined)\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t!isCloud ? \"Dokploy\" : \"Select a Server\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{!isCloud && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"dokploy\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-2 justify-between w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>Dokploy</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground text-xs self-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDefault\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{servers?.map((server) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={server.serverId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={server.serverId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{server.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tServers ({servers?.length + (!isCloud ? 1 : 0)})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"appName\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\tApp Name\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipProvider delayDuration={0}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<HelpCircle className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent side=\"right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tThis will be the name of the Docker Swarm\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tservice\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"my-app\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"description\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Description</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Textarea\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-24\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Description\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value || \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t{(type === \"mysql\" ||\n\t\t\t\t\t\t\t\t\ttype === \"mariadb\" ||\n\t\t\t\t\t\t\t\t\ttype === \"postgres\") && (\n\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\tname=\"databaseName\"\n\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Database Name</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"Database Name\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{(type === \"mysql\" ||\n\t\t\t\t\t\t\t\t\ttype === \"mariadb\" ||\n\t\t\t\t\t\t\t\t\ttype === \"postgres\" ||\n\t\t\t\t\t\t\t\t\ttype === \"mongo\") && (\n\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\tname=\"databaseUser\"\n\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Database User</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder={`Default ${databasesUserDefaultPlaceholder[type]}`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"databasePassword\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Database Password</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"password\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"******************\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tautoComplete=\"one-time-code\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tenablePasswordGenerator={true}\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t{(type === \"mysql\" || type === \"mariadb\") && (\n\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\tname=\"databaseRootPassword\"\n\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Database Root password</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"password\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"******************\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tenablePasswordGenerator={true}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"dockerImage\"\n\t\t\t\t\t\t\t\t\tdefaultValue={form.formState.defaultValues?.dockerImage}\n\t\t\t\t\t\t\t\t\trender={({ field }) => {\n\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Docker image</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder={`Default ${dockerImageDefaultPlaceholder[type]}`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t{type === \"mongo\" && (\n\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\tname=\"replicaSets\"\n\t\t\t\t\t\t\t\t\t\trender={({ field }) => {\n\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem className=\"flex flex-row items-center justify-between p-3 mt-4 border rounded-lg shadow-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Use Replica Sets</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</form>\n\n\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tisLoading={form.formState.isSubmitting}\n\t\t\t\t\t\t\tform=\"hook-form\"\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tCreate\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</DialogFooter>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/project/add-template.tsx",
    "content": "import {\n\tBookText,\n\tCheckIcon,\n\tChevronsUpDown,\n\tGlobe,\n\tHelpCircle,\n\tLayoutGrid,\n\tList,\n\tLoader2,\n\tPuzzleIcon,\n\tSearchIcon,\n} from \"lucide-react\";\nimport Link from \"next/link\";\nimport { useEffect, useState } from \"react\";\nimport { toast } from \"sonner\";\nimport { GithubIcon } from \"@/components/icons/data-tools-icons\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport {\n\tAlertDialog,\n\tAlertDialogAction,\n\tAlertDialogCancel,\n\tAlertDialogContent,\n\tAlertDialogDescription,\n\tAlertDialogFooter,\n\tAlertDialogHeader,\n\tAlertDialogTitle,\n\tAlertDialogTrigger,\n} from \"@/components/ui/alert-dialog\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCommand,\n\tCommandEmpty,\n\tCommandGroup,\n\tCommandInput,\n\tCommandItem,\n} from \"@/components/ui/command\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport { DropdownMenuItem } from \"@/components/ui/dropdown-menu\";\nimport { Input } from \"@/components/ui/input\";\nimport { Label } from \"@/components/ui/label\";\nimport {\n\tPopover,\n\tPopoverContent,\n\tPopoverTrigger,\n} from \"@/components/ui/popover\";\nimport { ScrollArea } from \"@/components/ui/scroll-area\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectGroup,\n\tSelectItem,\n\tSelectLabel,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { cn } from \"@/lib/utils\";\nimport { api } from \"@/utils/api\";\n\nconst TEMPLATE_BASE_URL_KEY = \"dokploy_template_base_url\";\n\ninterface Props {\n\tenvironmentId: string;\n\tbaseUrl?: string;\n}\n\nexport const AddTemplate = ({ environmentId, baseUrl }: Props) => {\n\tconst [query, setQuery] = useState(\"\");\n\tconst [open, setOpen] = useState(false);\n\tconst [viewMode, setViewMode] = useState<\"detailed\" | \"icon\">(\"detailed\");\n\tconst [selectedTags, setSelectedTags] = useState<string[]>([]);\n\tconst [customBaseUrl, setCustomBaseUrl] = useState<string | undefined>(() => {\n\t\t// Try to get from props first, then localStorage\n\t\tif (baseUrl) return baseUrl;\n\t\tif (typeof window !== \"undefined\") {\n\t\t\treturn localStorage.getItem(TEMPLATE_BASE_URL_KEY) || undefined;\n\t\t}\n\t\treturn undefined;\n\t});\n\n\t// Get environment data to extract projectId\n\tconst { data: environment } = api.environment.one.useQuery({ environmentId });\n\n\t// Save to localStorage when customBaseUrl changes\n\tuseEffect(() => {\n\t\tif (customBaseUrl) {\n\t\t\tlocalStorage.setItem(TEMPLATE_BASE_URL_KEY, customBaseUrl);\n\t\t} else {\n\t\t\tlocalStorage.removeItem(TEMPLATE_BASE_URL_KEY);\n\t\t}\n\t}, [customBaseUrl]);\n\n\tconst {\n\t\tdata,\n\t\tisLoading: isLoadingTemplates,\n\t\terror: errorTemplates,\n\t\tisError: isErrorTemplates,\n\t} = api.compose.templates.useQuery(\n\t\t{ baseUrl: customBaseUrl },\n\t\t{\n\t\t\tenabled: open,\n\t\t},\n\t);\n\tconst { data: isCloud } = api.settings.isCloud.useQuery();\n\tconst { data: servers } = api.server.withSSHKey.useQuery();\n\tconst { data: tags, isPending: isLoadingTags } = api.compose.getTags.useQuery(\n\t\t{ baseUrl: customBaseUrl },\n\t\t{\n\t\t\tenabled: open,\n\t\t},\n\t);\n\tconst utils = api.useUtils();\n\n\tconst [serverId, setServerId] = useState<string | undefined>(undefined);\n\tconst { mutateAsync, isPending, error, isError } =\n\t\tapi.compose.deployTemplate.useMutation();\n\n\tconst templates =\n\t\tdata?.filter((template) => {\n\t\t\tconst matchesTags =\n\t\t\t\tselectedTags.length === 0 ||\n\t\t\t\ttemplate.tags.some((tag) => selectedTags.includes(tag));\n\t\t\tconst matchesQuery =\n\t\t\t\tquery === \"\" ||\n\t\t\t\ttemplate.name.toLowerCase().includes(query.toLowerCase()) ||\n\t\t\t\ttemplate.description.toLowerCase().includes(query.toLowerCase());\n\t\t\treturn matchesTags && matchesQuery;\n\t\t}) || [];\n\n\tconst hasServers = servers && servers.length > 0;\n\t// Show dropdown logic based on cloud environment\n\t// Cloud: show only if there are remote servers (no Dokploy option)\n\t// Self-hosted: show only if there are remote servers (Dokploy is default, hide if no remote servers)\n\tconst shouldShowServerDropdown = hasServers;\n\n\treturn (\n\t\t<Dialog open={open} onOpenChange={setOpen}>\n\t\t\t<DialogTrigger className=\"w-full\">\n\t\t\t\t<DropdownMenuItem\n\t\t\t\t\tclassName=\"w-full cursor-pointer space-x-3\"\n\t\t\t\t\tonSelect={(e) => e.preventDefault()}\n\t\t\t\t>\n\t\t\t\t\t<PuzzleIcon className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t<span>Template</span>\n\t\t\t\t</DropdownMenuItem>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-[90vw] p-0\">\n\t\t\t\t<DialogHeader className=\"sticky top-0 z-10 bg-background p-6 border-b\">\n\t\t\t\t\t<div className=\"flex flex-col space-y-6\">\n\t\t\t\t\t\t<div className=\"flex flex-col lg:flex-row lg:items-center lg:justify-between gap-6\">\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<DialogTitle>Create from Template</DialogTitle>\n\t\t\t\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\t\t\t\tCreate an open source application from a template\n\t\t\t\t\t\t\t\t</DialogDescription>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"flex flex-col sm:flex-row items-start sm:items-center gap-4\">\n\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\tplaceholder=\"Search Template\"\n\t\t\t\t\t\t\t\t\tonChange={(e) => setQuery(e.target.value)}\n\t\t\t\t\t\t\t\t\tclassName=\"w-full\"\n\t\t\t\t\t\t\t\t\tvalue={query}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\tplaceholder=\"Base URL (optional)\"\n\t\t\t\t\t\t\t\t\tonChange={(e) =>\n\t\t\t\t\t\t\t\t\t\tsetCustomBaseUrl(e.target.value || undefined)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tclassName=\"w-full sm:w-[300px]\"\n\t\t\t\t\t\t\t\t\tvalue={customBaseUrl || \"\"}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<Popover modal={true}>\n\t\t\t\t\t\t\t\t\t<PopoverTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\"w-full sm:w-[200px] justify-between !bg-input\",\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{isLoadingTags\n\t\t\t\t\t\t\t\t\t\t\t\t? \"Loading....\"\n\t\t\t\t\t\t\t\t\t\t\t\t: selectedTags.length > 0\n\t\t\t\t\t\t\t\t\t\t\t\t\t? `Selected ${selectedTags.length} tags`\n\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Select tag\"}\n\n\t\t\t\t\t\t\t\t\t\t\t<ChevronsUpDown className=\"ml-2 h-4 w-4 opacity-50\" />\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t</PopoverTrigger>\n\t\t\t\t\t\t\t\t\t<PopoverContent className=\"p-0\" align=\"start\">\n\t\t\t\t\t\t\t\t\t\t<Command>\n\t\t\t\t\t\t\t\t\t\t\t<CommandInput\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Search tag...\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-9\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t{isLoadingTags && (\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"py-6 text-center text-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t\tLoading Tags....\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t<CommandEmpty>No tags found.</CommandEmpty>\n\t\t\t\t\t\t\t\t\t\t\t<ScrollArea className=\"h-96\">\n\t\t\t\t\t\t\t\t\t\t\t\t<CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{tags?.map((tag) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={tag}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={tag}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (selectedTags.includes(tag)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetSelectedTags(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tselectedTags.filter((t) => t !== tag),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetSelectedTags([...selectedTags, tag]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{tag}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CheckIcon\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"ml-auto h-4 w-4\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tselectedTags.includes(tag)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"opacity-100\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"opacity-0\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t</ScrollArea>\n\t\t\t\t\t\t\t\t\t\t</Command>\n\t\t\t\t\t\t\t\t\t</PopoverContent>\n\t\t\t\t\t\t\t\t</Popover>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\t\t\tsetViewMode(viewMode === \"detailed\" ? \"icon\" : \"detailed\")\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tclassName=\"h-9 w-9 flex-shrink-0\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{viewMode === \"detailed\" ? (\n\t\t\t\t\t\t\t\t\t\t<LayoutGrid className=\"size-4\" />\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t<List className=\"size-4\" />\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{selectedTags.length > 0 && (\n\t\t\t\t\t\t\t<div className=\"flex flex-wrap justify-end gap-2\">\n\t\t\t\t\t\t\t\t{selectedTags.map((tag) => (\n\t\t\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\t\t\tkey={tag}\n\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"cursor-pointer\"\n\t\t\t\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\t\t\t\tsetSelectedTags(selectedTags.filter((t) => t !== tag))\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{tag} ×\n\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</DialogHeader>\n\n\t\t\t\t<ScrollArea className=\"h-[calc(98vh-8rem)]\">\n\t\t\t\t\t<div className=\"p-6\">\n\t\t\t\t\t\t{isError && (\n\t\t\t\t\t\t\t<AlertBlock type=\"error\" className=\"mb-4\">\n\t\t\t\t\t\t\t\t{error?.message}\n\t\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{isErrorTemplates && (\n\t\t\t\t\t\t\t<AlertBlock type=\"error\" className=\"mb-4\">\n\t\t\t\t\t\t\t\t{errorTemplates?.message}\n\t\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{isLoadingTemplates ? (\n\t\t\t\t\t\t\t<div className=\"flex justify-center items-center w-full h-full flex-row gap-4\">\n\t\t\t\t\t\t\t\t<Loader2 className=\"size-8 text-muted-foreground animate-spin min-h-[60vh]\" />\n\t\t\t\t\t\t\t\t<div className=\"text-lg font-medium text-muted-foreground\">\n\t\t\t\t\t\t\t\t\tLoading templates...\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : templates.length === 0 ? (\n\t\t\t\t\t\t\t<div className=\"flex justify-center items-center w-full gap-2 min-h-[50vh]\">\n\t\t\t\t\t\t\t\t<SearchIcon className=\"text-muted-foreground size-6\" />\n\t\t\t\t\t\t\t\t<div className=\"text-xl font-medium text-muted-foreground\">\n\t\t\t\t\t\t\t\t\tNo templates found\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\"grid gap-6\",\n\t\t\t\t\t\t\t\t\tviewMode === \"detailed\"\n\t\t\t\t\t\t\t\t\t\t? \"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5\"\n\t\t\t\t\t\t\t\t\t\t: \"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 xl:grid-cols-5 2xl:grid-cols-6\",\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{templates?.map((template, idx) => (\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tkey={`${template.id}-${template.version || \"default\"}-${idx}`}\n\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\"flex flex-col border rounded-lg overflow-hidden relative\",\n\t\t\t\t\t\t\t\t\t\t\tviewMode === \"icon\" && \"h-[200px]\",\n\t\t\t\t\t\t\t\t\t\t\tviewMode === \"detailed\" && \"h-[400px]\",\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Badge className=\"absolute top-2 right-2\" variant=\"blue\">\n\t\t\t\t\t\t\t\t\t\t\t{template?.version}\n\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\"flex-none p-6 pb-3 flex flex-col items-center gap-4 bg-muted/30\",\n\t\t\t\t\t\t\t\t\t\t\t\tviewMode === \"detailed\" && \"border-b\",\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{/** biome-ignore lint/performance/noImgElement: this is a valid use for img tag */}\n\t\t\t\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\t\t\t\tsrc={`${customBaseUrl || \"https://templates.dokploy.com/\"}/blueprints/${template?.id}/${template?.logo}`}\n\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"object-contain\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tviewMode === \"detailed\" ? \"size-24\" : \"size-16\",\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\talt={template?.name}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm font-medium line-clamp-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{template?.name}\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t{viewMode === \"detailed\" &&\n\t\t\t\t\t\t\t\t\t\t\t\t\ttemplate?.tags?.length > 0 && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-wrap justify-center gap-1.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{template?.tags?.map((tag) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={tag}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"green\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-[10px] px-2 py-0\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{tag}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t{/* Template Content */}\n\t\t\t\t\t\t\t\t\t\t{viewMode === \"detailed\" && (\n\t\t\t\t\t\t\t\t\t\t\t<ScrollArea className=\"flex-1 p-6\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{template?.description}\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</ScrollArea>\n\t\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t\t{/* Create Button */}\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\"flex-none px-6 py-3 mt-auto\",\n\t\t\t\t\t\t\t\t\t\t\t\tviewMode === \"detailed\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t? \"flex items-center justify-between bg-muted/30 border-t\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t: \"flex justify-center\",\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{viewMode === \"detailed\" && (\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{template?.links?.github && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thref={template?.links?.github}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-muted-foreground hover:text-foreground transition-colors\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<GithubIcon className=\"size-5\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t{template?.links?.website && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thref={template?.links?.website}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-muted-foreground hover:text-foreground transition-colors\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Globe className=\"size-5\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t{template?.links?.docs && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thref={template?.links?.docs}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-muted-foreground hover:text-foreground transition-colors\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<BookText className=\"size-5\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t<AlertDialog>\n\t\t\t\t\t\t\t\t\t\t\t\t<AlertDialogTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"w-auto\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tviewMode === \"detailed\" && \"w-auto\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tCreate\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t</AlertDialogTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<AlertDialogContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<AlertDialogHeader>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<AlertDialogTitle>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAre you absolutely sure?\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</AlertDialogTitle>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<AlertDialogDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tThis will create an application from the{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{template?.name} template and add it to your\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tproject.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</AlertDialogDescription>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{shouldShowServerDropdown && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipProvider delayDuration={0}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Label className=\"break-all w-fit flex flex-row gap-1 items-center pb-2 pt-3.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSelect a Server{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{!isCloud ? \"(Optional)\" : \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<HelpCircle className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Label>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"z-[999] w-[300px]\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\talign=\"start\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tside=\"top\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tIf no server is selected, the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tapplication will be deployed on the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tserver where the user is logged in.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonValueChange={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetServerId(e);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdefaultValue={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t!isCloud ? \"dokploy\" : undefined\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t!isCloud ? \"Dokploy\" : \"Select a Server\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{!isCloud && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"dokploy\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-2 justify-between w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>Dokploy</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground text-xs self-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDefault\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{servers?.map((server) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={server.serverId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={server.serverId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-2 justify-between w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>{server.name}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground text-xs self-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{server.ipAddress}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tServers (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{servers?.length + (!isCloud ? 1 : 0)})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</AlertDialogHeader>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<AlertDialogFooter>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<AlertDialogCancel>Cancel</AlertDialogCancel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<AlertDialogAction\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisabled={isPending}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst promise = mutateAsync({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tserverId:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tserverId === \"dokploy\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: serverId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenvironmentId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tid: template.id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbaseUrl: customBaseUrl,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.promise(promise, {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tloading: \"Setting up...\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsuccess: () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Invalidate the project query to refresh the environment data\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tutils.environment.one.invalidate({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenvironmentId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetOpen(false);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn `${template.name} template created successfully`;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\terror: () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn `An error occurred deploying ${template.name} template`;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tConfirm\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</AlertDialogAction>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</AlertDialogFooter>\n\t\t\t\t\t\t\t\t\t\t\t\t</AlertDialogContent>\n\t\t\t\t\t\t\t\t\t\t\t</AlertDialog>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</ScrollArea>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/project/advanced-environment-selector.tsx",
    "content": "import type { findEnvironmentsByProjectId } from \"@dokploy/server\";\nimport { ChevronDownIcon, PencilIcon, PlusIcon, TrashIcon } from \"lucide-react\";\nimport { useRouter } from \"next/router\";\nimport { useState } from \"react\";\nimport { toast } from \"sonner\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n} from \"@/components/ui/dialog\";\nimport {\n\tDropdownMenu,\n\tDropdownMenuContent,\n\tDropdownMenuItem,\n\tDropdownMenuLabel,\n\tDropdownMenuSeparator,\n\tDropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\nimport { Input } from \"@/components/ui/input\";\nimport { Label } from \"@/components/ui/label\";\nimport { Textarea } from \"@/components/ui/textarea\";\nimport { api } from \"@/utils/api\";\n\ntype Environment = Awaited<\n\tReturnType<typeof findEnvironmentsByProjectId>\n>[number];\ninterface AdvancedEnvironmentSelectorProps {\n\tprojectId: string;\n\tcurrentEnvironmentId?: string;\n}\n\nexport const AdvancedEnvironmentSelector = ({\n\tprojectId,\n\tcurrentEnvironmentId,\n}: AdvancedEnvironmentSelectorProps) => {\n\tconst router = useRouter();\n\tconst [isCreateDialogOpen, setIsCreateDialogOpen] = useState(false);\n\tconst [isEditDialogOpen, setIsEditDialogOpen] = useState(false);\n\tconst [isDeleteDialogOpen, setIsDeleteDialogOpen] = useState(false);\n\tconst [selectedEnvironment, setSelectedEnvironment] =\n\t\tuseState<Environment | null>(null);\n\n\tconst { data: environments } = api.environment.byProjectId.useQuery(\n\t\t{ projectId: projectId },\n\t\t{\n\t\t\tenabled: !!projectId,\n\t\t},\n\t);\n\n\t// Form states\n\tconst [name, setName] = useState(\"\");\n\tconst [description, setDescription] = useState(\"\");\n\n\t// Get current user's permissions\n\tconst { data: permissions } = api.user.getPermissions.useQuery();\n\n\t// Check if user can create environments\n\tconst canCreateEnvironments = !!permissions?.environment.create;\n\n\t// Check if user can delete environments\n\tconst canDeleteEnvironments = !!permissions?.environment.delete;\n\n\tconst haveServices =\n\t\tselectedEnvironment &&\n\t\t((selectedEnvironment?.mariadb?.length || 0) > 0 ||\n\t\t\t(selectedEnvironment?.mongo?.length || 0) > 0 ||\n\t\t\t(selectedEnvironment?.mysql?.length || 0) > 0 ||\n\t\t\t(selectedEnvironment?.postgres?.length || 0) > 0 ||\n\t\t\t(selectedEnvironment?.redis?.length || 0) > 0 ||\n\t\t\t(selectedEnvironment?.applications?.length || 0) > 0 ||\n\t\t\t(selectedEnvironment?.compose?.length || 0) > 0);\n\tconst createEnvironment = api.environment.create.useMutation();\n\tconst updateEnvironment = api.environment.update.useMutation();\n\tconst deleteEnvironment = api.environment.remove.useMutation();\n\tconst duplicateEnvironment = api.environment.duplicate.useMutation();\n\n\t// Refetch project data\n\tconst utils = api.useUtils();\n\n\tconst handleCreateEnvironment = async () => {\n\t\ttry {\n\t\t\tawait createEnvironment.mutateAsync({\n\t\t\t\tprojectId,\n\t\t\t\tname: name.trim(),\n\t\t\t\tdescription: description.trim() || undefined,\n\t\t\t});\n\n\t\t\ttoast.success(\"Environment created successfully\");\n\t\t\tutils.environment.byProjectId.invalidate({ projectId });\n\t\t\t// Invalidate the project query to refresh the project data for the advance-breadcrumb\n\t\t\tutils.project.all.invalidate();\n\t\t\tsetIsCreateDialogOpen(false);\n\t\t\tsetName(\"\");\n\t\t\tsetDescription(\"\");\n\t\t} catch (error) {\n\t\t\ttoast.error(\n\t\t\t\t`Failed to create environment: ${error instanceof Error ? error.message : error}`,\n\t\t\t);\n\t\t}\n\t};\n\n\tconst handleUpdateEnvironment = async () => {\n\t\tif (!selectedEnvironment) return;\n\n\t\ttry {\n\t\t\tawait updateEnvironment.mutateAsync({\n\t\t\t\tenvironmentId: selectedEnvironment.environmentId,\n\t\t\t\tname: name.trim(),\n\t\t\t\tdescription: description.trim() || undefined,\n\t\t\t});\n\n\t\t\ttoast.success(\"Environment updated successfully\");\n\t\t\tutils.environment.byProjectId.invalidate({ projectId });\n\t\t\tsetIsEditDialogOpen(false);\n\t\t\tsetSelectedEnvironment(null);\n\t\t\tsetName(\"\");\n\t\t\tsetDescription(\"\");\n\t\t} catch (error) {\n\t\t\ttoast.error(\n\t\t\t\t`Failed to update environment: ${error instanceof Error ? error.message : error}`,\n\t\t\t);\n\t\t}\n\t};\n\n\tconst handleDeleteEnvironment = async () => {\n\t\tif (!selectedEnvironment) return;\n\n\t\ttry {\n\t\t\tawait deleteEnvironment.mutateAsync({\n\t\t\t\tenvironmentId: selectedEnvironment.environmentId,\n\t\t\t});\n\n\t\t\ttoast.success(\"Environment deleted successfully\");\n\t\t\tutils.environment.byProjectId.invalidate({ projectId });\n\t\t\tsetIsDeleteDialogOpen(false);\n\t\t\tsetSelectedEnvironment(null);\n\n\t\t\t// Redirect to first available environment if we deleted the current environment\n\t\t\tif (selectedEnvironment.environmentId === currentEnvironmentId) {\n\t\t\t\tconst firstEnv = environments?.find(\n\t\t\t\t\t(env) => env.environmentId !== selectedEnvironment.environmentId,\n\t\t\t\t);\n\t\t\t\tif (firstEnv) {\n\t\t\t\t\trouter.push(\n\t\t\t\t\t\t`/dashboard/project/${projectId}/environment/${firstEnv.environmentId}`,\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\t// No other environments, redirect to project page\n\t\t\t\t\trouter.push(`/dashboard/project/${projectId}`);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (error) {\n\t\t\ttoast.error(\"Failed to delete environment\");\n\t\t}\n\t};\n\n\tconst handleDuplicateEnvironment = async (environment: Environment) => {\n\t\ttry {\n\t\t\tconst result = await duplicateEnvironment.mutateAsync({\n\t\t\t\tenvironmentId: environment.environmentId,\n\t\t\t\tname: `${environment.name}-copy`,\n\t\t\t\tdescription: environment.description || undefined,\n\t\t\t});\n\n\t\t\ttoast.success(\"Environment duplicated successfully\");\n\t\t\tutils.project.one.invalidate({ projectId });\n\n\t\t\t// Navigate to the new duplicated environment\n\t\t\trouter.push(\n\t\t\t\t`/dashboard/project/${projectId}/environment/${result.environmentId}`,\n\t\t\t);\n\t\t} catch (error) {\n\t\t\ttoast.error(\"Failed to duplicate environment\");\n\t\t}\n\t};\n\n\tconst openEditDialog = (environment: Environment) => {\n\t\tsetSelectedEnvironment(environment);\n\t\tsetName(environment.name);\n\t\tsetDescription(environment.description || \"\");\n\t\tsetIsEditDialogOpen(true);\n\t};\n\n\tconst openDeleteDialog = (environment: Environment) => {\n\t\tsetSelectedEnvironment(environment);\n\t\tsetIsDeleteDialogOpen(true);\n\t};\n\n\tconst currentEnv = environments?.find(\n\t\t(env) => env.environmentId === currentEnvironmentId,\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<DropdownMenu>\n\t\t\t\t<DropdownMenuTrigger asChild>\n\t\t\t\t\t<Button variant=\"ghost\" className=\"h-auto p-2 font-normal\">\n\t\t\t\t\t\t<div className=\"flex items-center gap-1\">\n\t\t\t\t\t\t\t<span className=\"text-muted-foreground\">/</span>\n\t\t\t\t\t\t\t<span>{currentEnv?.name || \"Select Environment\"}</span>\n\t\t\t\t\t\t\t<ChevronDownIcon className=\"h-4 w-4 text-muted-foreground\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</Button>\n\t\t\t\t</DropdownMenuTrigger>\n\t\t\t\t<DropdownMenuContent className=\"w-[300px]\" align=\"start\">\n\t\t\t\t\t<DropdownMenuLabel>Environments</DropdownMenuLabel>\n\t\t\t\t\t<DropdownMenuSeparator />\n\n\t\t\t\t\t{environments?.map((environment) => {\n\t\t\t\t\t\tconst servicesCount =\n\t\t\t\t\t\t\tenvironment.mariadb.length +\n\t\t\t\t\t\t\tenvironment.mongo.length +\n\t\t\t\t\t\t\tenvironment.mysql.length +\n\t\t\t\t\t\t\tenvironment.postgres.length +\n\t\t\t\t\t\t\tenvironment.redis.length +\n\t\t\t\t\t\t\tenvironment.applications.length +\n\t\t\t\t\t\t\tenvironment.compose.length;\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tkey={environment.environmentId}\n\t\t\t\t\t\t\t\tclassName=\"flex items-center\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\t\t\t\tclassName=\"flex-1 cursor-pointer\"\n\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\trouter.push(\n\t\t\t\t\t\t\t\t\t\t\t`/dashboard/project/${projectId}/environment/${environment.environmentId}`,\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<div className=\"flex items-center justify-between w-full\">\n\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t\t\t{environment.name} ({servicesCount})\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t{environment.environmentId === currentEnvironmentId && (\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"w-2 h-2 bg-blue-500 rounded-full\" />\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-1 px-2\">\n\t\t\t\t\t\t\t\t\t{!environment.isDefault && (\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-6 w-6 p-0\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t\t\t\t\t\t\t\topenEditDialog(environment);\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<PencilIcon className=\"h-3 w-3\" />\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t{canDeleteEnvironments && !environment.isDefault && (\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-6 w-6 p-0 text-red-600 hover:text-red-700\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t\t\t\t\t\t\t\topenDeleteDialog(environment);\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<TrashIcon className=\"h-3 w-3\" />\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\n\t\t\t\t\t<DropdownMenuSeparator />\n\t\t\t\t\t{canCreateEnvironments && (\n\t\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\t\tclassName=\"cursor-pointer\"\n\t\t\t\t\t\t\tonClick={() => setIsCreateDialogOpen(true)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<PlusIcon className=\"h-4 w-4 mr-2\" />\n\t\t\t\t\t\t\tCreate Environment\n\t\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t)}\n\t\t\t\t</DropdownMenuContent>\n\t\t\t</DropdownMenu>\n\n\t\t\t<Dialog open={isCreateDialogOpen} onOpenChange={setIsCreateDialogOpen}>\n\t\t\t\t<DialogContent>\n\t\t\t\t\t<DialogHeader>\n\t\t\t\t\t\t<DialogTitle>Create Environment</DialogTitle>\n\t\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\t\tCreate a new environment for your project.\n\t\t\t\t\t\t</DialogDescription>\n\t\t\t\t\t</DialogHeader>\n\n\t\t\t\t\t<div className=\"space-y-4\">\n\t\t\t\t\t\t<div className=\"space-y-1\">\n\t\t\t\t\t\t\t<Label htmlFor=\"name\">Name</Label>\n\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\tid=\"name\"\n\t\t\t\t\t\t\t\tvalue={name}\n\t\t\t\t\t\t\t\tonChange={(e) => setName(e.target.value)}\n\t\t\t\t\t\t\t\tplaceholder=\"Environment name\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"space-y-1\">\n\t\t\t\t\t\t\t<Label htmlFor=\"description\">Description (optional)</Label>\n\t\t\t\t\t\t\t<Textarea\n\t\t\t\t\t\t\t\tid=\"description\"\n\t\t\t\t\t\t\t\tvalue={description}\n\t\t\t\t\t\t\t\tonChange={(e) => setDescription(e.target.value)}\n\t\t\t\t\t\t\t\tplaceholder=\"Environment description\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\tsetIsCreateDialogOpen(false);\n\t\t\t\t\t\t\t\tsetName(\"\");\n\t\t\t\t\t\t\t\tsetDescription(\"\");\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tCancel\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tonClick={handleCreateEnvironment}\n\t\t\t\t\t\t\tdisabled={!name.trim() || createEnvironment.isPending}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{createEnvironment.isPending ? \"Creating...\" : \"Create\"}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</DialogFooter>\n\t\t\t\t</DialogContent>\n\t\t\t</Dialog>\n\n\t\t\t{/* Edit Environment Dialog */}\n\t\t\t<Dialog open={isEditDialogOpen} onOpenChange={setIsEditDialogOpen}>\n\t\t\t\t<DialogContent>\n\t\t\t\t\t<DialogHeader>\n\t\t\t\t\t\t<DialogTitle>Edit Environment</DialogTitle>\n\t\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\t\tUpdate the environment details.\n\t\t\t\t\t\t</DialogDescription>\n\t\t\t\t\t</DialogHeader>\n\n\t\t\t\t\t<div className=\"space-y-4\">\n\t\t\t\t\t\t<div className=\"space-y-1\">\n\t\t\t\t\t\t\t<Label htmlFor=\"edit-name\">Name</Label>\n\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\tid=\"edit-name\"\n\t\t\t\t\t\t\t\tvalue={name}\n\t\t\t\t\t\t\t\tonChange={(e) => setName(e.target.value)}\n\t\t\t\t\t\t\t\tplaceholder=\"Environment name\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"space-y-1\">\n\t\t\t\t\t\t\t<Label htmlFor=\"edit-description\">Description (optional)</Label>\n\t\t\t\t\t\t\t<Textarea\n\t\t\t\t\t\t\t\tid=\"edit-description\"\n\t\t\t\t\t\t\t\tvalue={description}\n\t\t\t\t\t\t\t\tonChange={(e) => setDescription(e.target.value)}\n\t\t\t\t\t\t\t\tplaceholder=\"Environment description\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\tsetIsEditDialogOpen(false);\n\t\t\t\t\t\t\t\tsetSelectedEnvironment(null);\n\t\t\t\t\t\t\t\tsetName(\"\");\n\t\t\t\t\t\t\t\tsetDescription(\"\");\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tCancel\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tonClick={handleUpdateEnvironment}\n\t\t\t\t\t\t\tdisabled={!name.trim() || updateEnvironment.isPending}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{updateEnvironment.isPending ? \"Updating...\" : \"Update\"}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</DialogFooter>\n\t\t\t\t</DialogContent>\n\t\t\t</Dialog>\n\n\t\t\t{/* Delete Environment Dialog */}\n\t\t\t<Dialog open={isDeleteDialogOpen} onOpenChange={setIsDeleteDialogOpen}>\n\t\t\t\t<DialogContent>\n\t\t\t\t\t<DialogHeader>\n\t\t\t\t\t\t<DialogTitle>Delete Environment</DialogTitle>\n\t\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\t\tAre you sure you want to delete the environment \"\n\t\t\t\t\t\t\t{selectedEnvironment?.name}\"? This action cannot be undone and\n\t\t\t\t\t\t\twill also delete all services in this environment.\n\t\t\t\t\t\t</DialogDescription>\n\t\t\t\t\t</DialogHeader>\n\n\t\t\t\t\t{haveServices && (\n\t\t\t\t\t\t<AlertBlock type=\"warning\">\n\t\t\t\t\t\t\tThis environment have active services, please delete them first.\n\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t)}\n\n\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\tsetIsDeleteDialogOpen(false);\n\t\t\t\t\t\t\t\tsetSelectedEnvironment(null);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tCancel\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"destructive\"\n\t\t\t\t\t\t\tonClick={handleDeleteEnvironment}\n\t\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\t\tdeleteEnvironment.isPending ||\n\t\t\t\t\t\t\t\thaveServices ||\n\t\t\t\t\t\t\t\t!selectedEnvironment\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{deleteEnvironment.isPending ? \"Deleting...\" : \"Delete\"}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</DialogFooter>\n\t\t\t\t</DialogContent>\n\t\t\t</Dialog>\n\t\t</>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/project/ai/step-one.tsx",
    "content": "\"use client\";\n\nimport { Button } from \"@/components/ui/button\";\nimport { Label } from \"@/components/ui/label\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectGroup,\n\tSelectItem,\n\tSelectLabel,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { Textarea } from \"@/components/ui/textarea\";\nimport { api } from \"@/utils/api\";\n\nconst examples = [\n\t\"Make a personal blog\",\n\t\"Add a photo studio portfolio\",\n\t\"Create a personal ad blocker\",\n\t\"Build a social media dashboard\",\n\t\"Sendgrid service opensource analogue\",\n];\n\nexport const StepOne = ({ setTemplateInfo, templateInfo }: any) => {\n\t// Get servers from the API\n\tconst { data: servers } = api.server.withSSHKey.useQuery();\n\tconst { data: isCloud } = api.settings.isCloud.useQuery();\n\tconst hasServers = servers && servers.length > 0;\n\t// Show dropdown logic based on cloud environment\n\t// Cloud: show only if there are remote servers (no Dokploy option)\n\t// Self-hosted: show only if there are remote servers (Dokploy is default, hide if no remote servers)\n\tconst shouldShowServerDropdown = hasServers;\n\n\tconst handleExampleClick = (example: string) => {\n\t\tsetTemplateInfo({ ...templateInfo, userInput: example });\n\t};\n\treturn (\n\t\t<div className=\"flex flex-col h-full gap-4\">\n\t\t\t<div className=\"\">\n\t\t\t\t<div className=\"space-y-4 \">\n\t\t\t\t\t<h2 className=\"text-lg font-semibold\">Step 1: Describe Your Needs</h2>\n\t\t\t\t\t<div className=\"space-y-2\">\n\t\t\t\t\t\t<Label htmlFor=\"user-needs\">Describe your template needs</Label>\n\t\t\t\t\t\t<Textarea\n\t\t\t\t\t\t\tid=\"user-needs\"\n\t\t\t\t\t\t\tplaceholder=\"Describe the type of template you need, its purpose, and any specific features you'd like to include.\"\n\t\t\t\t\t\t\tvalue={templateInfo?.userInput}\n\t\t\t\t\t\t\tonChange={(e) =>\n\t\t\t\t\t\t\t\tsetTemplateInfo({ ...templateInfo, userInput: e.target.value })\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tclassName=\"min-h-[100px]\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t{shouldShowServerDropdown && (\n\t\t\t\t\t\t<div className=\"space-y-2\">\n\t\t\t\t\t\t\t<Label htmlFor=\"server-deploy\">\n\t\t\t\t\t\t\t\tSelect the server where you want to deploy (optional)\n\t\t\t\t\t\t\t</Label>\n\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t\t\ttemplateInfo.server?.serverId ||\n\t\t\t\t\t\t\t\t\t(!isCloud ? \"dokploy\" : undefined)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonValueChange={(value) => {\n\t\t\t\t\t\t\t\t\tif (value === \"dokploy\") {\n\t\t\t\t\t\t\t\t\t\tsetTemplateInfo({\n\t\t\t\t\t\t\t\t\t\t\t...templateInfo,\n\t\t\t\t\t\t\t\t\t\t\tserver: undefined,\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tconst server = servers?.find((s) => s.serverId === value);\n\t\t\t\t\t\t\t\t\t\tif (server) {\n\t\t\t\t\t\t\t\t\t\t\tsetTemplateInfo({\n\t\t\t\t\t\t\t\t\t\t\t\t...templateInfo,\n\t\t\t\t\t\t\t\t\t\t\t\tserver: server,\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<SelectTrigger className=\"w-full\">\n\t\t\t\t\t\t\t\t\t<SelectValue\n\t\t\t\t\t\t\t\t\t\tplaceholder={!isCloud ? \"Dokploy\" : \"Select a Server\"}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t<SelectGroup>\n\t\t\t\t\t\t\t\t\t\t{!isCloud && (\n\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"dokploy\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-2 justify-between w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span>Dokploy</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground text-xs self-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDefault\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t{servers?.map((server) => (\n\t\t\t\t\t\t\t\t\t\t\t<SelectItem key={server.serverId} value={server.serverId}>\n\t\t\t\t\t\t\t\t\t\t\t\t{server.name}\n\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t<SelectLabel>\n\t\t\t\t\t\t\t\t\t\t\tServers ({servers?.length + (!isCloud ? 1 : 0)})\n\t\t\t\t\t\t\t\t\t\t</SelectLabel>\n\t\t\t\t\t\t\t\t\t</SelectGroup>\n\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\n\t\t\t\t\t<div className=\"space-y-2\">\n\t\t\t\t\t\t<Label>Examples:</Label>\n\t\t\t\t\t\t<div className=\"flex flex-wrap gap-2\">\n\t\t\t\t\t\t\t{examples.map((example, index) => (\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tkey={index}\n\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\tonClick={() => handleExampleClick(example)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{example}\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/project/ai/step-three.tsx",
    "content": "import ReactMarkdown from \"react-markdown\";\nimport { CodeEditor } from \"@/components/shared/code-editor\";\nimport type { StepProps } from \"./step-two\";\n\nexport const StepThree = ({ templateInfo }: StepProps) => {\n\treturn (\n\t\t<div className=\"flex flex-col h-full\">\n\t\t\t<div className=\"flex-grow\">\n\t\t\t\t<div className=\"space-y-6\">\n\t\t\t\t\t<h2 className=\"text-lg font-semibold\">Step 3: Review and Finalize</h2>\n\t\t\t\t\t<div className=\"space-y-4\">\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<h3 className=\"text-sm font-semibold\">Name</h3>\n\t\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t{templateInfo?.details?.name}\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<h3 className=\"text-sm font-semibold\">Description</h3>\n\t\t\t\t\t\t\t<ReactMarkdown className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t{templateInfo?.details?.description}\n\t\t\t\t\t\t\t</ReactMarkdown>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<h3 className=\"text-md font-semibold\">Server</h3>\n\t\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t{templateInfo?.server?.name || \"Dokploy Server\"}\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"space-y-2\">\n\t\t\t\t\t\t\t<h3 className=\"text-sm font-semibold\">Docker Compose</h3>\n\t\t\t\t\t\t\t<CodeEditor\n\t\t\t\t\t\t\t\tlineWrapping\n\t\t\t\t\t\t\t\tvalue={templateInfo?.details?.dockerCompose}\n\t\t\t\t\t\t\t\tdisabled\n\t\t\t\t\t\t\t\tclassName=\"font-mono\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<h3 className=\"text-sm font-semibold\">Environment Variables</h3>\n\t\t\t\t\t\t\t<ul className=\"list-disc pl-5\">\n\t\t\t\t\t\t\t\t{templateInfo?.details?.envVariables.map(\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\tenv: {\n\t\t\t\t\t\t\t\t\t\t\tname: string;\n\t\t\t\t\t\t\t\t\t\t\tvalue: string;\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\tindex: number,\n\t\t\t\t\t\t\t\t\t) => (\n\t\t\t\t\t\t\t\t\t\t<li key={index}>\n\t\t\t\t\t\t\t\t\t\t\t<strong className=\"text-sm font-semibold\">\n\t\t\t\t\t\t\t\t\t\t\t\t{env.name}\n\t\t\t\t\t\t\t\t\t\t\t</strong>\n\t\t\t\t\t\t\t\t\t\t\t:\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm ml-2 text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t{env.value}\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<h3 className=\"text-sm font-semibold\">Domains</h3>\n\t\t\t\t\t\t\t<ul className=\"list-disc pl-5\">\n\t\t\t\t\t\t\t\t{templateInfo?.details?.domains.map(\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\tdomain: {\n\t\t\t\t\t\t\t\t\t\t\thost: string;\n\t\t\t\t\t\t\t\t\t\t\tport: number;\n\t\t\t\t\t\t\t\t\t\t\tserviceName: string;\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\tindex: number,\n\t\t\t\t\t\t\t\t\t) => (\n\t\t\t\t\t\t\t\t\t\t<li key={index}>\n\t\t\t\t\t\t\t\t\t\t\t<strong className=\"text-sm font-semibold\">\n\t\t\t\t\t\t\t\t\t\t\t\t{domain.host}\n\t\t\t\t\t\t\t\t\t\t\t</strong>\n\t\t\t\t\t\t\t\t\t\t\t:\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm ml-2 text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t{domain.port} - {domain.serviceName}\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<h3 className=\"text-sm font-semibold\">Configuration Files</h3>\n\t\t\t\t\t\t\t<ul className=\"list-disc pl-5\">\n\t\t\t\t\t\t\t\t{templateInfo?.details?.configFiles?.map((file, index) => (\n\t\t\t\t\t\t\t\t\t<li key={index}>\n\t\t\t\t\t\t\t\t\t\t<strong className=\"text-sm font-semibold\">\n\t\t\t\t\t\t\t\t\t\t\t{file.filePath}\n\t\t\t\t\t\t\t\t\t\t</strong>\n\t\t\t\t\t\t\t\t\t\t:\n\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm ml-2 text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t{file.content}\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/project/ai/step-two.tsx",
    "content": "import { Bot, PlusCircle, Trash2 } from \"lucide-react\";\nimport { useEffect } from \"react\";\nimport ReactMarkdown from \"react-markdown\";\nimport { toast } from \"sonner\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { CodeEditor } from \"@/components/shared/code-editor\";\nimport {\n\tAccordion,\n\tAccordionContent,\n\tAccordionItem,\n\tAccordionTrigger,\n} from \"@/components/ui/accordion\";\nimport { Button } from \"@/components/ui/button\";\nimport { Input } from \"@/components/ui/input\";\nimport { Label } from \"@/components/ui/label\";\nimport { RadioGroup, RadioGroupItem } from \"@/components/ui/radio-group\";\nimport { ScrollArea } from \"@/components/ui/scroll-area\";\nimport { api } from \"@/utils/api\";\nimport type { TemplateInfo } from \"./template-generator\";\n\nexport interface StepProps {\n\tstepper?: any;\n\ttemplateInfo: TemplateInfo;\n\tsetTemplateInfo: React.Dispatch<React.SetStateAction<TemplateInfo>>;\n}\n\nexport const StepTwo = ({ templateInfo, setTemplateInfo }: StepProps) => {\n\tconst suggestions = templateInfo.suggestions || [];\n\tconst selectedVariant = templateInfo.details;\n\n\tconst { mutateAsync, isPending, error, isError } =\n\t\tapi.ai.suggest.useMutation();\n\n\tuseEffect(() => {\n\t\tif (suggestions?.length > 0) {\n\t\t\treturn;\n\t\t}\n\t\tmutateAsync({\n\t\t\taiId: templateInfo.aiId,\n\t\t\tserverId: templateInfo.server?.serverId || \"\",\n\t\t\tinput: templateInfo.userInput,\n\t\t})\n\t\t\t.then((data) => {\n\t\t\t\tsetTemplateInfo({\n\t\t\t\t\t...templateInfo,\n\t\t\t\t\tsuggestions: data || [],\n\t\t\t\t});\n\t\t\t})\n\t\t\t.catch((error) => {\n\t\t\t\ttoast.error(\"Error generating suggestions\", {\n\t\t\t\t\tdescription: error.message,\n\t\t\t\t});\n\t\t\t});\n\t}, [templateInfo.userInput]);\n\n\tconst handleEnvVariableChange = (\n\t\tindex: number,\n\t\tfield: \"name\" | \"value\",\n\t\tvalue: string,\n\t) => {\n\t\tif (!selectedVariant) return;\n\n\t\tconst updatedEnvVariables = [...selectedVariant.envVariables];\n\t\t// @ts-ignore\n\t\tupdatedEnvVariables[index] = {\n\t\t\t...updatedEnvVariables[index],\n\t\t\t[field]: value,\n\t\t};\n\n\t\tsetTemplateInfo({\n\t\t\t...templateInfo,\n\t\t\t...(templateInfo.details && {\n\t\t\t\tdetails: {\n\t\t\t\t\t...templateInfo.details,\n\t\t\t\t\tenvVariables: updatedEnvVariables,\n\t\t\t\t},\n\t\t\t}),\n\t\t});\n\t};\n\n\tconst removeEnvVariable = (index: number) => {\n\t\tif (!selectedVariant) return;\n\n\t\tconst updatedEnvVariables = selectedVariant.envVariables.filter(\n\t\t\t(_, i) => i !== index,\n\t\t);\n\n\t\tsetTemplateInfo({\n\t\t\t...templateInfo,\n\t\t\t...(templateInfo.details && {\n\t\t\t\tdetails: {\n\t\t\t\t\t...templateInfo.details,\n\t\t\t\t\tenvVariables: updatedEnvVariables,\n\t\t\t\t},\n\t\t\t}),\n\t\t});\n\t};\n\n\tconst handleDomainChange = (\n\t\tindex: number,\n\t\tfield: \"host\" | \"port\" | \"serviceName\",\n\t\tvalue: string | number,\n\t) => {\n\t\tif (!selectedVariant) return;\n\n\t\tconst updatedDomains = [...selectedVariant.domains];\n\t\t// @ts-ignore\n\t\tupdatedDomains[index] = {\n\t\t\t...updatedDomains[index],\n\t\t\t[field]: value,\n\t\t};\n\n\t\tsetTemplateInfo({\n\t\t\t...templateInfo,\n\t\t\t...(templateInfo.details && {\n\t\t\t\tdetails: {\n\t\t\t\t\t...templateInfo.details,\n\t\t\t\t\tdomains: updatedDomains,\n\t\t\t\t},\n\t\t\t}),\n\t\t});\n\t};\n\n\tconst removeDomain = (index: number) => {\n\t\tif (!selectedVariant) return;\n\n\t\tconst updatedDomains = selectedVariant.domains.filter(\n\t\t\t(_, i) => i !== index,\n\t\t);\n\n\t\tsetTemplateInfo({\n\t\t\t...templateInfo,\n\t\t\t...(templateInfo.details && {\n\t\t\t\tdetails: {\n\t\t\t\t\t...templateInfo.details,\n\t\t\t\t\tdomains: updatedDomains,\n\t\t\t\t},\n\t\t\t}),\n\t\t});\n\t};\n\n\tconst addEnvVariable = () => {\n\t\tif (!selectedVariant) return;\n\n\t\tsetTemplateInfo({\n\t\t\t...templateInfo,\n\n\t\t\t...(templateInfo.details && {\n\t\t\t\tdetails: {\n\t\t\t\t\t...templateInfo.details,\n\t\t\t\t\tenvVariables: [\n\t\t\t\t\t\t...selectedVariant.envVariables,\n\t\t\t\t\t\t{ name: \"\", value: \"\" },\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t}),\n\t\t});\n\t};\n\n\tconst addDomain = () => {\n\t\tif (!selectedVariant) return;\n\n\t\tsetTemplateInfo({\n\t\t\t...templateInfo,\n\t\t\t...(templateInfo.details && {\n\t\t\t\tdetails: {\n\t\t\t\t\t...templateInfo.details,\n\t\t\t\t\tdomains: [\n\t\t\t\t\t\t...selectedVariant.domains,\n\t\t\t\t\t\t{ host: \"\", port: 80, serviceName: \"\" },\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t}),\n\t\t});\n\t};\n\tif (isError) {\n\t\treturn (\n\t\t\t<div className=\"flex flex-col items-center justify-center h-full space-y-4\">\n\t\t\t\t<Bot className=\"w-16 h-16 text-primary animate-pulse\" />\n\t\t\t\t<h2 className=\"text-2xl font-semibold animate-pulse\">Error</h2>\n\t\t\t\t<AlertBlock type=\"error\">\n\t\t\t\t\t{error?.message || \"Error generating suggestions\"}\n\t\t\t\t</AlertBlock>\n\t\t\t</div>\n\t\t);\n\t}\n\tif (isPending) {\n\t\treturn (\n\t\t\t<div className=\"flex flex-col items-center justify-center h-full space-y-4\">\n\t\t\t\t<Bot className=\"w-16 h-16 text-primary animate-pulse\" />\n\t\t\t\t<h2 className=\"text-2xl font-semibold animate-pulse\">\n\t\t\t\t\tAI is processing your request\n\t\t\t\t</h2>\n\t\t\t\t<p className=\"text-muted-foreground\">\n\t\t\t\t\tGenerating template suggestions based on your input...\n\t\t\t\t</p>\n\t\t\t\t<pre className=\"whitespace-normal\">{templateInfo.userInput}</pre>\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div className=\"flex flex-col h-full gap-6\">\n\t\t\t<div className=\"flex-grow overflow-auto pb-8\">\n\t\t\t\t<div className=\"space-y-6\">\n\t\t\t\t\t<h2 className=\"text-lg font-semibold\">Step 2: Choose a Variant</h2>\n\t\t\t\t\t{!selectedVariant && (\n\t\t\t\t\t\t<div className=\"space-y-4\">\n\t\t\t\t\t\t\t<div>Based on your input, we suggest the following variants:</div>\n\t\t\t\t\t\t\t<RadioGroup\n\t\t\t\t\t\t\t\t// value={selectedVariant?.}\n\t\t\t\t\t\t\t\tonValueChange={(value) => {\n\t\t\t\t\t\t\t\t\tconst element = suggestions?.find((s) => s?.id === value);\n\t\t\t\t\t\t\t\t\tsetTemplateInfo({\n\t\t\t\t\t\t\t\t\t\t...templateInfo,\n\t\t\t\t\t\t\t\t\t\tdetails: element,\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tclassName=\"space-y-4\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{suggestions?.map((suggestion) => (\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tkey={suggestion?.id}\n\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-start space-x-3\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<RadioGroupItem\n\t\t\t\t\t\t\t\t\t\t\tvalue={suggestion?.id || \"\"}\n\t\t\t\t\t\t\t\t\t\t\tid={suggestion?.id}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"mt-1\"\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t<Label htmlFor={suggestion?.id} className=\"font-medium\">\n\t\t\t\t\t\t\t\t\t\t\t\t{suggestion?.name}\n\t\t\t\t\t\t\t\t\t\t\t</Label>\n\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t{suggestion?.shortDescription}\n\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</RadioGroup>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t{selectedVariant && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<div className=\"mb-6\">\n\t\t\t\t\t\t\t\t<h3 className=\"text-xl font-bold\">{selectedVariant?.name}</h3>\n\t\t\t\t\t\t\t\t<p className=\"text-muted-foreground mt-2\">\n\t\t\t\t\t\t\t\t\t{selectedVariant?.shortDescription}\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<ScrollArea>\n\t\t\t\t\t\t\t\t<Accordion type=\"single\" collapsible className=\"w-full\">\n\t\t\t\t\t\t\t\t\t<AccordionItem value=\"description\">\n\t\t\t\t\t\t\t\t\t\t<AccordionTrigger>Description</AccordionTrigger>\n\t\t\t\t\t\t\t\t\t\t<AccordionContent>\n\t\t\t\t\t\t\t\t\t\t\t<ScrollArea className=\"w-full rounded-md border p-4\">\n\t\t\t\t\t\t\t\t\t\t\t\t<ReactMarkdown className=\"text-muted-foreground text-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{selectedVariant?.description}\n\t\t\t\t\t\t\t\t\t\t\t\t</ReactMarkdown>\n\t\t\t\t\t\t\t\t\t\t\t</ScrollArea>\n\t\t\t\t\t\t\t\t\t\t</AccordionContent>\n\t\t\t\t\t\t\t\t\t</AccordionItem>\n\t\t\t\t\t\t\t\t\t<AccordionItem value=\"docker-compose\">\n\t\t\t\t\t\t\t\t\t\t<AccordionTrigger>Docker Compose</AccordionTrigger>\n\t\t\t\t\t\t\t\t\t\t<AccordionContent>\n\t\t\t\t\t\t\t\t\t\t\t<CodeEditor\n\t\t\t\t\t\t\t\t\t\t\t\tvalue={selectedVariant?.dockerCompose}\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"font-mono\"\n\t\t\t\t\t\t\t\t\t\t\t\tonChange={(value) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetTemplateInfo({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t...templateInfo,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t...(templateInfo?.details && {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdetails: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t...templateInfo.details,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdockerCompose: value,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</AccordionContent>\n\t\t\t\t\t\t\t\t\t</AccordionItem>\n\t\t\t\t\t\t\t\t\t<AccordionItem value=\"env-variables\">\n\t\t\t\t\t\t\t\t\t\t<AccordionTrigger>Environment Variables</AccordionTrigger>\n\t\t\t\t\t\t\t\t\t\t<AccordionContent>\n\t\t\t\t\t\t\t\t\t\t\t<ScrollArea className=\"w-full rounded-md border\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"p-4 space-y-4\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{selectedVariant?.envVariables.map((env, index) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={index}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center space-x-2\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={env.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thandleEnvVariableChange(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tindex,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.target.value,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Variable Name\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex-1\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"relative\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype={\"password\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={env.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thandleEnvVariableChange(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tindex,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"value\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.target.value,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Variable Value\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => removeEnvVariable(index)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Trash2 className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"mt-2\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={addEnvVariable}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<PlusCircle className=\"h-4 w-4 mr-2\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tAdd Variable\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</ScrollArea>\n\t\t\t\t\t\t\t\t\t\t</AccordionContent>\n\t\t\t\t\t\t\t\t\t</AccordionItem>\n\t\t\t\t\t\t\t\t\t<AccordionItem value=\"domains\">\n\t\t\t\t\t\t\t\t\t\t<AccordionTrigger>Domains</AccordionTrigger>\n\t\t\t\t\t\t\t\t\t\t<AccordionContent>\n\t\t\t\t\t\t\t\t\t\t\t<ScrollArea className=\"w-full rounded-md border\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"p-4 space-y-4\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{selectedVariant?.domains.map((domain, index) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={index}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center space-x-2\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={domain.host}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thandleDomainChange(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tindex,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"host\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.target.value,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Domain Host\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex-1\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={domain.port}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thandleDomainChange(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tindex,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"port\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tNumber.parseInt(e.target.value),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Port\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-24\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={domain.serviceName}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thandleDomainChange(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tindex,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"serviceName\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.target.value,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Service Name\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex-1\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => removeDomain(index)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Trash2 className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"mt-2\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={addDomain}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<PlusCircle className=\"h-4 w-4 mr-2\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tAdd Domain\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</ScrollArea>\n\t\t\t\t\t\t\t\t\t\t</AccordionContent>\n\t\t\t\t\t\t\t\t\t</AccordionItem>\n\t\t\t\t\t\t\t\t\t<AccordionItem value=\"mounts\">\n\t\t\t\t\t\t\t\t\t\t<AccordionTrigger>Configuration Files</AccordionTrigger>\n\t\t\t\t\t\t\t\t\t\t<AccordionContent>\n\t\t\t\t\t\t\t\t\t\t\t<ScrollArea className=\"w-full rounded-md border\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"p-4 space-y-4\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{selectedVariant?.configFiles?.length &&\n\t\t\t\t\t\t\t\t\t\t\t\t\tselectedVariant?.configFiles?.length > 0 ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"text-sm text-muted-foreground mb-4\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tThis template requires the following\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconfiguration files to be mounted:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{selectedVariant?.configFiles?.map(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(config, index) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={index}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"space-y-2 border rounded-lg p-4\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center justify-between\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Label className=\"text-primary\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{config.filePath}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Label>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-xs text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWill be mounted as: ../files\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{config.filePath}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CodeEditor\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={config.content}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"font-mono\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={(value) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!selectedVariant?.configFiles)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst updatedConfigFiles = [\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t...selectedVariant.configFiles,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tupdatedConfigFiles[index] = {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfilePath: config.filePath,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontent: value,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetTemplateInfo({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t...templateInfo,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t...(templateInfo.details && {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdetails: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t...templateInfo.details,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconfigFiles: updatedConfigFiles,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"text-center text-muted-foreground py-8\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tThis template doesn't require any configuration\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfiles.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-sm mt-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAll necessary configurations are handled through\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenvironment variables.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</ScrollArea>\n\t\t\t\t\t\t\t\t\t\t</AccordionContent>\n\t\t\t\t\t\t\t\t\t</AccordionItem>\n\t\t\t\t\t\t\t\t</Accordion>\n\t\t\t\t\t\t\t</ScrollArea>\n\t\t\t\t\t\t</>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div className=\"\">\n\t\t\t\t<div className=\"flex justify-between\">\n\t\t\t\t\t{selectedVariant && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\tconst { details, ...rest } = templateInfo;\n\t\t\t\t\t\t\t\tsetTemplateInfo(rest);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tChange Variant\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/project/ai/template-generator.tsx",
    "content": "import { defineStepper } from \"@stepperize/react\";\nimport { Bot } from \"lucide-react\";\nimport Link from \"next/link\";\nimport React, { useState } from \"react\";\nimport { toast } from \"sonner\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport { DropdownMenuItem } from \"@/components/ui/dropdown-menu\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { Separator } from \"@/components/ui/separator\";\nimport { api } from \"@/utils/api\";\nimport { StepOne } from \"./step-one\";\nimport { StepThree } from \"./step-three\";\nimport { StepTwo } from \"./step-two\";\n\ninterface EnvVariable {\n\tname: string;\n\tvalue: string;\n}\n\ninterface Domain {\n\thost: string;\n\tport: number;\n\tserviceName: string;\n}\n\ninterface Details {\n\tname: string;\n\tid: string;\n\tdescription: string;\n\tdockerCompose: string;\n\tenvVariables: EnvVariable[];\n\tshortDescription: string;\n\tdomains: Domain[];\n\tconfigFiles?: Mount[];\n}\n\ninterface Mount {\n\tfilePath: string;\n\tcontent: string;\n}\n\nexport interface TemplateInfo {\n\tuserInput: string;\n\tdetails?: Details | null;\n\tsuggestions?: Details[];\n\tserver?: {\n\t\tserverId: string;\n\t\tname: string;\n\t};\n\taiId: string;\n}\n\nconst defaultTemplateInfo: TemplateInfo = {\n\taiId: \"\",\n\tuserInput: \"\",\n\tserver: undefined,\n\tdetails: null,\n\tsuggestions: [],\n};\n\nexport const { useStepper, steps, Scoped } = defineStepper(\n\t{\n\t\tid: \"needs\",\n\t\ttitle: \"Describe your needs\",\n\t},\n\t{\n\t\tid: \"variant\",\n\t\ttitle: \"Choose a Variant\",\n\t},\n\t{\n\t\tid: \"review\",\n\t\ttitle: \"Review and Finalize\",\n\t},\n);\n\ninterface Props {\n\tenvironmentId: string;\n\tprojectName?: string;\n}\n\nexport const TemplateGenerator = ({ environmentId }: Props) => {\n\tconst [open, setOpen] = useState(false);\n\tconst stepper = useStepper();\n\tconst { data: aiSettings } = api.ai.getAll.useQuery();\n\tconst { mutateAsync } = api.ai.deploy.useMutation();\n\tconst [templateInfo, setTemplateInfo] =\n\t\tuseState<TemplateInfo>(defaultTemplateInfo);\n\tconst utils = api.useUtils();\n\n\tconst haveAtleasOneProviderEnabled = aiSettings?.some(\n\t\t(ai) => ai.isEnabled === true,\n\t);\n\n\tconst isDisabled = () => {\n\t\tif (stepper.current.id === \"needs\") {\n\t\t\treturn !templateInfo.aiId || !templateInfo.userInput;\n\t\t}\n\n\t\tif (stepper.current.id === \"variant\") {\n\t\t\treturn !templateInfo?.details?.id;\n\t\t}\n\n\t\treturn false;\n\t};\n\n\tconst onSubmit = async () => {\n\t\tawait mutateAsync({\n\t\t\tenvironmentId: environmentId,\n\t\t\tid: templateInfo.details?.id || \"\",\n\t\t\tname: templateInfo?.details?.name || \"\",\n\t\t\tdescription: templateInfo?.details?.shortDescription || \"\",\n\t\t\tdockerCompose: templateInfo?.details?.dockerCompose || \"\",\n\t\t\tenvVariables: (templateInfo?.details?.envVariables || [])\n\t\t\t\t.map((env: any) => `${env.name}=${env.value}`)\n\t\t\t\t.join(\"\\n\"),\n\t\t\tdomains: templateInfo?.details?.domains || [],\n\t\t\t...(templateInfo.server?.serverId && {\n\t\t\t\tserverId: templateInfo.server?.serverId || \"\",\n\t\t\t}),\n\t\t\tconfigFiles: templateInfo?.details?.configFiles || [],\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(\"Compose Created\");\n\t\t\t\tsetOpen(false);\n\t\t\t\t// Invalidate the project query to refresh the environment data\n\t\t\t\tawait utils.environment.one.invalidate({\n\t\t\t\t\tenvironmentId,\n\t\t\t\t});\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error creating the compose\");\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<Dialog open={open} onOpenChange={setOpen}>\n\t\t\t<DialogTrigger asChild className=\"w-full\">\n\t\t\t\t<DropdownMenuItem\n\t\t\t\t\tclassName=\"w-full cursor-pointer space-x-3\"\n\t\t\t\t\tonSelect={(e) => e.preventDefault()}\n\t\t\t\t>\n\t\t\t\t\t<Bot className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t<span>AI Assistant</span>\n\t\t\t\t</DropdownMenuItem>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-4xl w-full  flex flex-col\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>AI Assistant</DialogTitle>\n\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\tCreate a custom template based on your needs\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t<div className=\"grid gap-4\">\n\t\t\t\t\t<div className=\"flex justify-between\">\n\t\t\t\t\t\t<h2 className=\"text-lg font-semibold\">Steps</h2>\n\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\tStep {stepper.current.index + 1} of {steps.length}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<div />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<Scoped>\n\t\t\t\t\t\t<nav aria-label=\"Checkout Steps\" className=\"group my-4\">\n\t\t\t\t\t\t\t<ol\n\t\t\t\t\t\t\t\tclassName=\"flex items-center justify-between gap-2\"\n\t\t\t\t\t\t\t\taria-orientation=\"horizontal\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{stepper.all.map((step, index, array) => (\n\t\t\t\t\t\t\t\t\t<React.Fragment key={step.id}>\n\t\t\t\t\t\t\t\t\t\t<li className=\"flex items-center gap-4 flex-shrink-0\">\n\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\trole=\"tab\"\n\t\t\t\t\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\t\t\t\t\tindex <= stepper.current.index ? \"secondary\" : \"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\taria-current={\n\t\t\t\t\t\t\t\t\t\t\t\t\tstepper.current.id === step.id ? \"step\" : undefined\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\taria-posinset={index + 1}\n\t\t\t\t\t\t\t\t\t\t\t\taria-setsize={steps.length}\n\t\t\t\t\t\t\t\t\t\t\t\taria-selected={stepper.current.id === step.id}\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex size-10 items-center justify-center rounded-full border-2 border-border\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{index + 1}\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm font-medium\">{step.title}</span>\n\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t{index < array.length - 1 && (\n\t\t\t\t\t\t\t\t\t\t\t<Separator\n\t\t\t\t\t\t\t\t\t\t\t\tclassName={`flex-1 ${\n\t\t\t\t\t\t\t\t\t\t\t\t\tindex < stepper.current.index\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"bg-primary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"bg-muted\"\n\t\t\t\t\t\t\t\t\t\t\t\t}`}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</React.Fragment>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</ol>\n\t\t\t\t\t\t</nav>\n\t\t\t\t\t\t{stepper.switch({\n\t\t\t\t\t\t\tneeds: () => (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t{!haveAtleasOneProviderEnabled && (\n\t\t\t\t\t\t\t\t\t\t<AlertBlock type=\"warning\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span>AI features are not enabled</span>\n\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t\t\t\t\tTo use AI-powered template generation, please{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\t\t\thref=\"/dashboard/settings/ai\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"font-medium underline underline-offset-4\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tenable AI in your settings\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t\t\t\t.\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t{haveAtleasOneProviderEnabled &&\n\t\t\t\t\t\t\t\t\t\taiSettings &&\n\t\t\t\t\t\t\t\t\t\taiSettings?.length > 0 && (\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-4\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<label\n\t\t\t\t\t\t\t\t\t\t\t\t\t\thtmlFor=\"user-needs\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-sm font-medium\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSelect AI Provider\n\t\t\t\t\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={templateInfo.aiId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonValueChange={(value) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetTemplateInfo((prev) => ({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t...prev,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\taiId: value,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select an AI provider\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{aiSettings.map((ai) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem key={ai.aiId} value={ai.aiId}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ai.name} ({ai.model})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t{templateInfo.aiId && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<StepOne\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetTemplateInfo={setTemplateInfo}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttemplateInfo={templateInfo}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tvariant: () => (\n\t\t\t\t\t\t\t\t<StepTwo\n\t\t\t\t\t\t\t\t\ttemplateInfo={templateInfo}\n\t\t\t\t\t\t\t\t\tsetTemplateInfo={setTemplateInfo}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\treview: () => (\n\t\t\t\t\t\t\t\t<StepThree\n\t\t\t\t\t\t\t\t\ttemplateInfo={templateInfo}\n\t\t\t\t\t\t\t\t\tsetTemplateInfo={setTemplateInfo}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t})}\n\t\t\t\t\t</Scoped>\n\t\t\t\t</div>\n\t\t\t\t<DialogFooter>\n\t\t\t\t\t<div className=\"flex items-center justify-between w-full\">\n\t\t\t\t\t\t<div className=\"flex items-center gap-2 w-full justify-end\">\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tonClick={stepper.prev}\n\t\t\t\t\t\t\t\tdisabled={stepper.isFirst}\n\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tBack\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tdisabled={isDisabled()}\n\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\tif (stepper.current.id === \"needs\") {\n\t\t\t\t\t\t\t\t\t\tsetTemplateInfo((prev) => ({\n\t\t\t\t\t\t\t\t\t\t\t...prev,\n\t\t\t\t\t\t\t\t\t\t\tsuggestions: [],\n\t\t\t\t\t\t\t\t\t\t\tdetails: null,\n\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif (stepper.isLast) {\n\t\t\t\t\t\t\t\t\t\tawait onSubmit();\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tstepper.next();\n\t\t\t\t\t\t\t\t\t// if (stepper.isLast) {\n\t\t\t\t\t\t\t\t\t// \t// setIsOpen(false);\n\t\t\t\t\t\t\t\t\t// \t// push(\"/dashboard/projects\");\n\t\t\t\t\t\t\t\t\t// } else {\n\t\t\t\t\t\t\t\t\t// \tstepper.next();\n\t\t\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{stepper.isLast ? \"Create\" : \"Next\"}\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</DialogFooter>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/project/duplicate-project.tsx",
    "content": "import { Copy, Loader2 } from \"lucide-react\";\nimport { useRouter } from \"next/router\";\nimport { useState } from \"react\";\nimport { toast } from \"sonner\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport { Input } from \"@/components/ui/input\";\nimport { Label } from \"@/components/ui/label\";\nimport { RadioGroup, RadioGroupItem } from \"@/components/ui/radio-group\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { api } from \"@/utils/api\";\n\nexport type Services = {\n\tserverId?: string | null;\n\tname: string;\n\ttype:\n\t\t| \"mariadb\"\n\t\t| \"application\"\n\t\t| \"postgres\"\n\t\t| \"mysql\"\n\t\t| \"mongo\"\n\t\t| \"redis\"\n\t\t| \"compose\";\n\tdescription?: string | null;\n\tid: string;\n\tcreatedAt: string;\n\tstatus?: \"idle\" | \"running\" | \"done\" | \"error\";\n};\n\ninterface DuplicateProjectProps {\n\tenvironmentId: string;\n\tservices: Services[];\n\tselectedServiceIds: string[];\n}\n\nexport const DuplicateProject = ({\n\tenvironmentId,\n\tservices,\n\tselectedServiceIds,\n}: DuplicateProjectProps) => {\n\tconst [open, setOpen] = useState(false);\n\tconst [name, setName] = useState(\"\");\n\tconst [description, setDescription] = useState(\"\");\n\tconst [duplicateType, setDuplicateType] = useState(\"new-project\"); // \"new-project\" or \"existing-environment\"\n\tconst [selectedTargetProject, setSelectedTargetProject] =\n\t\tuseState<string>(\"\");\n\tconst [selectedTargetEnvironment, setSelectedTargetEnvironment] =\n\t\tuseState<string>(\"\");\n\tconst utils = api.useUtils();\n\tconst router = useRouter();\n\n\t// Queries for project and environment selection\n\tconst { data: allProjects } = api.project.all.useQuery();\n\tconst { data: selectedProjectEnvironments } =\n\t\tapi.environment.byProjectId.useQuery(\n\t\t\t{ projectId: selectedTargetProject },\n\t\t\t{ enabled: !!selectedTargetProject },\n\t\t);\n\n\tconst selectedServices = services.filter((service) =>\n\t\tselectedServiceIds.includes(service.id),\n\t);\n\n\tconst { mutateAsync: duplicateProject, isPending } =\n\t\tapi.project.duplicate.useMutation({\n\t\t\tonSuccess: async (newProject) => {\n\t\t\t\tawait utils.project.all.invalidate();\n\n\t\t\t\t// If duplicating to same project+environment, invalidate the environment query\n\t\t\t\t// to refresh the services list\n\t\t\t\tif (duplicateType === \"existing-environment\") {\n\t\t\t\t\tawait utils.environment.one.invalidate({\n\t\t\t\t\t\tenvironmentId: selectedTargetEnvironment,\n\t\t\t\t\t});\n\t\t\t\t\tawait utils.environment.byProjectId.invalidate({\n\t\t\t\t\t\tprojectId: selectedTargetProject,\n\t\t\t\t\t});\n\n\t\t\t\t\t// If duplicating to the same environment we're currently viewing,\n\t\t\t\t\t// also invalidate the current environment to refresh the services list\n\t\t\t\t\tif (selectedTargetEnvironment === environmentId) {\n\t\t\t\t\t\tawait utils.environment.one.invalidate({ environmentId });\n\t\t\t\t\t\t// Also invalidate the project query to refresh the project data\n\t\t\t\t\t\tconst projectId = router.query.projectId as string;\n\t\t\t\t\t\tif (projectId) {\n\t\t\t\t\t\t\tawait utils.project.one.invalidate({ projectId });\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\ttoast.success(\n\t\t\t\t\tduplicateType === \"new-project\"\n\t\t\t\t\t\t? \"Project duplicated successfully\"\n\t\t\t\t\t\t: \"Services duplicated successfully\",\n\t\t\t\t);\n\t\t\t\tsetOpen(false);\n\t\t\t\tif (duplicateType === \"new-project\") {\n\t\t\t\t\trouter.push(\n\t\t\t\t\t\t`/dashboard/project/${newProject?.projectId}/environment/${newProject?.environmentId}`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t},\n\t\t\tonError: (error) => {\n\t\t\t\ttoast.error(error.message);\n\t\t\t},\n\t\t});\n\n\tconst handleDuplicate = async () => {\n\t\tif (duplicateType === \"new-project\" && !name) {\n\t\t\ttoast.error(\"Project name is required\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (duplicateType === \"existing-environment\") {\n\t\t\tif (!selectedTargetProject) {\n\t\t\t\ttoast.error(\"Please select a target project\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!selectedTargetEnvironment) {\n\t\t\t\ttoast.error(\"Please select a target environment\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// TODO: Update duplicate API to support targetProjectId and targetEnvironmentId\n\t\tawait duplicateProject({\n\t\t\tsourceEnvironmentId: selectedTargetEnvironment,\n\t\t\tname,\n\t\t\tdescription,\n\t\t\tincludeServices: true,\n\t\t\tselectedServices: selectedServices.map((service) => ({\n\t\t\t\tid: service.id,\n\t\t\t\ttype: service.type,\n\t\t\t})),\n\t\t\tduplicateInSameProject: duplicateType === \"existing-environment\",\n\t\t});\n\t};\n\n\treturn (\n\t\t<Dialog\n\t\t\topen={open}\n\t\t\tonOpenChange={(isOpen) => {\n\t\t\t\tsetOpen(isOpen);\n\t\t\t\tif (!isOpen) {\n\t\t\t\t\t// Reset form when closing\n\t\t\t\t\tsetName(\"\");\n\t\t\t\t\tsetDescription(\"\");\n\t\t\t\t\tsetDuplicateType(\"new-project\");\n\t\t\t\t\tsetSelectedTargetProject(\"\");\n\t\t\t\t\tsetSelectedTargetEnvironment(\"\");\n\t\t\t\t}\n\t\t\t}}\n\t\t>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t<Button variant=\"ghost\" className=\"w-full justify-start\">\n\t\t\t\t\t<Copy className=\"mr-2 h-4 w-4\" />\n\t\t\t\t\tDuplicate\n\t\t\t\t</Button>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent>\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Duplicate Services</DialogTitle>\n\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\tChoose where to duplicate the selected services\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\n\t\t\t\t<div className=\"grid gap-4 py-4\">\n\t\t\t\t\t<div className=\"grid gap-2\">\n\t\t\t\t\t\t<Label>Duplicate to</Label>\n\t\t\t\t\t\t<RadioGroup\n\t\t\t\t\t\t\tvalue={duplicateType}\n\t\t\t\t\t\t\tonValueChange={(value) => {\n\t\t\t\t\t\t\t\tsetDuplicateType(value);\n\t\t\t\t\t\t\t\t// Reset selections when changing type\n\t\t\t\t\t\t\t\tif (value !== \"existing-environment\") {\n\t\t\t\t\t\t\t\t\tsetSelectedTargetProject(\"\");\n\t\t\t\t\t\t\t\t\tsetSelectedTargetEnvironment(\"\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tclassName=\"grid gap-2\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<div className=\"flex items-center space-x-2\">\n\t\t\t\t\t\t\t\t<RadioGroupItem value=\"new-project\" id=\"new-project\" />\n\t\t\t\t\t\t\t\t<Label htmlFor=\"new-project\">New project</Label>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"flex items-center space-x-2\">\n\t\t\t\t\t\t\t\t<RadioGroupItem\n\t\t\t\t\t\t\t\t\tvalue=\"existing-environment\"\n\t\t\t\t\t\t\t\t\tid=\"existing-environment\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<Label htmlFor=\"existing-environment\">\n\t\t\t\t\t\t\t\t\tExisting environment\n\t\t\t\t\t\t\t\t</Label>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</RadioGroup>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t{duplicateType === \"new-project\" && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<div className=\"grid gap-2\">\n\t\t\t\t\t\t\t\t<Label htmlFor=\"name\">Name</Label>\n\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\tid=\"name\"\n\t\t\t\t\t\t\t\t\tvalue={name}\n\t\t\t\t\t\t\t\t\tonChange={(e) => setName(e.target.value)}\n\t\t\t\t\t\t\t\t\tplaceholder=\"New project name\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div className=\"grid gap-2\">\n\t\t\t\t\t\t\t\t<Label htmlFor=\"description\">Description</Label>\n\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\tid=\"description\"\n\t\t\t\t\t\t\t\t\tvalue={description}\n\t\t\t\t\t\t\t\t\tonChange={(e) => setDescription(e.target.value)}\n\t\t\t\t\t\t\t\t\tplaceholder=\"Project description (optional)\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{duplicateType === \"existing-environment\" && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{allProjects?.filter((p) => p.projectId !== environmentId)\n\t\t\t\t\t\t\t\t.length === 0 ? (\n\t\t\t\t\t\t\t\t<div className=\"flex flex-col items-center justify-center gap-2 py-4 text-center\">\n\t\t\t\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\tNo other projects available. Create a new project first.\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t{/* Step 1: Select Project */}\n\t\t\t\t\t\t\t\t\t<div className=\"grid gap-2\">\n\t\t\t\t\t\t\t\t\t\t<Label>Target Project</Label>\n\t\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\t\tvalue={selectedTargetProject}\n\t\t\t\t\t\t\t\t\t\t\tonValueChange={(value) => {\n\t\t\t\t\t\t\t\t\t\t\t\tsetSelectedTargetProject(value);\n\t\t\t\t\t\t\t\t\t\t\t\tsetSelectedTargetEnvironment(\"\"); // Reset environment when project changes\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select target project\" />\n\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t{allProjects\n\t\t\t\t\t\t\t\t\t\t\t\t\t?.filter((p) => p.projectId !== environmentId)\n\t\t\t\t\t\t\t\t\t\t\t\t\t.map((project) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={project.projectId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={project.projectId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{project.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t{/* Step 2: Select Environment (only show if project is selected) */}\n\t\t\t\t\t\t\t\t\t{selectedTargetProject && (\n\t\t\t\t\t\t\t\t\t\t<div className=\"grid gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t<Label>Target Environment</Label>\n\t\t\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\t\t\tvalue={selectedTargetEnvironment}\n\t\t\t\t\t\t\t\t\t\t\t\tonValueChange={setSelectedTargetEnvironment}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select target environment\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{selectedProjectEnvironments?.map((env) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={env.environmentId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={env.environmentId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{env.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</>\n\t\t\t\t\t)}\n\n\t\t\t\t\t<div className=\"grid gap-2\">\n\t\t\t\t\t\t<Label>Selected services to duplicate</Label>\n\t\t\t\t\t\t<div className=\"space-y-2 max-h-[200px] overflow-y-auto border rounded-md p-4\">\n\t\t\t\t\t\t\t{selectedServices.map((service) => (\n\t\t\t\t\t\t\t\t<div key={service.id} className=\"flex items-center space-x-2\">\n\t\t\t\t\t\t\t\t\t<span className=\"text-sm\">\n\t\t\t\t\t\t\t\t\t\t{service.name} ({service.type})\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<DialogFooter>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\tonClick={() => setOpen(false)}\n\t\t\t\t\t\tdisabled={isPending}\n\t\t\t\t\t>\n\t\t\t\t\t\tCancel\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tonClick={handleDuplicate}\n\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\tisPending ||\n\t\t\t\t\t\t\t(duplicateType === \"new-project\" && !name) ||\n\t\t\t\t\t\t\t(duplicateType === \"existing-environment\" &&\n\t\t\t\t\t\t\t\t(!selectedTargetProject || !selectedTargetEnvironment))\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t{isPending ? (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<Loader2 className=\"mr-2 h-4 w-4 animate-spin\" />\n\t\t\t\t\t\t\t\t{duplicateType === \"new-project\"\n\t\t\t\t\t\t\t\t\t? \"Duplicating to new project...\"\n\t\t\t\t\t\t\t\t\t: \"Duplicating to environment...\"}\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t) : duplicateType === \"new-project\" ? (\n\t\t\t\t\t\t\t\"Duplicate to new project\"\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\"Duplicate to environment\"\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Button>\n\t\t\t\t</DialogFooter>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/project/environment-variables.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { Terminal } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { CodeEditor } from \"@/components/shared/code-editor\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport { DropdownMenuItem } from \"@/components/ui/dropdown-menu\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { api } from \"@/utils/api\";\n\nconst updateEnvironmentSchema = z.object({\n\tenv: z.string().optional(),\n});\n\ntype UpdateEnvironment = z.infer<typeof updateEnvironmentSchema>;\n\ninterface Props {\n\tenvironmentId: string;\n\tchildren?: React.ReactNode;\n}\n\nexport const EnvironmentVariables = ({ environmentId, children }: Props) => {\n\tconst { data: permissions } = api.user.getPermissions.useQuery();\n\tconst canRead = permissions?.environmentEnvVars.read ?? false;\n\tconst canWrite = permissions?.environmentEnvVars.write ?? false;\n\tconst [isOpen, setIsOpen] = useState(false);\n\tconst utils = api.useUtils();\n\tconst { mutateAsync, error, isError, isPending } =\n\t\tapi.environment.update.useMutation();\n\tconst { data } = api.environment.one.useQuery(\n\t\t{\n\t\t\tenvironmentId,\n\t\t},\n\t\t{\n\t\t\tenabled: !!environmentId,\n\t\t},\n\t);\n\n\tconst form = useForm<UpdateEnvironment>({\n\t\tdefaultValues: {\n\t\t\tenv: data?.env ?? \"\",\n\t\t},\n\t\tresolver: zodResolver(updateEnvironmentSchema),\n\t});\n\n\tuseEffect(() => {\n\t\tif (data) {\n\t\t\tform.reset({\n\t\t\t\tenv: data.env ?? \"\",\n\t\t\t});\n\t\t}\n\t}, [data, form, form.reset]);\n\n\tconst onSubmit = async (formData: UpdateEnvironment) => {\n\t\tawait mutateAsync({\n\t\t\tenv: formData.env || \"\",\n\t\t\tenvironmentId: environmentId,\n\t\t})\n\t\t\t.then(() => {\n\t\t\t\ttoast.success(\"Environment variables updated successfully\");\n\t\t\t\tutils.environment.one.invalidate({ environmentId });\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error updating the environment variables\");\n\t\t\t})\n\t\t\t.finally(() => {});\n\t};\n\n\t// Add keyboard shortcut for Ctrl+S/Cmd+S\n\tuseEffect(() => {\n\t\tconst handleKeyDown = (e: KeyboardEvent) => {\n\t\t\tif ((e.ctrlKey || e.metaKey) && e.key === \"s\" && !isPending && isOpen) {\n\t\t\t\te.preventDefault();\n\t\t\t\tform.handleSubmit(onSubmit)();\n\t\t\t}\n\t\t};\n\n\t\tdocument.addEventListener(\"keydown\", handleKeyDown);\n\t\treturn () => {\n\t\t\tdocument.removeEventListener(\"keydown\", handleKeyDown);\n\t\t};\n\t}, [form, onSubmit, isPending, isOpen]);\n\n\tif (!canRead) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t{children ?? (\n\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\tclassName=\"w-full cursor-pointer space-x-3\"\n\t\t\t\t\t\tonSelect={(e) => e.preventDefault()}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Terminal className=\"size-4\" />\n\t\t\t\t\t\t<span>Environment Variables</span>\n\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t)}\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-6xl\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Environment Variables</DialogTitle>\n\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\tUpdate the environment variables that are accessible to all services\n\t\t\t\t\t\tin this environment.\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t{isError && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\t\t\t\t<AlertBlock type=\"info\">\n\t\t\t\t\tUse this syntax to reference environment-level variables in your\n\t\t\t\t\tservice environments:{\" \"}\n\t\t\t\t\t<code>API_URL=${\"{{environment.API_URL}}\"}</code>\n\t\t\t\t</AlertBlock>\n\t\t\t\t<div className=\"grid gap-4\">\n\t\t\t\t\t<div className=\"grid items-center gap-4\">\n\t\t\t\t\t\t<Form {...form}>\n\t\t\t\t\t\t\t<form\n\t\t\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\t\t\tclassName=\"grid w-full gap-4 \"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"env\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Environment variables</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<CodeEditor\n\t\t\t\t\t\t\t\t\t\t\t\t\tlineWrapping\n\t\t\t\t\t\t\t\t\t\t\t\t\tlanguage=\"properties\"\n\t\t\t\t\t\t\t\t\t\t\t\t\treadOnly={!canWrite}\n\t\t\t\t\t\t\t\t\t\t\t\t\twrapperClassName=\"h-[35rem] font-mono\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder={`NODE_ENV=development\nDATABASE_URL=postgresql://localhost:5432/mydb\nAPI_KEY=your-api-key-here\n\n                                                    `}\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t<pre>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t</pre>\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t{canWrite && (\n\t\t\t\t\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t\t\t\t\t<Button isLoading={isPending} type=\"submit\">\n\t\t\t\t\t\t\t\t\t\t\tUpdate\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t</DialogFooter>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t</Form>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/projects/handle-project.tsx",
    "content": "import { standardSchemaResolver } from \"@hookform/resolvers/standard-schema\";\n\nimport { PlusIcon, SquarePen } from \"lucide-react\";\nimport { useRouter } from \"next/router\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { TagSelector } from \"@/components/shared/tag-selector\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport { DropdownMenuItem } from \"@/components/ui/dropdown-menu\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { Textarea } from \"@/components/ui/textarea\";\nimport { api } from \"@/utils/api\";\n\nconst AddProjectSchema = z.object({\n\tname: z\n\t\t.string()\n\t\t.min(1, \"Project name is required\")\n\t\t.refine(\n\t\t\t(name) => {\n\t\t\t\tconst trimmedName = name.trim();\n\t\t\t\tconst validNameRegex =\n\t\t\t\t\t/^[\\p{L}\\p{N}_-][\\p{L}\\p{N}\\s_.-]*[\\p{L}\\p{N}_-]$/u;\n\t\t\t\treturn validNameRegex.test(trimmedName);\n\t\t\t},\n\t\t\t{\n\t\t\t\tmessage:\n\t\t\t\t\t\"Project name must start and end with a letter, number, hyphen or underscore. Spaces are allowed in between.\",\n\t\t\t},\n\t\t)\n\t\t.refine((name) => !/^\\d/.test(name.trim()), {\n\t\t\tmessage: \"Project name cannot start with a number\",\n\t\t})\n\t\t.transform((name) => name.trim()),\n\tdescription: z.string().optional(),\n});\n\ntype AddProject = z.infer<typeof AddProjectSchema>;\n\ninterface Props {\n\tprojectId?: string;\n}\n\nexport const HandleProject = ({ projectId }: Props) => {\n\tconst utils = api.useUtils();\n\tconst [isOpen, setIsOpen] = useState(false);\n\tconst [selectedTagIds, setSelectedTagIds] = useState<string[]>([]);\n\n\tconst { mutateAsync, error, isError } = projectId\n\t\t? api.project.update.useMutation()\n\t\t: api.project.create.useMutation();\n\n\tconst { data, refetch } = api.project.one.useQuery(\n\t\t{\n\t\t\tprojectId: projectId || \"\",\n\t\t},\n\t\t{\n\t\t\tenabled: !!projectId,\n\t\t},\n\t);\n\n\tconst { data: availableTags = [] } = api.tag.all.useQuery();\n\tconst bulkAssignMutation = api.tag.bulkAssign.useMutation();\n\n\tconst router = useRouter();\n\tconst form = useForm<AddProject>({\n\t\tdefaultValues: {\n\t\t\tdescription: \"\",\n\t\t\tname: \"\",\n\t\t},\n\t\tresolver: standardSchemaResolver(AddProjectSchema),\n\t});\n\n\tuseEffect(() => {\n\t\tform.reset({\n\t\t\tdescription: data?.description ?? \"\",\n\t\t\tname: data?.name ?? \"\",\n\t\t});\n\t\t// Load existing tags when editing a project\n\t\tif (data?.projectTags) {\n\t\t\tconst tagIds = data.projectTags.map((pt) => pt.tagId);\n\t\t\tsetSelectedTagIds(tagIds);\n\t\t} else {\n\t\t\tsetSelectedTagIds([]);\n\t\t}\n\t}, [form, form.reset, form.formState.isSubmitSuccessful, data]);\n\n\tconst onSubmit = async (data: AddProject) => {\n\t\tawait mutateAsync({\n\t\t\tname: data.name,\n\t\t\tdescription: data.description,\n\t\t\tprojectId: projectId || \"\",\n\t\t})\n\t\t\t.then(async (data) => {\n\t\t\t\t// Assign tags to the project (both create and update)\n\t\t\t\tconst projectIdToUse =\n\t\t\t\t\tprojectId ||\n\t\t\t\t\t(data && \"project\" in data ? data.project.projectId : undefined);\n\n\t\t\t\tif (projectIdToUse) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait bulkAssignMutation.mutateAsync({\n\t\t\t\t\t\t\tprojectId: projectIdToUse,\n\t\t\t\t\t\t\ttagIds: selectedTagIds,\n\t\t\t\t\t\t});\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\ttoast.error(\"Failed to assign tags to project\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tawait utils.project.all.invalidate();\n\t\t\t\ttoast.success(projectId ? \"Project Updated\" : \"Project Created\");\n\t\t\t\tsetIsOpen(false);\n\t\t\t\tif (!projectId) {\n\t\t\t\t\tconst environmentIdToUse =\n\t\t\t\t\t\tdata && \"environment\" in data\n\t\t\t\t\t\t\t? data.environment.environmentId\n\t\t\t\t\t\t\t: undefined;\n\n\t\t\t\t\tif (environmentIdToUse && projectIdToUse) {\n\t\t\t\t\t\trouter.push(\n\t\t\t\t\t\t\t`/dashboard/project/${projectIdToUse}/environment/${environmentIdToUse}`,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\trefetch();\n\t\t\t\t}\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\n\t\t\t\t\tprojectId ? \"Error updating a project\" : \"Error creating a project\",\n\t\t\t\t);\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t{projectId ? (\n\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\tclassName=\"w-full cursor-pointer space-x-3\"\n\t\t\t\t\t\tonSelect={(e) => e.preventDefault()}\n\t\t\t\t\t>\n\t\t\t\t\t\t<SquarePen className=\"size-4\" />\n\t\t\t\t\t\t<span>Update</span>\n\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t) : (\n\t\t\t\t\t<Button>\n\t\t\t\t\t\t<PlusIcon className=\"h-4 w-4\" />\n\t\t\t\t\t\tCreate Project\n\t\t\t\t\t</Button>\n\t\t\t\t)}\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:m:max-w-lg \">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>{projectId ? \"Update\" : \"Add a\"} project</DialogTitle>\n\t\t\t\t\t<DialogDescription>The home of something big!</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t{isError && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tid=\"hook-form-add-project\"\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\tclassName=\"grid w-full gap-4\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"name\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Name</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"Vandelay Industries\" {...field} />\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"description\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Description</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Textarea\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Description about your project...\"\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"resize-none\"\n\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<div className=\"space-y-2\">\n\t\t\t\t\t\t\t<FormLabel>Tags</FormLabel>\n\t\t\t\t\t\t\t<TagSelector\n\t\t\t\t\t\t\t\ttags={availableTags.map((tag) => ({\n\t\t\t\t\t\t\t\t\tid: tag.tagId,\n\t\t\t\t\t\t\t\t\tname: tag.name,\n\t\t\t\t\t\t\t\t\tcolor: tag.color ?? undefined,\n\t\t\t\t\t\t\t\t}))}\n\t\t\t\t\t\t\t\tselectedTags={selectedTagIds}\n\t\t\t\t\t\t\t\tonTagsChange={setSelectedTagIds}\n\t\t\t\t\t\t\t\tplaceholder=\"Select tags...\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</form>\n\n\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tisLoading={form.formState.isSubmitting}\n\t\t\t\t\t\t\tform=\"hook-form-add-project\"\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{projectId ? \"Update\" : \"Create\"}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</DialogFooter>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/projects/project-environment.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { FileIcon } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { CodeEditor } from \"@/components/shared/code-editor\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport { DropdownMenuItem } from \"@/components/ui/dropdown-menu\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { api } from \"@/utils/api\";\n\nconst updateProjectSchema = z.object({\n\tenv: z.string().optional(),\n});\n\ntype UpdateProject = z.infer<typeof updateProjectSchema>;\n\ninterface Props {\n\tprojectId: string;\n\tchildren?: React.ReactNode;\n}\n\nexport const ProjectEnvironment = ({ projectId, children }: Props) => {\n\tconst { data: permissions } = api.user.getPermissions.useQuery();\n\tconst canRead = permissions?.projectEnvVars.read ?? false;\n\tconst canWrite = permissions?.projectEnvVars.write ?? false;\n\tconst [isOpen, setIsOpen] = useState(false);\n\tconst utils = api.useUtils();\n\tconst { mutateAsync, error, isError, isPending } =\n\t\tapi.project.update.useMutation();\n\tconst { data } = api.project.one.useQuery(\n\t\t{\n\t\t\tprojectId,\n\t\t},\n\t\t{\n\t\t\tenabled: !!projectId,\n\t\t},\n\t);\n\n\tconst form = useForm<UpdateProject>({\n\t\tdefaultValues: {\n\t\t\tenv: data?.env ?? \"\",\n\t\t},\n\t\tresolver: zodResolver(updateProjectSchema),\n\t});\n\tuseEffect(() => {\n\t\tif (data) {\n\t\t\tform.reset({\n\t\t\t\tenv: data.env ?? \"\",\n\t\t\t});\n\t\t}\n\t}, [data, form, form.reset]);\n\n\tconst onSubmit = async (formData: UpdateProject) => {\n\t\tawait mutateAsync({\n\t\t\tenv: formData.env || \"\",\n\t\t\tprojectId: projectId,\n\t\t})\n\t\t\t.then(() => {\n\t\t\t\ttoast.success(\"Project env updated successfully\");\n\t\t\t\tutils.project.all.invalidate();\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error updating the env\");\n\t\t\t})\n\t\t\t.finally(() => {});\n\t};\n\n\t// Add keyboard shortcut for Ctrl+S/Cmd+S\n\tuseEffect(() => {\n\t\tconst handleKeyDown = (e: KeyboardEvent) => {\n\t\t\tif ((e.ctrlKey || e.metaKey) && e.key === \"s\" && !isPending && isOpen) {\n\t\t\t\te.preventDefault();\n\t\t\t\tform.handleSubmit(onSubmit)();\n\t\t\t}\n\t\t};\n\n\t\tdocument.addEventListener(\"keydown\", handleKeyDown);\n\t\treturn () => {\n\t\t\tdocument.removeEventListener(\"keydown\", handleKeyDown);\n\t\t};\n\t}, [form, onSubmit, isPending, isOpen]);\n\n\tif (!canRead) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t{children ?? (\n\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\tclassName=\"w-full cursor-pointer space-x-3\"\n\t\t\t\t\t\tonSelect={(e) => e.preventDefault()}\n\t\t\t\t\t>\n\t\t\t\t\t\t<FileIcon className=\"size-4\" />\n\t\t\t\t\t\t<span>Project Environment</span>\n\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t)}\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-6xl\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Project Environment</DialogTitle>\n\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\tUpdate the env Environment variables that are accessible to all\n\t\t\t\t\t\tservices of this project.\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t{isError && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\t\t\t\t<AlertBlock type=\"info\">\n\t\t\t\t\tUse this syntax to reference project-level variables in your service\n\t\t\t\t\tenvironments: <code>DATABASE_URL=${\"{{project.DATABASE_URL}}\"}</code>\n\t\t\t\t</AlertBlock>\n\t\t\t\t<div className=\"grid gap-4\">\n\t\t\t\t\t<div className=\"grid items-center gap-4\">\n\t\t\t\t\t\t<Form {...form}>\n\t\t\t\t\t\t\t<form\n\t\t\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\t\t\tclassName=\"grid w-full gap-4 \"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"env\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Environment variables</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<CodeEditor\n\t\t\t\t\t\t\t\t\t\t\t\t\tlineWrapping\n\t\t\t\t\t\t\t\t\t\t\t\t\tlanguage=\"properties\"\n\t\t\t\t\t\t\t\t\t\t\t\t\treadOnly={!canWrite}\n\t\t\t\t\t\t\t\t\t\t\t\t\twrapperClassName=\"h-[35rem] font-mono\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder={`NODE_ENV=production\nPORT=3000\n\n                                                    `}\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t<pre>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t</pre>\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t{canWrite && (\n\t\t\t\t\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t\t\t\t\t<Button isLoading={isPending} type=\"submit\">\n\t\t\t\t\t\t\t\t\t\t\tUpdate\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t</DialogFooter>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t</Form>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/projects/show.tsx",
    "content": "import {\n\tAlertTriangle,\n\tArrowUpDown,\n\tBookIcon,\n\tFolderInput,\n\tLoader2,\n\tMoreHorizontalIcon,\n\tSearch,\n\tTrashIcon,\n} from \"lucide-react\";\nimport Link from \"next/link\";\nimport { useRouter } from \"next/router\";\nimport { useEffect, useMemo, useState } from \"react\";\nimport { toast } from \"sonner\";\nimport { BreadcrumbSidebar } from \"@/components/shared/breadcrumb-sidebar\";\nimport { DateTooltip } from \"@/components/shared/date-tooltip\";\nimport { FocusShortcutInput } from \"@/components/shared/focus-shortcut-input\";\nimport { TagBadge } from \"@/components/shared/tag-badge\";\nimport { TagFilter } from \"@/components/shared/tag-filter\";\nimport {\n\tAlertDialog,\n\tAlertDialogAction,\n\tAlertDialogCancel,\n\tAlertDialogContent,\n\tAlertDialogDescription,\n\tAlertDialogFooter,\n\tAlertDialogHeader,\n\tAlertDialogTitle,\n\tAlertDialogTrigger,\n} from \"@/components/ui/alert-dialog\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardFooter,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\tDropdownMenu,\n\tDropdownMenuContent,\n\tDropdownMenuItem,\n\tDropdownMenuLabel,\n\tDropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { TimeBadge } from \"@/components/ui/time-badge\";\nimport { api } from \"@/utils/api\";\nimport { useDebounce } from \"@/utils/hooks/use-debounce\";\nimport { HandleProject } from \"./handle-project\";\nimport { ProjectEnvironment } from \"./project-environment\";\n\nexport const ShowProjects = () => {\n\tconst utils = api.useUtils();\n\tconst router = useRouter();\n\tconst { data: isCloud } = api.settings.isCloud.useQuery();\n\tconst { data, isPending } = api.project.all.useQuery();\n\tconst { data: auth } = api.user.get.useQuery();\n\tconst { data: permissions } = api.user.getPermissions.useQuery();\n\tconst { mutateAsync } = api.project.remove.useMutation();\n\tconst { data: availableTags } = api.tag.all.useQuery();\n\n\tconst [searchQuery, setSearchQuery] = useState(\n\t\trouter.isReady && typeof router.query.q === \"string\" ? router.query.q : \"\",\n\t);\n\tconst debouncedSearchQuery = useDebounce(searchQuery, 500);\n\n\tconst [sortBy, setSortBy] = useState<string>(() => {\n\t\tif (typeof window !== \"undefined\") {\n\t\t\treturn localStorage.getItem(\"projectsSort\") || \"createdAt-desc\";\n\t\t}\n\t\treturn \"createdAt-desc\";\n\t});\n\n\tconst [selectedTagIds, setSelectedTagIds] = useState<string[]>(() => {\n\t\tif (typeof window !== \"undefined\") {\n\t\t\tconst saved = localStorage.getItem(\"projectsTagFilter\");\n\t\t\treturn saved ? JSON.parse(saved) : [];\n\t\t}\n\t\treturn [];\n\t});\n\n\tuseEffect(() => {\n\t\tlocalStorage.setItem(\"projectsSort\", sortBy);\n\t}, [sortBy]);\n\n\tuseEffect(() => {\n\t\tlocalStorage.setItem(\"projectsTagFilter\", JSON.stringify(selectedTagIds));\n\t}, [selectedTagIds]);\n\n\tuseEffect(() => {\n\t\tif (!availableTags) return;\n\t\tconst validIds = new Set(availableTags.map((t) => t.tagId));\n\t\tsetSelectedTagIds((prev) => {\n\t\t\tconst filtered = prev.filter((id) => validIds.has(id));\n\t\t\treturn filtered.length === prev.length ? prev : filtered;\n\t\t});\n\t}, [availableTags]);\n\n\tuseEffect(() => {\n\t\tif (!router.isReady) return;\n\t\tconst urlQuery = typeof router.query.q === \"string\" ? router.query.q : \"\";\n\t\tif (urlQuery !== searchQuery) {\n\t\t\tsetSearchQuery(urlQuery);\n\t\t}\n\t}, [router.isReady, router.query.q]);\n\n\tuseEffect(() => {\n\t\tif (!router.isReady) return;\n\t\tconst urlQuery = typeof router.query.q === \"string\" ? router.query.q : \"\";\n\t\tif (debouncedSearchQuery === urlQuery) return;\n\n\t\tconst newQuery = { ...router.query };\n\t\tif (debouncedSearchQuery) {\n\t\t\tnewQuery.q = debouncedSearchQuery;\n\t\t} else {\n\t\t\tdelete newQuery.q;\n\t\t}\n\t\trouter.replace({ pathname: router.pathname, query: newQuery }, undefined, {\n\t\t\tshallow: true,\n\t\t});\n\t}, [debouncedSearchQuery]);\n\n\tconst filteredProjects = useMemo(() => {\n\t\tif (!data) return [];\n\n\t\tlet filtered = data.filter(\n\t\t\t(project) =>\n\t\t\t\tproject.name\n\t\t\t\t\t.toLowerCase()\n\t\t\t\t\t.includes(debouncedSearchQuery.toLowerCase()) ||\n\t\t\t\tproject.description\n\t\t\t\t\t?.toLowerCase()\n\t\t\t\t\t.includes(debouncedSearchQuery.toLowerCase()),\n\t\t);\n\n\t\t// Filter by selected tags (OR logic: show projects with ANY selected tag)\n\t\tif (selectedTagIds.length > 0) {\n\t\t\tfiltered = filtered.filter((project) =>\n\t\t\t\tproject.projectTags?.some((pt) =>\n\t\t\t\t\tselectedTagIds.includes(pt.tag.tagId),\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\n\t\t// Then sort the filtered results\n\t\tconst [field, direction] = sortBy.split(\"-\");\n\t\treturn [...filtered].sort((a, b) => {\n\t\t\tlet comparison = 0;\n\t\t\tswitch (field) {\n\t\t\t\tcase \"name\":\n\t\t\t\t\tcomparison = a.name.localeCompare(b.name);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"createdAt\":\n\t\t\t\t\tcomparison =\n\t\t\t\t\t\tnew Date(a.createdAt).getTime() - new Date(b.createdAt).getTime();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"services\": {\n\t\t\t\t\tconst aTotalServices = a.environments.reduce((total, env) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\ttotal +\n\t\t\t\t\t\t\t(env.applications?.length || 0) +\n\t\t\t\t\t\t\t(env.mariadb?.length || 0) +\n\t\t\t\t\t\t\t(env.mongo?.length || 0) +\n\t\t\t\t\t\t\t(env.mysql?.length || 0) +\n\t\t\t\t\t\t\t(env.postgres?.length || 0) +\n\t\t\t\t\t\t\t(env.redis?.length || 0) +\n\t\t\t\t\t\t\t(env.compose?.length || 0)\n\t\t\t\t\t\t);\n\t\t\t\t\t}, 0);\n\t\t\t\t\tconst bTotalServices = b.environments.reduce((total, env) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\ttotal +\n\t\t\t\t\t\t\t(env.applications?.length || 0) +\n\t\t\t\t\t\t\t(env.mariadb?.length || 0) +\n\t\t\t\t\t\t\t(env.mongo?.length || 0) +\n\t\t\t\t\t\t\t(env.mysql?.length || 0) +\n\t\t\t\t\t\t\t(env.postgres?.length || 0) +\n\t\t\t\t\t\t\t(env.redis?.length || 0) +\n\t\t\t\t\t\t\t(env.compose?.length || 0)\n\t\t\t\t\t\t);\n\t\t\t\t\t}, 0);\n\t\t\t\t\tcomparison = aTotalServices - bTotalServices;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault:\n\t\t\t\t\tcomparison = 0;\n\t\t\t}\n\t\t\treturn direction === \"asc\" ? comparison : -comparison;\n\t\t});\n\t}, [data, debouncedSearchQuery, sortBy, selectedTagIds]);\n\n\treturn (\n\t\t<>\n\t\t\t{!isCloud && (\n\t\t\t\t<div className=\"absolute top-4 right-4\">\n\t\t\t\t\t<TimeBadge />\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t<BreadcrumbSidebar\n\t\t\t\tlist={[{ name: \"Projects\", href: \"/dashboard/projects\" }]}\n\t\t\t/>\n\t\t\t<div className=\"w-full\">\n\t\t\t\t<Card className=\"h-full bg-sidebar p-2.5 rounded-xl  \">\n\t\t\t\t\t<div className=\"rounded-xl bg-background shadow-md \">\n\t\t\t\t\t\t<div className=\"flex justify-between gap-4 w-full items-center flex-wrap p-6\">\n\t\t\t\t\t\t\t<CardHeader className=\"p-0\">\n\t\t\t\t\t\t\t\t<CardTitle className=\"text-xl flex flex-row gap-2\">\n\t\t\t\t\t\t\t\t\t<FolderInput className=\"size-6 text-muted-foreground self-center\" />\n\t\t\t\t\t\t\t\t\tProjects\n\t\t\t\t\t\t\t\t</CardTitle>\n\t\t\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\t\t\tCreate and manage your projects\n\t\t\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t\t{permissions?.project.create && (\n\t\t\t\t\t\t\t\t<div className=\"\">\n\t\t\t\t\t\t\t\t\t<HandleProject />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<CardContent className=\"space-y-2 py-8 border-t gap-4 flex flex-col min-h-[60vh]\">\n\t\t\t\t\t\t\t{isPending ? (\n\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-2 items-center justify-center text-sm text-muted-foreground min-h-[60vh]\">\n\t\t\t\t\t\t\t\t\t<span>Loading...</span>\n\t\t\t\t\t\t\t\t\t<Loader2 className=\"animate-spin size-4\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<div className=\"flex max-sm:flex-col gap-4 items-center w-full\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex-1 relative max-sm:w-full\">\n\t\t\t\t\t\t\t\t\t\t\t<FocusShortcutInput\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Filter projects...\"\n\t\t\t\t\t\t\t\t\t\t\t\tvalue={searchQuery}\n\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => setSearchQuery(e.target.value)}\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"pr-10\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t\t\t\t<Search className=\"absolute right-3 top-1/2 -translate-y-1/2 size-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t<TagFilter\n\t\t\t\t\t\t\t\t\t\t\t\ttags={\n\t\t\t\t\t\t\t\t\t\t\t\t\tavailableTags?.map((tag) => ({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tid: tag.tagId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tname: tag.name,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor: tag.color || undefined,\n\t\t\t\t\t\t\t\t\t\t\t\t\t})) || []\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tselectedTags={selectedTagIds}\n\t\t\t\t\t\t\t\t\t\t\t\tonTagsChange={setSelectedTagIds}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2 min-w-48 max-sm:w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t<ArrowUpDown className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t<Select value={sortBy} onValueChange={setSortBy}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger className=\"w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Sort by...\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"name-asc\">Name (A-Z)</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"name-desc\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tName (Z-A)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"createdAt-desc\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tNewest first\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"createdAt-asc\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tOldest first\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"services-desc\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMost services\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"services-asc\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLeast services\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t{filteredProjects?.length === 0 && (\n\t\t\t\t\t\t\t\t\t\t<div className=\"mt-6 flex h-[50vh] w-full flex-col items-center justify-center space-y-4\">\n\t\t\t\t\t\t\t\t\t\t\t<FolderInput className=\"size-8 self-center text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-center font-medium text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\tNo projects found\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t<div className=\"w-full grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 3xl:grid-cols-5 flex-wrap gap-5\">\n\t\t\t\t\t\t\t\t\t\t{filteredProjects?.map((project) => {\n\t\t\t\t\t\t\t\t\t\t\tconst emptyServices = project?.environments\n\t\t\t\t\t\t\t\t\t\t\t\t.map(\n\t\t\t\t\t\t\t\t\t\t\t\t\t(env) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tenv.applications.length === 0 &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tenv.mariadb.length === 0 &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tenv.mongo.length === 0 &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tenv.mysql.length === 0 &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tenv.postgres.length === 0 &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tenv.redis.length === 0 &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tenv.applications.length === 0 &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tenv.compose.length === 0,\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t.every(Boolean);\n\n\t\t\t\t\t\t\t\t\t\t\tconst totalServices = project?.environments\n\t\t\t\t\t\t\t\t\t\t\t\t.map(\n\t\t\t\t\t\t\t\t\t\t\t\t\t(env) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tenv.mariadb.length +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tenv.mongo.length +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tenv.mysql.length +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tenv.postgres.length +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tenv.redis.length +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tenv.applications.length +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tenv.compose.length,\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t.reduce((acc, curr) => acc + curr, 0);\n\n\t\t\t\t\t\t\t\t\t\t\t// Find default environment from accessible environments, or fall back to first accessible environment\n\t\t\t\t\t\t\t\t\t\t\tconst accessibleEnvironment =\n\t\t\t\t\t\t\t\t\t\t\t\tproject?.environments.find((env) => env.isDefault) ||\n\t\t\t\t\t\t\t\t\t\t\t\tproject?.environments?.[0];\n\n\t\t\t\t\t\t\t\t\t\t\tconst hasNoEnvironments = !accessibleEnvironment;\n\n\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={project.projectId}\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-full lg:max-w-md\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\t\t\thref={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thasNoEnvironments\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"#\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: `/dashboard/project/${project.projectId}/environment/${accessibleEnvironment?.environmentId}`\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (hasNoEnvironments) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Card className=\"group relative w-full h-full bg-transparent transition-colors hover:bg-border\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CardTitle className=\"flex items-center justify-between gap-2 overflow-clip\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex flex-col gap-1.5 \">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<BookIcon className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-base font-medium leading-none\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{project.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm font-medium text-muted-foreground break-normal\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{project.description}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{project.projectTags &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tproject.projectTags.length > 0 && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-wrap gap-1.5 mt-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{project.projectTags.map((pt) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TagBadge\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={pt.tag.tagId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tname={pt.tag.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor={pt.tag.color}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{hasNoEnvironments && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-2 items-center rounded-lg bg-yellow-50 p-2 mt-2 dark:bg-yellow-950\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<AlertTriangle className=\"size-4 text-yellow-600 dark:text-yellow-400 shrink-0\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-xs text-yellow-600 dark:text-yellow-400\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tYou have access to this project but no\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenvironments are available\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex self-start space-x-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DropdownMenu>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DropdownMenuTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"px-2\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<MoreHorizontalIcon className=\"size-5\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DropdownMenuTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DropdownMenuContent\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-[200px] space-y-2 overflow-y-auto max-h-[280px]\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={(e) => e.stopPropagation()}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DropdownMenuLabel className=\"font-normal\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tActions\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DropdownMenuLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={(e) => e.stopPropagation()}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ProjectEnvironment\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tprojectId={project.projectId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={(e) => e.stopPropagation()}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<HandleProject\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tprojectId={project.projectId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={(e) => e.stopPropagation()}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{permissions?.project.delete && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<AlertDialog>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<AlertDialogTrigger className=\"w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-full cursor-pointer  space-x-3\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonSelect={(e) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TrashIcon className=\"size-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>Delete</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</AlertDialogTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<AlertDialogContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<AlertDialogHeader>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<AlertDialogTitle>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAre you sure to delete this\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tproject?\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</AlertDialogTitle>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{!emptyServices ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-4 rounded-lg bg-yellow-50 p-2 dark:bg-yellow-950\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<AlertTriangle className=\"text-yellow-600 dark:text-yellow-400\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm text-yellow-600 dark:text-yellow-400\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tYou have active\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tservices, please delete\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthem first\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<AlertDialogDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tThis action cannot be\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tundone\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</AlertDialogDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</AlertDialogHeader>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<AlertDialogFooter>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<AlertDialogCancel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCancel\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</AlertDialogCancel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<AlertDialogAction\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisabled={!emptyServices}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait mutateAsync({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tprojectId:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tproject.projectId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Project deleted successfully\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Error deleting this project\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.finally(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tutils.project.all.invalidate();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDelete\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</AlertDialogAction>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</AlertDialogFooter>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</AlertDialogContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</AlertDialog>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DropdownMenuContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DropdownMenu>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CardTitle>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CardFooter className=\"pt-4\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-1 text-xs flex flex-row justify-between max-sm:flex-wrap w-full gap-2 sm:gap-4\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DateTooltip date={project.createdAt}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCreated\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DateTooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{totalServices}{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{totalServices === 1\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"service\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"services\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CardFooter>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Card>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t</div>\n\t\t\t\t</Card>\n\t\t\t</div>\n\t\t</>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/redis/general/show-external-redis-credentials.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport Link from \"next/link\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { ToggleVisibilityInput } from \"@/components/shared/toggle-visibility-input\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { Label } from \"@/components/ui/label\";\nimport { api } from \"@/utils/api\";\n\nconst DockerProviderSchema = z.object({\n\texternalPort: z.preprocess((a) => {\n\t\tif (a !== null) {\n\t\t\tconst parsed = Number.parseInt(z.string().parse(a), 10);\n\t\t\treturn Number.isNaN(parsed) ? null : parsed;\n\t\t}\n\t\treturn null;\n\t}, z\n\t\t.number()\n\t\t.gte(0, \"Range must be 0 - 65535\")\n\t\t.lte(65535, \"Range must be 0 - 65535\")\n\t\t.nullable()),\n});\n\ntype DockerProvider = z.infer<typeof DockerProviderSchema>;\n\ninterface Props {\n\tredisId: string;\n}\nexport const ShowExternalRedisCredentials = ({ redisId }: Props) => {\n\tconst { data: ip } = api.settings.getIp.useQuery();\n\tconst { data, refetch } = api.redis.one.useQuery({ redisId });\n\tconst { mutateAsync, isPending } = api.redis.saveExternalPort.useMutation();\n\tconst [connectionUrl, setConnectionUrl] = useState(\"\");\n\tconst getIp = data?.server?.ipAddress || ip;\n\n\tconst form = useForm({\n\t\tdefaultValues: {},\n\t\tresolver: zodResolver(DockerProviderSchema),\n\t});\n\n\tuseEffect(() => {\n\t\tif (data?.externalPort) {\n\t\t\tform.reset({\n\t\t\t\texternalPort: data.externalPort,\n\t\t\t});\n\t\t}\n\t}, [form.reset, data, form]);\n\n\tconst onSubmit = async (values: DockerProvider) => {\n\t\tawait mutateAsync({\n\t\t\texternalPort: values.externalPort,\n\t\t\tredisId,\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(\"External Port updated\");\n\t\t\t\tawait refetch();\n\t\t\t})\n\t\t\t.catch((error: Error) => {\n\t\t\t\ttoast.error(error?.message || \"Error saving the external port\");\n\t\t\t});\n\t};\n\n\tuseEffect(() => {\n\t\tconst buildConnectionUrl = () => {\n\t\t\tconst _hostname = window.location.hostname;\n\t\t\tconst port = form.watch(\"externalPort\") || data?.externalPort;\n\n\t\t\treturn `redis://default:${data?.databasePassword}@${getIp}:${port}`;\n\t\t};\n\n\t\tsetConnectionUrl(buildConnectionUrl());\n\t}, [data?.appName, data?.externalPort, data?.databasePassword, form, getIp]);\n\treturn (\n\t\t<>\n\t\t\t<div className=\"flex w-full flex-col gap-5 \">\n\t\t\t\t<Card className=\"bg-background\">\n\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t<CardTitle className=\"text-xl\">External Credentials</CardTitle>\n\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\tIn order to make the database reachable through the internet, you\n\t\t\t\t\t\t\tmust set a port and ensure that the port is not being used by\n\t\t\t\t\t\t\tanother application or database\n\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<CardContent className=\"flex w-full flex-col gap-4\">\n\t\t\t\t\t\t{!getIp && (\n\t\t\t\t\t\t\t<AlertBlock type=\"warning\">\n\t\t\t\t\t\t\t\tYou need to set an IP address in your{\" \"}\n\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\thref=\"/dashboard/settings/server\"\n\t\t\t\t\t\t\t\t\tclassName=\"text-primary\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{data?.serverId\n\t\t\t\t\t\t\t\t\t\t? \"Remote Servers -> Server -> Edit Server -> Update IP Address\"\n\t\t\t\t\t\t\t\t\t\t: \"Web Server -> Server -> Update Server IP\"}\n\t\t\t\t\t\t\t\t</Link>{\" \"}\n\t\t\t\t\t\t\t\tto fix the database url connection.\n\t\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<Form {...form}>\n\t\t\t\t\t\t\t<form\n\t\t\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\t\t\tclassName=\"flex flex-col gap-4\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div className=\"grid grid-cols-2 gap-4 \">\n\t\t\t\t\t\t\t\t\t<div className=\"col-span-2 space-y-4\">\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"externalPort\"\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => {\n\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>External Port (Internet)</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"6379\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value as string}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t{!!data?.externalPort && (\n\t\t\t\t\t\t\t\t\t<div className=\"grid w-full gap-8\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-3\">\n\t\t\t\t\t\t\t\t\t\t\t<Label>External Host</Label>\n\t\t\t\t\t\t\t\t\t\t\t<ToggleVisibilityInput value={connectionUrl} disabled />\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t<div className=\"flex justify-end\">\n\t\t\t\t\t\t\t\t\t<Button type=\"submit\" isLoading={isPending}>\n\t\t\t\t\t\t\t\t\t\tSave\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t</Form>\n\t\t\t\t\t</CardContent>\n\t\t\t\t</Card>\n\t\t\t</div>\n\t\t</>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/redis/general/show-general-redis.tsx",
    "content": "import * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport { Ban, CheckCircle2, RefreshCcw, Rocket, Terminal } from \"lucide-react\";\nimport { useState } from \"react\";\nimport { toast } from \"sonner\";\nimport { DialogAction } from \"@/components/shared/dialog-action\";\nimport { DrawerLogs } from \"@/components/shared/drawer-logs\";\nimport { Button } from \"@/components/ui/button\";\nimport { Card, CardContent, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { api } from \"@/utils/api\";\nimport { type LogLine, parseLogs } from \"../../docker/logs/utils\";\nimport { DockerTerminalModal } from \"../../settings/web-server/docker-terminal-modal\";\n\ninterface Props {\n\tredisId: string;\n}\n\nexport const ShowGeneralRedis = ({ redisId }: Props) => {\n\tconst { data: permissions } = api.user.getPermissions.useQuery();\n\tconst canDeploy = permissions?.deployment.create ?? false;\n\tconst { data, refetch } = api.redis.one.useQuery(\n\t\t{\n\t\t\tredisId,\n\t\t},\n\t\t{ enabled: !!redisId },\n\t);\n\n\tconst { mutateAsync: reload, isPending: isReloading } =\n\t\tapi.redis.reload.useMutation();\n\tconst { mutateAsync: start, isPending: isStarting } =\n\t\tapi.redis.start.useMutation();\n\n\tconst { mutateAsync: stop, isPending: isStopping } =\n\t\tapi.redis.stop.useMutation();\n\n\tconst [isDrawerOpen, setIsDrawerOpen] = useState(false);\n\tconst [filteredLogs, setFilteredLogs] = useState<LogLine[]>([]);\n\tconst [isDeploying, setIsDeploying] = useState(false);\n\tapi.redis.deployWithLogs.useSubscription(\n\t\t{\n\t\t\tredisId: redisId,\n\t\t},\n\t\t{\n\t\t\tenabled: isDeploying,\n\t\t\tonData(log) {\n\t\t\t\tif (!isDrawerOpen) {\n\t\t\t\t\tsetIsDrawerOpen(true);\n\t\t\t\t}\n\n\t\t\t\tif (log === \"Deployment completed successfully!\") {\n\t\t\t\t\tsetIsDeploying(false);\n\t\t\t\t}\n\t\t\t\tconst parsedLogs = parseLogs(log);\n\t\t\t\tsetFilteredLogs((prev) => [...prev, ...parsedLogs]);\n\t\t\t},\n\t\t\tonError(error) {\n\t\t\t\tconsole.error(\"Deployment logs error:\", error);\n\t\t\t\tsetIsDeploying(false);\n\t\t\t},\n\t\t},\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<div className=\"flex w-full flex-col gap-5 \">\n\t\t\t\t<Card className=\"bg-background\">\n\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t<CardTitle className=\"text-xl\">Deploy Settings</CardTitle>\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<CardContent className=\"flex flex-row gap-4 flex-wrap\">\n\t\t\t\t\t\t<TooltipProvider delayDuration={0}>\n\t\t\t\t\t\t\t{canDeploy && (\n\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\ttitle=\"Deploy Redis\"\n\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to deploy this redis?\"\n\t\t\t\t\t\t\t\t\ttype=\"default\"\n\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\tsetIsDeploying(true);\n\t\t\t\t\t\t\t\t\t\tawait new Promise((resolve) => setTimeout(resolve, 1000));\n\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tvariant=\"default\"\n\t\t\t\t\t\t\t\t\t\tisLoading={data?.applicationStatus === \"running\"}\n\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1.5 focus-visible:ring-2 focus-visible:ring-offset-2\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Rocket className=\"size-4 mr-1\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\tDeploy\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t<TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent sideOffset={5} className=\"z-[60]\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p>Downloads and sets up the Redis database</p>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t</TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{canDeploy && (\n\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\ttitle=\"Reload Redis\"\n\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to reload this redis?\"\n\t\t\t\t\t\t\t\t\ttype=\"default\"\n\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\tawait reload({\n\t\t\t\t\t\t\t\t\t\t\tredisId: redisId,\n\t\t\t\t\t\t\t\t\t\t\tappName: data?.appName || \"\",\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Redis reloaded successfully\");\n\t\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error reloading Redis\");\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\tisLoading={isReloading}\n\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1.5 focus-visible:ring-2 focus-visible:ring-offset-2\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<RefreshCcw className=\"size-4 mr-1\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\tReload\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t<TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent sideOffset={5} className=\"z-[60]\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p>Restart the Redis service without rebuilding</p>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t</TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{canDeploy &&\n\t\t\t\t\t\t\t\t(data?.applicationStatus === \"idle\" ? (\n\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\ttitle=\"Start Redis\"\n\t\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to start this redis?\"\n\t\t\t\t\t\t\t\t\t\ttype=\"default\"\n\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\tawait start({\n\t\t\t\t\t\t\t\t\t\t\t\tredisId: redisId,\n\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Redis started successfully\");\n\t\t\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error starting Redis\");\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\tisLoading={isStarting}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1.5 focus-visible:ring-2 focus-visible:ring-offset-2\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CheckCircle2 className=\"size-4 mr-1\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tStart\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent sideOffset={5} className=\"z-[60]\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tStart the Redis database (requires a previous\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsuccessful setup)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\ttitle=\"Stop Redis\"\n\t\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to stop this redis?\"\n\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\tawait stop({\n\t\t\t\t\t\t\t\t\t\t\t\tredisId: redisId,\n\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Redis stopped successfully\");\n\t\t\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error stopping Redis\");\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"destructive\"\n\t\t\t\t\t\t\t\t\t\t\tisLoading={isStopping}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1.5 focus-visible:ring-2 focus-visible:ring-offset-2\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Ban className=\"size-4 mr-1\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tStop\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent sideOffset={5} className=\"z-[60]\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>Stop the currently running Redis database</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t<DockerTerminalModal\n\t\t\t\t\t\t\tappName={data?.appName || \"\"}\n\t\t\t\t\t\t\tserverId={data?.serverId || \"\"}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1.5 focus-visible:ring-2 focus-visible:ring-offset-2\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center\">\n\t\t\t\t\t\t\t\t\t\t\t<Terminal className=\"size-4 mr-1\" />\n\t\t\t\t\t\t\t\t\t\t\tOpen Terminal\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t<TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t\t\t<TooltipContent sideOffset={5} className=\"z-[60]\">\n\t\t\t\t\t\t\t\t\t\t\t<p>Open a terminal to the Redis container</p>\n\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t</TooltipPrimitive.Portal>\n\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</DockerTerminalModal>\n\t\t\t\t\t</CardContent>\n\t\t\t\t</Card>\n\t\t\t\t<DrawerLogs\n\t\t\t\t\tisOpen={isDrawerOpen}\n\t\t\t\t\tonClose={() => {\n\t\t\t\t\t\tsetIsDrawerOpen(false);\n\t\t\t\t\t\tsetFilteredLogs([]);\n\t\t\t\t\t\tsetIsDeploying(false);\n\t\t\t\t\t\trefetch();\n\t\t\t\t\t}}\n\t\t\t\t\tfilteredLogs={filteredLogs}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/redis/general/show-internal-redis-credentials.tsx",
    "content": "import { ToggleVisibilityInput } from \"@/components/shared/toggle-visibility-input\";\nimport { Card, CardContent, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport { Input } from \"@/components/ui/input\";\nimport { Label } from \"@/components/ui/label\";\nimport { api } from \"@/utils/api\";\n\ninterface Props {\n\tredisId: string;\n}\nexport const ShowInternalRedisCredentials = ({ redisId }: Props) => {\n\tconst { data } = api.redis.one.useQuery({ redisId });\n\treturn (\n\t\t<>\n\t\t\t<div className=\"flex w-full flex-col gap-5 \">\n\t\t\t\t<Card className=\"bg-background\">\n\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t<CardTitle className=\"text-xl\">Internal Credentials</CardTitle>\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<CardContent className=\"flex w-full flex-row gap-4\">\n\t\t\t\t\t\t<div className=\"grid w-full md:grid-cols-2 gap-4 md:gap-8\">\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t<Label>User</Label>\n\t\t\t\t\t\t\t\t<Input disabled value=\"default\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t<Label>Password</Label>\n\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-4\">\n\t\t\t\t\t\t\t\t\t<ToggleVisibilityInput\n\t\t\t\t\t\t\t\t\t\tvalue={data?.databasePassword}\n\t\t\t\t\t\t\t\t\t\tdisabled\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t<Label>Internal Port (Container)</Label>\n\t\t\t\t\t\t\t\t<Input disabled value=\"6379\" />\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t<Label>Internal Host</Label>\n\t\t\t\t\t\t\t\t<Input disabled value={data?.appName} />\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2 md:col-span-2\">\n\t\t\t\t\t\t\t\t<Label>Internal Connection URL </Label>\n\t\t\t\t\t\t\t\t<ToggleVisibilityInput\n\t\t\t\t\t\t\t\t\tdisabled\n\t\t\t\t\t\t\t\t\tvalue={`redis://default:${data?.databasePassword}@${data?.appName}:6379`}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</CardContent>\n\t\t\t\t</Card>\n\t\t\t</div>\n\t\t</>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/redis/update-redis.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { PenBoxIcon } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { Textarea } from \"@/components/ui/textarea\";\nimport { api } from \"@/utils/api\";\n\nconst updateRedisSchema = z.object({\n\tname: z.string().min(1, {\n\t\tmessage: \"Name is required\",\n\t}),\n\tdescription: z.string().optional(),\n});\n\ntype UpdateRedis = z.infer<typeof updateRedisSchema>;\n\ninterface Props {\n\tredisId: string;\n}\n\nexport const UpdateRedis = ({ redisId }: Props) => {\n\tconst [isOpen, setIsOpen] = useState(false);\n\tconst utils = api.useUtils();\n\tconst { mutateAsync, error, isError, isPending } =\n\t\tapi.redis.update.useMutation();\n\tconst { data } = api.redis.one.useQuery(\n\t\t{\n\t\t\tredisId,\n\t\t},\n\t\t{\n\t\t\tenabled: !!redisId,\n\t\t},\n\t);\n\tconst form = useForm<UpdateRedis>({\n\t\tdefaultValues: {\n\t\t\tdescription: data?.description ?? \"\",\n\t\t\tname: data?.name ?? \"\",\n\t\t},\n\t\tresolver: zodResolver(updateRedisSchema),\n\t});\n\tuseEffect(() => {\n\t\tif (data) {\n\t\t\tform.reset({\n\t\t\t\tdescription: data.description ?? \"\",\n\t\t\t\tname: data.name,\n\t\t\t});\n\t\t}\n\t}, [data, form, form.reset]);\n\n\tconst onSubmit = async (formData: UpdateRedis) => {\n\t\tawait mutateAsync({\n\t\t\tname: formData.name,\n\t\t\tredisId: redisId,\n\t\t\tdescription: formData.description || \"\",\n\t\t})\n\t\t\t.then(() => {\n\t\t\t\ttoast.success(\"Redis updated successfully\");\n\t\t\t\tutils.redis.one.invalidate({\n\t\t\t\t\tredisId: redisId,\n\t\t\t\t});\n\t\t\t\tsetIsOpen(false);\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error updating Redis\");\n\t\t\t})\n\t\t\t.finally(() => {});\n\t};\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\tclassName=\"group hover:bg-blue-500/10 \"\n\t\t\t\t>\n\t\t\t\t\t<PenBoxIcon className=\"size-3.5  text-primary group-hover:text-blue-500\" />\n\t\t\t\t</Button>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-lg\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Modify Redis</DialogTitle>\n\t\t\t\t\t<DialogDescription>Update the redis data</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t{isError && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\n\t\t\t\t<div className=\"grid gap-4\">\n\t\t\t\t\t<div className=\"grid items-center gap-4\">\n\t\t\t\t\t\t<Form {...form}>\n\t\t\t\t\t\t\t<form\n\t\t\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\t\t\tid=\"hook-form-update-redis\"\n\t\t\t\t\t\t\t\tclassName=\"grid w-full gap-4 \"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"name\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Name</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"Vandelay Industries\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"description\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Description</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Textarea\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Description about your project...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"resize-none\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tisLoading={isPending}\n\t\t\t\t\t\t\t\t\t\tform=\"hook-form-update-redis\"\n\t\t\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tUpdate\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</DialogFooter>\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t</Form>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/requests/columns.tsx",
    "content": "import type { ColumnDef } from \"@tanstack/react-table\";\nimport { format } from \"date-fns\";\nimport { ArrowUpDown } from \"lucide-react\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport type { LogEntry } from \"./show-requests\";\n\nexport const getStatusColor = (status: number) => {\n\tif (status === 0) {\n\t\treturn \"secondary\";\n\t}\n\tif (status >= 100 && status < 200) {\n\t\treturn \"outline\";\n\t}\n\tif (status >= 200 && status < 300) {\n\t\treturn \"default\";\n\t}\n\tif (status >= 300 && status < 400) {\n\t\treturn \"outline\";\n\t}\n\tif (status >= 400 && status < 500) {\n\t\treturn \"destructive\";\n\t}\n\treturn \"destructive\";\n};\n\nconst formatStatusLabel = (status: number) => {\n\tif (status === 0) {\n\t\treturn \"N/A\";\n\t}\n\treturn status;\n};\n\nconst formatDuration = (nanos: number) => {\n\tconst ms = nanos / 1000000;\n\tif (ms < 1) {\n\t\treturn `${(nanos / 1000).toFixed(2)} µs`;\n\t}\n\tif (ms < 1000) {\n\t\treturn `${ms.toFixed(2)} ms`;\n\t}\n\treturn `${(ms / 1000).toFixed(2)} s`;\n};\n\nexport const columns: ColumnDef<LogEntry>[] = [\n\t{\n\t\taccessorKey: \"level\",\n\t\theader: () => {\n\t\t\treturn <Button variant=\"ghost\">Level</Button>;\n\t\t},\n\t\tcell: ({ row }) => {\n\t\t\treturn <div>{row.original.level}</div>;\n\t\t},\n\t},\n\t{\n\t\taccessorKey: \"RequestPath\",\n\t\theader: ({ column }) => {\n\t\t\treturn (\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\tonClick={() => column.toggleSorting(column.getIsSorted() === \"asc\")}\n\t\t\t\t>\n\t\t\t\t\tMessage\n\t\t\t\t\t<ArrowUpDown className=\"ml-2 h-4 w-4\" />\n\t\t\t\t</Button>\n\t\t\t);\n\t\t},\n\t\tcell: ({ row }) => {\n\t\t\tconst log = row.original;\n\t\t\treturn (\n\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t<div className=\"flex items-center flex-row gap-3 \">\n\t\t\t\t\t\t{log.RequestMethod}{\" \"}\n\t\t\t\t\t\t<div className=\"inline-flex items-center gap-2 bg-muted px-1.5 py-1 rounded-lg\">\n\t\t\t\t\t\t\t<span>{log.RequestAddr}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{log.RequestPath.length > 100\n\t\t\t\t\t\t\t? `${log.RequestPath.slice(0, 82)}...`\n\t\t\t\t\t\t\t: log.RequestPath}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"flex flex-row gap-3 w-full\">\n\t\t\t\t\t\t<Badge variant={getStatusColor(log.OriginStatus)}>\n\t\t\t\t\t\t\tStatus: {formatStatusLabel(log.OriginStatus)}\n\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t<Badge variant={\"secondary\"}>\n\t\t\t\t\t\t\tExec Time: {formatDuration(log.Duration)}\n\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t<Badge variant={\"secondary\"}>IP: {log.ClientAddr}</Badge>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t);\n\t\t},\n\t},\n\t{\n\t\taccessorKey: \"time\",\n\t\theader: ({ column }) => {\n\t\t\treturn (\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\tonClick={() => column.toggleSorting(column.getIsSorted() === \"asc\")}\n\t\t\t\t>\n\t\t\t\t\tTime\n\t\t\t\t\t<ArrowUpDown className=\"ml-2 h-4 w-4\" />\n\t\t\t\t</Button>\n\t\t\t);\n\t\t},\n\t\tcell: ({ row }) => {\n\t\t\tconst log = row.original;\n\t\t\treturn (\n\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t<div className=\"flex flex-row gap-3 w-full\">\n\t\t\t\t\t\t{format(new Date(log.StartUTC), \"yyyy-MM-dd HH:mm:ss\")}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t);\n\t\t},\n\t},\n];\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/requests/request-distribution-chart.tsx",
    "content": "import {\n\tArea,\n\tAreaChart,\n\tCartesianGrid,\n\tResponsiveContainer,\n\tXAxis,\n\tYAxis,\n} from \"recharts\";\nimport {\n\ttype ChartConfig,\n\tChartContainer,\n\tChartTooltip,\n\tChartTooltipContent,\n} from \"@/components/ui/chart\";\nimport { api } from \"@/utils/api\";\n\nexport interface RequestDistributionChartProps {\n\tdateRange?: {\n\t\tfrom: Date | undefined;\n\t\tto: Date | undefined;\n\t};\n}\n\nconst chartConfig = {\n\tviews: {\n\t\tlabel: \"Page Views\",\n\t},\n\tcount: {\n\t\tlabel: \"Count\",\n\t\tcolor: \"hsl(var(--chart-1))\",\n\t},\n} satisfies ChartConfig;\n\nexport const RequestDistributionChart = ({\n\tdateRange,\n}: RequestDistributionChartProps) => {\n\tconst { data: stats } = api.settings.readStats.useQuery(\n\t\t{\n\t\t\tdateRange: dateRange\n\t\t\t\t? {\n\t\t\t\t\t\tstart: dateRange.from?.toISOString(),\n\t\t\t\t\t\tend: dateRange.to?.toISOString(),\n\t\t\t\t\t}\n\t\t\t\t: undefined,\n\t\t},\n\t\t{\n\t\t\trefetchInterval: 1333,\n\t\t},\n\t);\n\n\treturn (\n\t\t<div className=\"w-full h-[200px] overflow-hidden\">\n\t\t\t<ResponsiveContainer\n\t\t\t\twidth=\"100%\"\n\t\t\t\theight=\"100%\"\n\t\t\t\tclassName=\"overflow-hidden\"\n\t\t\t>\n\t\t\t\t<ChartContainer config={chartConfig}>\n\t\t\t\t\t<AreaChart\n\t\t\t\t\t\taccessibilityLayer\n\t\t\t\t\t\tdata={stats || []}\n\t\t\t\t\t\tmargin={{\n\t\t\t\t\t\t\ttop: 10,\n\t\t\t\t\t\t\tleft: 12,\n\t\t\t\t\t\t\tright: 12,\n\t\t\t\t\t\t\tbottom: 0,\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<CartesianGrid vertical={false} />\n\t\t\t\t\t\t<XAxis\n\t\t\t\t\t\t\tdataKey=\"hour\"\n\t\t\t\t\t\t\ttickLine={false}\n\t\t\t\t\t\t\taxisLine={false}\n\t\t\t\t\t\t\ttickMargin={8}\n\t\t\t\t\t\t\ttickFormatter={(value) =>\n\t\t\t\t\t\t\t\tnew Date(value).toLocaleTimeString([], {\n\t\t\t\t\t\t\t\t\thour: \"2-digit\",\n\t\t\t\t\t\t\t\t\tminute: \"2-digit\",\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<YAxis\n\t\t\t\t\t\t\ttickLine={false}\n\t\t\t\t\t\t\taxisLine={false}\n\t\t\t\t\t\t\ttickMargin={8}\n\t\t\t\t\t\t\tallowDataOverflow={false}\n\t\t\t\t\t\t\tdomain={[0, \"auto\"]}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ChartTooltip\n\t\t\t\t\t\t\tcursor={false}\n\t\t\t\t\t\t\tcontent={<ChartTooltipContent indicator=\"line\" />}\n\t\t\t\t\t\t\tlabelFormatter={(value) =>\n\t\t\t\t\t\t\t\tnew Date(value).toLocaleString([], {\n\t\t\t\t\t\t\t\t\tmonth: \"short\",\n\t\t\t\t\t\t\t\t\tday: \"numeric\",\n\t\t\t\t\t\t\t\t\thour: \"2-digit\",\n\t\t\t\t\t\t\t\t\tminute: \"2-digit\",\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Area\n\t\t\t\t\t\t\tdataKey=\"count\"\n\t\t\t\t\t\t\ttype=\"monotone\"\n\t\t\t\t\t\t\tfill=\"hsl(var(--chart-1))\"\n\t\t\t\t\t\t\tfillOpacity={0.4}\n\t\t\t\t\t\t\tstroke=\"hsl(var(--chart-1))\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</AreaChart>\n\t\t\t\t</ChartContainer>\n\t\t\t</ResponsiveContainer>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/requests/requests-table.tsx",
    "content": "import {\n\ttype ColumnFiltersState,\n\tflexRender,\n\tgetCoreRowModel,\n\tgetFilteredRowModel,\n\tgetSortedRowModel,\n\ttype PaginationState,\n\ttype SortingState,\n\tuseReactTable,\n\ttype VisibilityState,\n} from \"@tanstack/react-table\";\nimport copy from \"copy-to-clipboard\";\nimport {\n\tCheckCircle2Icon,\n\tChevronDown,\n\tCopy,\n\tDownload,\n\tGlobe,\n\tInfoIcon,\n\tServer,\n\tTrendingUpIcon,\n} from \"lucide-react\";\nimport { useMemo, useState } from \"react\";\nimport { toast } from \"sonner\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDropdownMenu,\n\tDropdownMenuCheckboxItem,\n\tDropdownMenuContent,\n\tDropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\nimport { Input } from \"@/components/ui/input\";\nimport { ScrollArea } from \"@/components/ui/scroll-area\";\nimport {\n\tSheet,\n\tSheetContent,\n\tSheetDescription,\n\tSheetHeader,\n\tSheetTitle,\n} from \"@/components/ui/sheet\";\nimport {\n\tTable,\n\tTableBody,\n\tTableCell,\n\tTableHead,\n\tTableHeader,\n\tTableRow,\n} from \"@/components/ui/table\";\nimport { api } from \"@/utils/api\";\nimport { columns, getStatusColor } from \"./columns\";\nimport type { LogEntry } from \"./show-requests\";\nimport { DataTableFacetedFilter } from \"./status-request-filter\";\n\nexport const priorities = [\n\t{\n\t\tlabel: \"100 - 199\",\n\t\tvalue: \"info\",\n\t\ticon: InfoIcon,\n\t},\n\t{\n\t\tlabel: \"200 - 299\",\n\t\tvalue: \"success\",\n\t\ticon: CheckCircle2Icon,\n\t},\n\t{\n\t\tlabel: \"300 - 399\",\n\t\tvalue: \"redirect\",\n\t\ticon: TrendingUpIcon,\n\t},\n\t{\n\t\tlabel: \"400 - 499\",\n\t\tvalue: \"client\",\n\t\ticon: Globe,\n\t},\n\t{\n\t\tlabel: \"500 - 599\",\n\t\tvalue: \"server\",\n\t\ticon: Server,\n\t},\n];\n\nexport interface RequestsTableProps {\n\tdateRange?: {\n\t\tfrom: Date | undefined;\n\t\tto: Date | undefined;\n\t};\n}\n\nexport const RequestsTable = ({ dateRange }: RequestsTableProps) => {\n\tconst [statusFilter, setStatusFilter] = useState<string[]>([]);\n\tconst [search, setSearch] = useState(\"\");\n\tconst [selectedRow, setSelectedRow] = useState<LogEntry>();\n\tconst [sorting, setSorting] = useState<SortingState>([]);\n\tconst [columnVisibility, setColumnVisibility] = useState<VisibilityState>({});\n\tconst [rowSelection, setRowSelection] = useState({});\n\tconst [columnFilters, setColumnFilters] = useState<ColumnFiltersState>([]);\n\tconst [pagination, setPagination] = useState<PaginationState>({\n\t\tpageIndex: 0,\n\t\tpageSize: 10,\n\t});\n\n\tconst { data: statsLogs } = api.settings.readStatsLogs.useQuery(\n\t\t{\n\t\t\tsort: sorting[0],\n\t\t\tpage: pagination,\n\t\t\tsearch,\n\t\t\tstatus: statusFilter,\n\t\t\tdateRange: dateRange\n\t\t\t\t? {\n\t\t\t\t\t\tstart: dateRange.from?.toISOString(),\n\t\t\t\t\t\tend: dateRange.to?.toISOString(),\n\t\t\t\t\t}\n\t\t\t\t: undefined,\n\t\t},\n\t\t{\n\t\t\trefetchInterval: 1333,\n\t\t},\n\t);\n\n\tconst pageCount = useMemo(() => {\n\t\tif (statsLogs?.totalCount) {\n\t\t\treturn Math.ceil(statsLogs.totalCount / pagination.pageSize);\n\t\t}\n\t\treturn -1;\n\t}, [statsLogs?.totalCount, pagination.pageSize]);\n\n\tconst table = useReactTable({\n\t\tdata: statsLogs?.data ?? [],\n\t\tcolumns,\n\t\tonPaginationChange: setPagination,\n\t\tonSortingChange: setSorting,\n\t\tpageCount: pageCount,\n\t\tonColumnFiltersChange: setColumnFilters,\n\t\tgetCoreRowModel: getCoreRowModel(),\n\t\tgetSortedRowModel: getSortedRowModel(),\n\t\tgetFilteredRowModel: getFilteredRowModel(),\n\t\tonColumnVisibilityChange: setColumnVisibility,\n\t\tonRowSelectionChange: setRowSelection,\n\t\tmanualPagination: true,\n\t\tstate: {\n\t\t\tpagination,\n\t\t\tsorting,\n\t\t\tcolumnFilters,\n\t\t\tcolumnVisibility,\n\t\t\trowSelection,\n\t\t},\n\t});\n\n\tconst formatValue = (key: string, value: any) => {\n\t\tif (typeof value === \"object\" && value !== null) {\n\t\t\treturn JSON.stringify(value, null, 2);\n\t\t}\n\t\tif (key === \"Duration\" || key === \"OriginDuration\" || key === \"Overhead\") {\n\t\t\tconst nanos = Number(value);\n\t\t\tconst ms = nanos / 1000000;\n\t\t\tif (ms < 1) {\n\t\t\t\treturn `${(nanos / 1000).toFixed(2)} µs`;\n\t\t\t}\n\t\t\tif (ms < 1000) {\n\t\t\t\treturn `${ms.toFixed(2)} ms`;\n\t\t\t}\n\t\t\treturn `${(ms / 1000).toFixed(2)} s`;\n\t\t}\n\t\tif (key === \"level\") {\n\t\t\treturn <Badge variant=\"secondary\">{value}</Badge>;\n\t\t}\n\t\tif (key === \"RequestMethod\") {\n\t\t\treturn <Badge variant=\"outline\">{value}</Badge>;\n\t\t}\n\t\tif (key === \"DownstreamStatus\" || key === \"OriginStatus\") {\n\t\t\tconst num = Number(value);\n\t\t\tif (num === 0) {\n\t\t\t\treturn <Badge variant=\"secondary\">N/A</Badge>;\n\t\t\t}\n\t\t\treturn <Badge variant={getStatusColor(num)}>{value}</Badge>;\n\t\t}\n\t\treturn value;\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<div className=\"flex flex-col gap-6 w-full \">\n\t\t\t\t<div className=\"mt-6 grid gap-4 pb-20 w-full\">\n\t\t\t\t\t<div className=\"flex flex-col gap-4  w-full overflow-auto\">\n\t\t\t\t\t\t<div className=\"flex items-center gap-2 max-sm:flex-wrap\">\n\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\tplaceholder=\"Filter by name...\"\n\t\t\t\t\t\t\t\tvalue={search}\n\t\t\t\t\t\t\t\tonChange={(event) => setSearch(event.target.value)}\n\t\t\t\t\t\t\t\tclassName=\"md:max-w-sm\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<DataTableFacetedFilter\n\t\t\t\t\t\t\t\tvalue={statusFilter}\n\t\t\t\t\t\t\t\tsetValue={setStatusFilter}\n\t\t\t\t\t\t\t\ttitle=\"Status\"\n\t\t\t\t\t\t\t\toptions={priorities}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<DropdownMenu>\n\t\t\t\t\t\t\t\t<DropdownMenuTrigger asChild>\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"sm:ml-auto max-sm:w-full\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tColumns <ChevronDown className=\"ml-2 h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</DropdownMenuTrigger>\n\t\t\t\t\t\t\t\t<DropdownMenuContent align=\"end\">\n\t\t\t\t\t\t\t\t\t{table\n\t\t\t\t\t\t\t\t\t\t.getAllColumns()\n\t\t\t\t\t\t\t\t\t\t.filter((column) => column.getCanHide())\n\t\t\t\t\t\t\t\t\t\t.map((column) => {\n\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t<DropdownMenuCheckboxItem\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={column.id}\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"capitalize\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tchecked={column.getIsVisible()}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={(value) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolumn.toggleVisibility(!!value)\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{column.id}\n\t\t\t\t\t\t\t\t\t\t\t\t</DropdownMenuCheckboxItem>\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t</DropdownMenuContent>\n\t\t\t\t\t\t\t</DropdownMenu>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"rounded-md border \">\n\t\t\t\t\t\t\t<Table>\n\t\t\t\t\t\t\t\t<TableHeader>\n\t\t\t\t\t\t\t\t\t{table.getHeaderGroups().map((headerGroup) => (\n\t\t\t\t\t\t\t\t\t\t<TableRow key={headerGroup.id}>\n\t\t\t\t\t\t\t\t\t\t\t{headerGroup.headers.map((header) => {\n\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TableHead key={header.id}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{header.isPlaceholder\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? null\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: flexRender(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\theader.column.columnDef.header,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\theader.getContext(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TableHead>\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t</TableHeader>\n\t\t\t\t\t\t\t\t<TableBody>\n\t\t\t\t\t\t\t\t\t{table.getRowModel().rows?.length ? (\n\t\t\t\t\t\t\t\t\t\ttable.getRowModel().rows.map((row) => (\n\t\t\t\t\t\t\t\t\t\t\t<TableRow\n\t\t\t\t\t\t\t\t\t\t\t\tkey={row.id}\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"cursor-pointer\"\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetSelectedRow(row.original);\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\tdata-state={row.getIsSelected() && \"selected\"}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{row.getVisibleCells().map((cell) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TableCell key={cell.id}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{flexRender(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcell.column.columnDef.cell,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcell.getContext(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t\t\t\t\t))\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t<TableRow>\n\t\t\t\t\t\t\t\t\t\t\t<TableCell\n\t\t\t\t\t\t\t\t\t\t\t\tcolSpan={columns.length}\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-24 text-center\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{statsLogs?.data.length === 0 && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"w-full flex-col gap-2 flex items-center justify-center h-[55vh]\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground text-lg font-medium\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tNo results.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</TableBody>\n\t\t\t\t\t\t\t</Table>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"flex items-center justify-end space-x-2 py-4\">\n\t\t\t\t\t\t\t{statsLogs?.totalCount && (\n\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground text-sm\">\n\t\t\t\t\t\t\t\t\tShowing{\" \"}\n\t\t\t\t\t\t\t\t\t{Math.min(\n\t\t\t\t\t\t\t\t\t\tpagination.pageIndex * pagination.pageSize + 1,\n\t\t\t\t\t\t\t\t\t\tstatsLogs.totalCount,\n\t\t\t\t\t\t\t\t\t)}{\" \"}\n\t\t\t\t\t\t\t\t\tto{\" \"}\n\t\t\t\t\t\t\t\t\t{Math.min(\n\t\t\t\t\t\t\t\t\t\t(pagination.pageIndex + 1) * pagination.pageSize,\n\t\t\t\t\t\t\t\t\t\tstatsLogs.totalCount,\n\t\t\t\t\t\t\t\t\t)}{\" \"}\n\t\t\t\t\t\t\t\t\tof {statsLogs.totalCount} entries\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<div className=\"space-x-2 flex flex-wrap\">\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\tonClick={() => table.previousPage()}\n\t\t\t\t\t\t\t\t\tdisabled={!table.getCanPreviousPage()}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tPrevious\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\tonClick={() => table.nextPage()}\n\t\t\t\t\t\t\t\t\tdisabled={!table.getCanNextPage()}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tNext\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<Sheet\n\t\t\t\topen={!!selectedRow}\n\t\t\t\tonOpenChange={(_open) => setSelectedRow(undefined)}\n\t\t\t>\n\t\t\t\t<SheetContent className=\"sm:max-w-[740px]  flex flex-col\">\n\t\t\t\t\t<SheetHeader>\n\t\t\t\t\t\t<SheetTitle>Request log</SheetTitle>\n\t\t\t\t\t\t<SheetDescription>\n\t\t\t\t\t\t\tDetails of the request log entry.\n\t\t\t\t\t\t</SheetDescription>\n\t\t\t\t\t</SheetHeader>\n\t\t\t\t\t<ScrollArea className=\"flex-grow mt-4 pr-4\">\n\t\t\t\t\t\t<div className=\"border rounded-md\">\n\t\t\t\t\t\t\t<Table>\n\t\t\t\t\t\t\t\t<TableBody>\n\t\t\t\t\t\t\t\t\t{Object.entries(selectedRow || {}).map(([key, value]) => (\n\t\t\t\t\t\t\t\t\t\t<TableRow key={key}>\n\t\t\t\t\t\t\t\t\t\t\t<TableCell className=\"font-medium\">{key}</TableCell>\n\t\t\t\t\t\t\t\t\t\t\t<TableCell className=\"truncate break-words break-before-all whitespace-pre-wrap\">\n\t\t\t\t\t\t\t\t\t\t\t\t{key === \"RequestAddr\" ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2 bg-muted p-1 rounded\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>{value}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Copy\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcopy(value);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Copied to clipboard\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-4 w-4 text-muted-foreground cursor-pointer\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\tformatValue(key, value)\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t</TableBody>\n\t\t\t\t\t\t\t</Table>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</ScrollArea>\n\t\t\t\t\t<div className=\"mt-4 pt-4 border-t\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\tclassName=\"w-full gap-2\"\n\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\tconst logs = JSON.stringify(selectedRow, null, 2);\n\t\t\t\t\t\t\t\tconst element = document.createElement(\"a\");\n\t\t\t\t\t\t\t\telement.setAttribute(\n\t\t\t\t\t\t\t\t\t\"href\",\n\t\t\t\t\t\t\t\t\t`data:text/plain;charset=utf-8,${encodeURIComponent(logs)}`,\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\telement.setAttribute(\"download\", \"logs.json\");\n\n\t\t\t\t\t\t\t\telement.style.display = \"none\";\n\t\t\t\t\t\t\t\tdocument.body.appendChild(element);\n\n\t\t\t\t\t\t\t\telement.click();\n\n\t\t\t\t\t\t\t\tdocument.body.removeChild(element);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Download className=\"h-4 w-4\" />\n\t\t\t\t\t\t\tDownload as JSON\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\t\t\t\t</SheetContent>\n\t\t\t</Sheet>\n\t\t</>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/requests/show-requests.tsx",
    "content": "import { format } from \"date-fns\";\nimport {\n\tAlertCircle,\n\tArrowDownUp,\n\tCalendar as CalendarIcon,\n\tInfoIcon,\n} from \"lucide-react\";\nimport Link from \"next/link\";\nimport { useEffect, useState } from \"react\";\nimport { toast } from \"sonner\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { DialogAction } from \"@/components/shared/dialog-action\";\nimport { Button } from \"@/components/ui/button\";\nimport { Calendar } from \"@/components/ui/calendar\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport { Input } from \"@/components/ui/input\";\nimport { Label } from \"@/components/ui/label\";\nimport {\n\tPopover,\n\tPopoverContent,\n\tPopoverTrigger,\n} from \"@/components/ui/popover\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { api, type RouterOutputs } from \"@/utils/api\";\nimport { RequestDistributionChart } from \"./request-distribution-chart\";\nimport { RequestsTable } from \"./requests-table\";\n\nexport type LogEntry = NonNullable<\n\tRouterOutputs[\"settings\"][\"readStatsLogs\"][\"data\"]\n>[0];\n\nexport const ShowRequests = () => {\n\tconst { data: isActive, refetch } =\n\t\tapi.settings.haveActivateRequests.useQuery();\n\tconst { mutateAsync: toggleRequests } =\n\t\tapi.settings.toggleRequests.useMutation();\n\n\tconst { data: logCleanupStatus } =\n\t\tapi.settings.getLogCleanupStatus.useQuery();\n\tconst { mutateAsync: updateLogCleanup } =\n\t\tapi.settings.updateLogCleanup.useMutation();\n\tconst [cronExpression, setCronExpression] = useState<string | null>(null);\n\n\t// Set default date range to last 3 days\n\tconst getDefaultDateRange = () => {\n\t\tconst to = new Date();\n\t\tconst from = new Date();\n\t\tfrom.setDate(from.getDate() - 3);\n\t\treturn { from, to };\n\t};\n\n\tconst [dateRange, setDateRange] = useState<{\n\t\tfrom: Date | undefined;\n\t\tto: Date | undefined;\n\t}>(getDefaultDateRange());\n\n\t// Check if logs exist to determine if traefik has been reloaded\n\t// Only fetch when active to minimize network calls\n\tconst { data: statsLogsCheck } = api.settings.readStatsLogs.useQuery(\n\t\t{\n\t\t\tpage: {\n\t\t\t\tpageIndex: 0,\n\t\t\t\tpageSize: 1,\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tenabled: !!isActive,\n\t\t\trefetchInterval: 5000, // Check every 5 seconds when active\n\t\t},\n\t);\n\n\t// Determine if warning should be shown\n\t// Show warning only if active but no logs exist yet\n\tconst shouldShowWarning = isActive && (statsLogsCheck?.totalCount ?? 0) === 0;\n\n\tuseEffect(() => {\n\t\tif (logCleanupStatus) {\n\t\t\tsetCronExpression(logCleanupStatus.cronExpression || \"0 0 * * *\");\n\t\t}\n\t}, [logCleanupStatus]);\n\n\treturn (\n\t\t<>\n\t\t\t<div className=\"w-full\">\n\t\t\t\t<Card className=\"h-full bg-sidebar  p-2.5 rounded-xl  max-w-8xl mx-auto\">\n\t\t\t\t\t<div className=\"rounded-xl bg-background shadow-md \">\n\t\t\t\t\t\t<CardHeader className=\"\">\n\t\t\t\t\t\t\t<CardTitle className=\"text-xl flex flex-row gap-2\">\n\t\t\t\t\t\t\t\t<ArrowDownUp className=\"size-6 text-muted-foreground self-center\" />\n\t\t\t\t\t\t\t\tRequests\n\t\t\t\t\t\t\t</CardTitle>\n\t\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\t\tSee all the incoming requests that pass trough Traefik\n\t\t\t\t\t\t\t</CardDescription>\n\n\t\t\t\t\t\t\t{shouldShowWarning && (\n\t\t\t\t\t\t\t\t<AlertBlock type=\"warning\">\n\t\t\t\t\t\t\t\t\tWhen you activate, you need to reload traefik to apply the\n\t\t\t\t\t\t\t\t\tchanges, you can reload traefik in{\" \"}\n\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\thref=\"/dashboard/settings/server\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"text-primary\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tSettings\n\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t<CardContent className=\"space-y-2 py-8 border-t\">\n\t\t\t\t\t\t\t<div className=\"flex w-full gap-4 justify-end items-center\">\n\t\t\t\t\t\t\t\t<div className=\"flex-1 flex items-center gap-4\">\n\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t<Label htmlFor=\"cron\" className=\"min-w-32\">\n\t\t\t\t\t\t\t\t\t\t\tLog Cleanup Schedule\n\t\t\t\t\t\t\t\t\t\t</Label>\n\t\t\t\t\t\t\t\t\t\t<TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<InfoIcon className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"max-w-80\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tAt the scheduled time, the cleanup job will keep\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonly the last 1000 entries in the access log file\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tand signal Traefik to reopen its log files. The\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdefault schedule is daily at midnight (0 0 * * *).\n\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div className=\"flex-1 flex gap-4\">\n\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\tid=\"cron\"\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"0 0 * * *\"\n\t\t\t\t\t\t\t\t\t\t\tvalue={cronExpression || \"\"}\n\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => setCronExpression(e.target.value)}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"max-w-60\"\n\t\t\t\t\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\tif (!cronExpression?.trim()) {\n\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Please enter a valid cron expression\");\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\tawait updateLogCleanup({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcronExpression: cronExpression,\n\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Log cleanup schedule updated\");\n\t\t\t\t\t\t\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t`Failed to update log cleanup schedule: ${error instanceof Error ? error.message : \"Unknown error\"}`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\tUpdate Schedule\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\ttitle={isActive ? \"Deactivate Requests\" : \"Activate Requests\"}\n\t\t\t\t\t\t\t\t\tdescription=\"You will also need to restart Traefik to apply the changes\"\n\t\t\t\t\t\t\t\t\ttype={isActive ? \"destructive\" : \"default\"}\n\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\tawait toggleRequests({ enable: !isActive })\n\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\n\t\t\t\t\t\t\t\t\t\t\t\t\t`Requests ${isActive ? \"deactivated\" : \"activated\"}`,\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t.catch((err) => {\n\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(err.message);\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Button>{isActive ? \"Deactivate\" : \"Activate\"}</Button>\n\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t{isActive ? (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<div className=\"flex justify-end mb-4 gap-2\">\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={() => setDateRange(getDefaultDateRange())}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"px-3\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\tReset to Last 3 Days\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t<Popover>\n\t\t\t\t\t\t\t\t\t\t\t<PopoverTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-[300px] justify-start text-left font-normal\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CalendarIcon className=\"mr-2 h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t{dateRange.from ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdateRange.to ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{format(dateRange.from, \"LLL dd, y\")} -{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{format(dateRange.to, \"LLL dd, y\")}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tformat(dateRange.from, \"LLL dd, y\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>Pick a date range</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t</PopoverTrigger>\n\t\t\t\t\t\t\t\t\t\t\t<PopoverContent className=\"w-auto p-0\" align=\"end\">\n\t\t\t\t\t\t\t\t\t\t\t\t<Calendar\n\t\t\t\t\t\t\t\t\t\t\t\t\tinitialFocus\n\t\t\t\t\t\t\t\t\t\t\t\t\tmode=\"range\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tdefaultMonth={dateRange.from}\n\t\t\t\t\t\t\t\t\t\t\t\t\tselected={{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfrom: dateRange.from,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tto: dateRange.to,\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonSelect={(range) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetDateRange({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfrom: range?.from,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tto: range?.to,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\tnumberOfMonths={2}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</PopoverContent>\n\t\t\t\t\t\t\t\t\t\t</Popover>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<RequestDistributionChart dateRange={dateRange} />\n\t\t\t\t\t\t\t\t\t<RequestsTable dateRange={dateRange} />\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<div className=\"flex flex-col items-center justify-center py-12 gap-4 text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t<AlertCircle className=\"size-12 text-muted-foreground/50\" />\n\t\t\t\t\t\t\t\t\t<div className=\"text-center space-y-2\">\n\t\t\t\t\t\t\t\t\t\t<h3 className=\"text-lg font-medium\">\n\t\t\t\t\t\t\t\t\t\t\tRequests are not activated\n\t\t\t\t\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t\t\t\t\t<p className=\"text-sm max-w-md\">\n\t\t\t\t\t\t\t\t\t\t\tActivate requests to see incoming traffic statistics and\n\t\t\t\t\t\t\t\t\t\t\tmonitor your application's usage. After activation, you'll\n\t\t\t\t\t\t\t\t\t\t\tneed to reload Traefik for the changes to take effect.\n\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t</div>\n\t\t\t\t</Card>\n\t\t\t</div>\n\t\t</>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/requests/status-request-filter.tsx",
    "content": "import { CheckIcon, PlusCircle } from \"lucide-react\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCommand,\n\tCommandEmpty,\n\tCommandGroup,\n\tCommandInput,\n\tCommandItem,\n\tCommandList,\n\tCommandSeparator,\n} from \"@/components/ui/command\";\nimport {\n\tPopover,\n\tPopoverContent,\n\tPopoverTrigger,\n} from \"@/components/ui/popover\";\nimport { Separator } from \"@/components/ui/separator\";\nimport { cn } from \"@/lib/utils\";\n\ninterface DataTableFacetedFilterProps {\n\tvalue?: string[];\n\tsetValue?: (value: string[]) => void;\n\ttitle?: string;\n\toptions: {\n\t\tlabel: string;\n\t\tvalue: string;\n\t\ticon?: React.ComponentType<{ className?: string }>;\n\t}[];\n}\n\nexport function DataTableFacetedFilter({\n\tvalue = [],\n\tsetValue,\n\ttitle,\n\toptions,\n}: DataTableFacetedFilterProps) {\n\tconst selectedValues = new Set(value as string[]);\n\n\treturn (\n\t\t<Popover>\n\t\t\t<PopoverTrigger asChild>\n\t\t\t\t<Button variant=\"outline\" size=\"sm\" className=\"h-8 border-dashed\">\n\t\t\t\t\t<PlusCircle className=\"mr-2 h-4 w-4\" />\n\t\t\t\t\t{title}\n\t\t\t\t\t{selectedValues?.size > 0 && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<Separator orientation=\"vertical\" className=\"mx-2 h-4\" />\n\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\tclassName=\"rounded-sm px-1 font-normal lg:hidden\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{selectedValues.size}\n\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t<div className=\"hidden space-x-1 lg:flex\">\n\t\t\t\t\t\t\t\t{selectedValues.size > 2 ? (\n\t\t\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"rounded-sm px-1 font-normal\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{selectedValues.size} selected\n\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\toptions\n\t\t\t\t\t\t\t\t\t\t.filter((option) => selectedValues.has(option.value))\n\t\t\t\t\t\t\t\t\t\t.map((option) => (\n\t\t\t\t\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\tkey={option.value}\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"rounded-sm px-1 font-normal\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{option.label}\n\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t))\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</>\n\t\t\t\t\t)}\n\t\t\t\t</Button>\n\t\t\t</PopoverTrigger>\n\t\t\t<PopoverContent className=\"w-[200px] p-0\" align=\"start\">\n\t\t\t\t<Command>\n\t\t\t\t\t<CommandInput placeholder={title} />\n\t\t\t\t\t<CommandList>\n\t\t\t\t\t\t<CommandEmpty>No results found.</CommandEmpty>\n\t\t\t\t\t\t<CommandGroup>\n\t\t\t\t\t\t\t{options.map((option) => {\n\t\t\t\t\t\t\t\tconst isSelected = selectedValues.has(option.value);\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\tkey={option.value}\n\t\t\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\t\t\tif (isSelected) {\n\t\t\t\t\t\t\t\t\t\t\t\tselectedValues.delete(option.value);\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tselectedValues.add(option.value);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tconst filterValues = Array.from(selectedValues);\n\t\t\t\t\t\t\t\t\t\t\tsetValue?.(filterValues.length ? filterValues : []);\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\"mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary\",\n\t\t\t\t\t\t\t\t\t\t\t\tisSelected\n\t\t\t\t\t\t\t\t\t\t\t\t\t? \"bg-primary text-primary-foreground\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t: \"opacity-50 [&_svg]:invisible\",\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<CheckIcon className={cn(\"h-4 w-4\")} />\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t{option.icon && (\n\t\t\t\t\t\t\t\t\t\t\t<option.icon className=\"mr-2 h-4 w-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t<span>{option.label}</span>\n\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t\t{selectedValues.size > 0 && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<CommandSeparator />\n\t\t\t\t\t\t\t\t<CommandGroup>\n\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\tonSelect={() => setValue?.([])}\n\t\t\t\t\t\t\t\t\t\tclassName=\"justify-center text-center\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tClear filters\n\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</CommandList>\n\t\t\t\t</Command>\n\t\t\t</PopoverContent>\n\t\t</Popover>\n\t);\n}\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/search-command.tsx",
    "content": "\"use client\";\n\nimport { BookIcon, CircuitBoard, GlobeIcon } from \"lucide-react\";\nimport { useRouter } from \"next/router\";\nimport React from \"react\";\nimport {\n\textractServices,\n\ttype Services,\n} from \"@/components/dashboard/settings/users/add-permissions\";\nimport {\n\tMariadbIcon,\n\tMongodbIcon,\n\tMysqlIcon,\n\tPostgresqlIcon,\n\tRedisIcon,\n} from \"@/components/icons/data-tools-icons\";\nimport {\n\tCommandDialog,\n\tCommandEmpty,\n\tCommandGroup,\n\tCommandInput,\n\tCommandItem,\n\tCommandList,\n\tCommandSeparator,\n} from \"@/components/ui/command\";\nimport { api } from \"@/utils/api\";\nimport { StatusTooltip } from \"../shared/status-tooltip\";\n\n// Extended Services type to include environmentId and environmentName for search navigation\ntype SearchServices = Services & {\n\tenvironmentId: string;\n\tenvironmentName: string;\n};\n\nconst extractAllServicesFromProject = (project: any): SearchServices[] => {\n\tconst allServices: SearchServices[] = [];\n\n\t// Iterate through all environments in the project\n\tproject.environments?.forEach((environment: any) => {\n\t\tconst environmentServices = extractServices(environment);\n\t\tconst servicesWithEnvironmentId: SearchServices[] = environmentServices.map(\n\t\t\t(service) => ({\n\t\t\t\t...service,\n\t\t\t\tenvironmentId: environment.environmentId,\n\t\t\t\tenvironmentName: environment.name,\n\t\t\t}),\n\t\t);\n\t\tallServices.push(...servicesWithEnvironmentId);\n\t});\n\n\treturn allServices;\n};\n\nexport const SearchCommand = () => {\n\tconst router = useRouter();\n\tconst [open, setOpen] = React.useState(false);\n\tconst [search, setSearch] = React.useState(\"\");\n\tconst { data: session } = api.user.session.useQuery();\n\tconst { data } = api.project.all.useQuery(undefined, {\n\t\tenabled: !!session,\n\t});\n\tconst { data: isCloud } = api.settings.isCloud.useQuery();\n\n\tReact.useEffect(() => {\n\t\tconst down = (e: KeyboardEvent) => {\n\t\t\tif (e.key === \"j\" && (e.metaKey || e.ctrlKey)) {\n\t\t\t\te.preventDefault();\n\t\t\t\tsetOpen((open) => !open);\n\t\t\t}\n\t\t};\n\n\t\tdocument.addEventListener(\"keydown\", down);\n\t\treturn () => document.removeEventListener(\"keydown\", down);\n\t}, []);\n\n\treturn (\n\t\t<div>\n\t\t\t<CommandDialog open={open} onOpenChange={setOpen}>\n\t\t\t\t<CommandInput\n\t\t\t\t\tplaceholder={\"Search projects or settings\"}\n\t\t\t\t\tvalue={search}\n\t\t\t\t\tonValueChange={setSearch}\n\t\t\t\t/>\n\t\t\t\t<CommandList>\n\t\t\t\t\t<CommandEmpty>\n\t\t\t\t\t\tNo projects added yet. Click on Create project.\n\t\t\t\t\t</CommandEmpty>\n\t\t\t\t\t<CommandGroup heading={\"Projects\"}>\n\t\t\t\t\t\t<CommandList>\n\t\t\t\t\t\t\t{data?.map((project) => {\n\t\t\t\t\t\t\t\t// Find default environment from accessible environments, or fall back to first accessible environment\n\t\t\t\t\t\t\t\tconst defaultEnvironment =\n\t\t\t\t\t\t\t\t\tproject.environments.find(\n\t\t\t\t\t\t\t\t\t\t(environment) => environment.isDefault,\n\t\t\t\t\t\t\t\t\t) || project?.environments?.[0];\n\n\t\t\t\t\t\t\t\tif (!defaultEnvironment) return null;\n\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\tkey={project.projectId}\n\t\t\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\t\t\trouter.push(\n\t\t\t\t\t\t\t\t\t\t\t\t`/dashboard/project/${project.projectId}/environment/${defaultEnvironment.environmentId}`,\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\tsetOpen(false);\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<BookIcon className=\"size-4 text-muted-foreground mr-2\" />\n\t\t\t\t\t\t\t\t\t\t{project.name} / {defaultEnvironment.name}\n\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t</CommandList>\n\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t<CommandSeparator />\n\t\t\t\t\t<CommandGroup heading={\"Services\"}>\n\t\t\t\t\t\t<CommandList>\n\t\t\t\t\t\t\t{data?.map((project) => {\n\t\t\t\t\t\t\t\tconst applications: SearchServices[] =\n\t\t\t\t\t\t\t\t\textractAllServicesFromProject(project);\n\t\t\t\t\t\t\t\treturn applications.map((application) => (\n\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\tkey={application.id}\n\t\t\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\t\t\trouter.push(\n\t\t\t\t\t\t\t\t\t\t\t\t`/dashboard/project/${project.projectId}/environment/${application.environmentId}/services/${application.type}/${application.id}`,\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\tsetOpen(false);\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{application.type === \"postgres\" && (\n\t\t\t\t\t\t\t\t\t\t\t<PostgresqlIcon className=\"h-6 w-6 mr-2\" />\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t{application.type === \"redis\" && (\n\t\t\t\t\t\t\t\t\t\t\t<RedisIcon className=\"h-6 w-6 mr-2\" />\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t{application.type === \"mariadb\" && (\n\t\t\t\t\t\t\t\t\t\t\t<MariadbIcon className=\"h-6 w-6 mr-2\" />\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t{application.type === \"mongo\" && (\n\t\t\t\t\t\t\t\t\t\t\t<MongodbIcon className=\"h-6 w-6 mr-2\" />\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t{application.type === \"mysql\" && (\n\t\t\t\t\t\t\t\t\t\t\t<MysqlIcon className=\"h-6 w-6 mr-2\" />\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t{application.type === \"application\" && (\n\t\t\t\t\t\t\t\t\t\t\t<GlobeIcon className=\"h-6 w-6 mr-2\" />\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t{application.type === \"compose\" && (\n\t\t\t\t\t\t\t\t\t\t\t<CircuitBoard className=\"h-6 w-6 mr-2\" />\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t<span className=\"flex-grow\">\n\t\t\t\t\t\t\t\t\t\t\t{project.name} / {application.environmentName} /{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t{application.name}{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t<div style={{ display: \"none\" }}>{application.id}</div>\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t<StatusTooltip status={application.status} />\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t</CommandList>\n\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t<CommandSeparator />\n\t\t\t\t\t<CommandGroup heading={\"Application\"} hidden={true}>\n\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\trouter.push(\"/dashboard/projects\");\n\t\t\t\t\t\t\t\tsetOpen(false);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tProjects\n\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\trouter.push(\"/dashboard/deployments\");\n\t\t\t\t\t\t\t\tsetOpen(false);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tDeployments\n\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t{!isCloud && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\t\trouter.push(\"/dashboard/monitoring\");\n\t\t\t\t\t\t\t\t\t\tsetOpen(false);\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tMonitoring\n\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\t\trouter.push(\"/dashboard/traefik\");\n\t\t\t\t\t\t\t\t\t\tsetOpen(false);\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tTraefik\n\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\t\trouter.push(\"/dashboard/docker\");\n\t\t\t\t\t\t\t\t\t\tsetOpen(false);\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tDocker\n\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\t\trouter.push(\"/dashboard/requests\");\n\t\t\t\t\t\t\t\t\t\tsetOpen(false);\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tRequests\n\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\trouter.push(\"/dashboard/settings/server\");\n\t\t\t\t\t\t\t\tsetOpen(false);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tSettings\n\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t</CommandGroup>\n\t\t\t\t</CommandList>\n\t\t\t</CommandDialog>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/ai-form.tsx",
    "content": "\"use client\";\n\nimport { BotIcon, Loader2, Trash2 } from \"lucide-react\";\nimport { toast } from \"sonner\";\nimport { DialogAction } from \"@/components/shared/dialog-action\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport { api } from \"@/utils/api\";\nimport { HandleAi } from \"./handle-ai\";\n\nexport const AiForm = () => {\n\tconst { data: aiConfigs, refetch, isPending } = api.ai.getAll.useQuery();\n\tconst { mutateAsync, isPending: isRemoving } = api.ai.delete.useMutation();\n\n\treturn (\n\t\t<div className=\"w-full\">\n\t\t\t<Card className=\"h-full bg-sidebar  p-2.5 rounded-xl  max-w-5xl mx-auto\">\n\t\t\t\t<div className=\"rounded-xl bg-background shadow-md \">\n\t\t\t\t\t<CardHeader className=\"flex flex-row gap-2 justify-between\">\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<CardTitle className=\"text-xl flex flex-row gap-2\">\n\t\t\t\t\t\t\t\t<BotIcon className=\"size-6 text-muted-foreground self-center\" />\n\t\t\t\t\t\t\t\tAI Settings\n\t\t\t\t\t\t\t</CardTitle>\n\t\t\t\t\t\t\t<CardDescription>Manage your AI configurations</CardDescription>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{aiConfigs && aiConfigs?.length > 0 && <HandleAi />}\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<CardContent className=\"space-y-2 py-8 border-t\">\n\t\t\t\t\t\t{isPending ? (\n\t\t\t\t\t\t\t<div className=\"flex flex-row gap-2 items-center justify-center text-sm text-muted-foreground min-h-[25vh]\">\n\t\t\t\t\t\t\t\t<span>Loading...</span>\n\t\t\t\t\t\t\t\t<Loader2 className=\"animate-spin size-4\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{aiConfigs?.length === 0 ? (\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col items-center gap-3  min-h-[25vh] justify-center\">\n\t\t\t\t\t\t\t\t\t\t<BotIcon className=\"size-8 self-center text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t<span className=\"text-base text-muted-foreground text-center\">\n\t\t\t\t\t\t\t\t\t\t\tYou don't have any AI configurations\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t<HandleAi />\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-4 rounded-lg min-h-[25vh]\">\n\t\t\t\t\t\t\t\t\t\t{aiConfigs?.map((config) => (\n\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\tkey={config.aiId}\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center justify-between bg-sidebar p-1 w-full rounded-lg\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center justify-between p-3.5 rounded-lg bg-background border  w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm font-medium\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{config.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CardDescription>{config.model}</CardDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex justify-between items-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<HandleAi aiId={config.aiId} />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"Delete AI\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to delete this AI?\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"destructive\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait mutateAsync({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\taiId: config.aiId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"AI deleted successfully\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error deleting AI\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"group hover:bg-red-500/10 \"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisLoading={isRemoving}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Trash2 className=\"size-4 text-primary group-hover:text-red-500\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</CardContent>\n\t\t\t\t</div>\n\t\t\t</Card>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/api/add-api-key.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport copy from \"copy-to-clipboard\";\nimport { useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { CodeEditor } from \"@/components/shared/code-editor\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { Switch } from \"@/components/ui/switch\";\nimport { api } from \"@/utils/api\";\n\nconst formSchema = z.object({\n\tname: z.string().min(1, \"Name is required\"),\n\tprefix: z.string().optional(),\n\texpiresIn: z.number().nullable(),\n\torganizationId: z.string().min(1, \"Organization is required\"),\n\t// Rate limiting fields\n\trateLimitEnabled: z.boolean().optional(),\n\trateLimitTimeWindow: z.number().nullable(),\n\trateLimitMax: z.number().nullable(),\n\t// Request limiting fields\n\tremaining: z.number().nullable().optional(),\n\trefillAmount: z.number().nullable().optional(),\n\trefillInterval: z.number().nullable().optional(),\n});\n\ntype FormValues = z.infer<typeof formSchema>;\n\nconst EXPIRATION_OPTIONS = [\n\t{ label: \"Never\", value: \"0\" },\n\t{ label: \"1 day\", value: String(60 * 60 * 24) },\n\t{ label: \"7 days\", value: String(60 * 60 * 24 * 7) },\n\t{ label: \"30 days\", value: String(60 * 60 * 24 * 30) },\n\t{ label: \"90 days\", value: String(60 * 60 * 24 * 90) },\n\t{ label: \"1 year\", value: String(60 * 60 * 24 * 365) },\n];\n\nconst TIME_WINDOW_OPTIONS = [\n\t{ label: \"1 minute\", value: String(60 * 1000) },\n\t{ label: \"5 minutes\", value: String(5 * 60 * 1000) },\n\t{ label: \"15 minutes\", value: String(15 * 60 * 1000) },\n\t{ label: \"30 minutes\", value: String(30 * 60 * 1000) },\n\t{ label: \"1 hour\", value: String(60 * 60 * 1000) },\n\t{ label: \"1 day\", value: String(24 * 60 * 60 * 1000) },\n];\n\nconst REFILL_INTERVAL_OPTIONS = [\n\t{ label: \"1 hour\", value: String(60 * 60 * 1000) },\n\t{ label: \"6 hours\", value: String(6 * 60 * 60 * 1000) },\n\t{ label: \"12 hours\", value: String(12 * 60 * 60 * 1000) },\n\t{ label: \"1 day\", value: String(24 * 60 * 60 * 1000) },\n\t{ label: \"7 days\", value: String(7 * 24 * 60 * 60 * 1000) },\n\t{ label: \"30 days\", value: String(30 * 24 * 60 * 60 * 1000) },\n];\n\nexport const AddApiKey = () => {\n\tconst [open, setOpen] = useState(false);\n\tconst [showSuccessModal, setShowSuccessModal] = useState(false);\n\tconst [newApiKey, setNewApiKey] = useState(\"\");\n\tconst { refetch } = api.user.get.useQuery();\n\tconst { data: organizations } = api.organization.all.useQuery();\n\tconst createApiKey = api.user.createApiKey.useMutation({\n\t\tonSuccess: (data) => {\n\t\t\tif (!data) return;\n\n\t\t\tsetNewApiKey(data.key);\n\t\t\tsetOpen(false);\n\t\t\tsetShowSuccessModal(true);\n\t\t\tform.reset();\n\t\t\tvoid refetch();\n\t\t},\n\t\tonError: () => {\n\t\t\ttoast.error(\"Failed to generate API key\");\n\t\t},\n\t});\n\n\tconst form = useForm<FormValues>({\n\t\tresolver: zodResolver(formSchema),\n\t\tdefaultValues: {\n\t\t\tname: \"\",\n\t\t\tprefix: \"\",\n\t\t\texpiresIn: null,\n\t\t\torganizationId: \"\",\n\t\t\trateLimitEnabled: false,\n\t\t\trateLimitTimeWindow: null,\n\t\t\trateLimitMax: null,\n\t\t\tremaining: null,\n\t\t\trefillAmount: null,\n\t\t\trefillInterval: null,\n\t\t},\n\t});\n\n\tconst rateLimitEnabled = form.watch(\"rateLimitEnabled\");\n\n\tconst onSubmit = async (values: FormValues) => {\n\t\tcreateApiKey.mutate({\n\t\t\tname: values.name,\n\t\t\texpiresIn: values.expiresIn || undefined,\n\t\t\tprefix: values.prefix || undefined,\n\t\t\tmetadata: {\n\t\t\t\torganizationId: values.organizationId,\n\t\t\t},\n\t\t\t// Rate limiting\n\t\t\trateLimitEnabled: values.rateLimitEnabled,\n\t\t\trateLimitTimeWindow: values.rateLimitTimeWindow || undefined,\n\t\t\trateLimitMax: values.rateLimitMax || undefined,\n\t\t\t// Request limiting\n\t\t\tremaining: values.remaining || undefined,\n\t\t\trefillAmount: values.refillAmount || undefined,\n\t\t\trefillInterval: values.refillInterval || undefined,\n\t\t});\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<Dialog open={open} onOpenChange={setOpen}>\n\t\t\t\t<DialogTrigger asChild>\n\t\t\t\t\t<Button>Generate New Key</Button>\n\t\t\t\t</DialogTrigger>\n\t\t\t\t<DialogContent className=\"sm:max-w-xl max-h-[90vh]\">\n\t\t\t\t\t<DialogHeader>\n\t\t\t\t\t\t<DialogTitle>Generate API Key</DialogTitle>\n\t\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\t\tCreate a new API key for accessing the API. You can set an\n\t\t\t\t\t\t\texpiration date and a custom prefix for better organization.\n\t\t\t\t\t\t</DialogDescription>\n\t\t\t\t\t</DialogHeader>\n\t\t\t\t\t<Form {...form}>\n\t\t\t\t\t\t<form onSubmit={form.handleSubmit(onSubmit)} className=\"space-y-4\">\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"name\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Name</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"My API Key\" {...field} />\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"prefix\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Prefix</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"my_app\" {...field} />\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"expiresIn\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Expiration</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\t\tvalue={field.value?.toString() || \"0\"}\n\t\t\t\t\t\t\t\t\t\t\tonValueChange={(value) =>\n\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(Number.parseInt(value, 10))\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select expiration time\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t{EXPIRATION_OPTIONS.map((option) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem key={option.value} value={option.value}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{option.label}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"organizationId\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Organization</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<Select value={field.value} onValueChange={field.onChange}>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select organization\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t{organizations?.map((org) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem key={org.id} value={org.id}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{org.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t{/* Rate Limiting Section */}\n\t\t\t\t\t\t\t<div className=\"space-y-4 rounded-lg border p-4\">\n\t\t\t\t\t\t\t\t<h3 className=\"text-lg font-medium\">Rate Limiting</h3>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"rateLimitEnabled\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem className=\"flex flex-row items-center justify-between rounded-lg border p-3\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Enable Rate Limiting</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\tLimit the number of requests within a time window\n\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t{rateLimitEnabled && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"rateLimitTimeWindow\"\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Time Window</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value?.toString()}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonValueChange={(value) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(Number.parseInt(value, 10))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select time window\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{TIME_WINDOW_OPTIONS.map((option) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={option.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={option.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{option.label}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tThe duration in which requests are counted\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"rateLimitMax\"\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Maximum Requests</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"100\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value?.toString() ?? \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.target.value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? Number.parseInt(e.target.value, 10)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: null,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tMaximum number of requests allowed within the time\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twindow\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t{/* Request Limiting Section */}\n\t\t\t\t\t\t\t<div className=\"space-y-4 rounded-lg border p-4\">\n\t\t\t\t\t\t\t\t<h3 className=\"text-lg font-medium\">Request Limiting</h3>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"remaining\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Total Request Limit</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Leave empty for unlimited\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value?.toString() ?? \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.target.value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? Number.parseInt(e.target.value, 10)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: null,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\tTotal number of requests allowed (leave empty for\n\t\t\t\t\t\t\t\t\t\t\t\tunlimited)\n\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"refillAmount\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Refill Amount</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Amount to refill\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value?.toString() ?? \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.target.value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? Number.parseInt(e.target.value, 10)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: null,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\tNumber of requests to add on each refill\n\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"refillInterval\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Refill Interval</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value?.toString()}\n\t\t\t\t\t\t\t\t\t\t\t\tonValueChange={(value) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(Number.parseInt(value, 10))\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select refill interval\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{REFILL_INTERVAL_OPTIONS.map((option) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem key={option.value} value={option.value}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{option.label}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\tHow often to refill the request limit\n\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div className=\"flex justify-end gap-3 pt-4\">\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\tonClick={() => setOpen(false)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tCancel\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t<Button type=\"submit\">Generate</Button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</form>\n\t\t\t\t\t</Form>\n\t\t\t\t</DialogContent>\n\t\t\t</Dialog>\n\n\t\t\t<Dialog open={showSuccessModal} onOpenChange={setShowSuccessModal}>\n\t\t\t\t<DialogContent className=\"sm:max-w-xl\">\n\t\t\t\t\t<DialogHeader>\n\t\t\t\t\t\t<DialogTitle>API Key Generated Successfully</DialogTitle>\n\t\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\t\tPlease copy your API key now. You won't be able to see it again!\n\t\t\t\t\t\t</DialogDescription>\n\t\t\t\t\t</DialogHeader>\n\t\t\t\t\t<div className=\"mt-4 space-y-4\">\n\t\t\t\t\t\t<CodeEditor\n\t\t\t\t\t\t\tclassName=\"font-mono text-sm break-all\"\n\t\t\t\t\t\t\tlanguage=\"properties\"\n\t\t\t\t\t\t\tvalue={newApiKey}\n\t\t\t\t\t\t\treadOnly\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<div className=\"flex justify-end gap-3\">\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\tcopy(newApiKey);\n\t\t\t\t\t\t\t\t\ttoast.success(\"API key copied to clipboard\");\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tCopy to Clipboard\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\tonClick={() => setShowSuccessModal(false)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tClose\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</DialogContent>\n\t\t\t</Dialog>\n\t\t</>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/api/show-api-keys.tsx",
    "content": "import { formatDistanceToNow } from \"date-fns\";\nimport { Clock, ExternalLinkIcon, KeyIcon, Tag, Trash2 } from \"lucide-react\";\nimport Link from \"next/link\";\nimport { toast } from \"sonner\";\nimport { DialogAction } from \"@/components/shared/dialog-action\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport { api } from \"@/utils/api\";\nimport { AddApiKey } from \"./add-api-key\";\n\nexport const ShowApiKeys = () => {\n\tconst { data, refetch } = api.user.get.useQuery();\n\tconst { mutateAsync: deleteApiKey, isPending: isLoadingDelete } =\n\t\tapi.user.deleteApiKey.useMutation();\n\n\treturn (\n\t\t<div className=\"w-full\">\n\t\t\t<Card className=\"h-full bg-sidebar p-2.5 rounded-xl max-w-5xl mx-auto\">\n\t\t\t\t<div className=\"rounded-xl bg-background shadow-md\">\n\t\t\t\t\t<CardHeader className=\"flex flex-row gap-2 flex-wrap justify-between items-center\">\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<CardTitle className=\"text-xl flex items-center gap-2\">\n\t\t\t\t\t\t\t\t<KeyIcon className=\"size-5\" />\n\t\t\t\t\t\t\t\tAPI/CLI Keys\n\t\t\t\t\t\t\t</CardTitle>\n\t\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\t\tGenerate and manage API keys to access the API/CLI\n\t\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"flex flex-row gap-2 max-sm:flex-wrap items-end\">\n\t\t\t\t\t\t\t<span className=\"text-sm font-medium text-muted-foreground\">\n\t\t\t\t\t\t\t\tSwagger API:\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\thref=\"/swagger\"\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\tclassName=\"flex flex-row gap-2 items-center\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<span className=\"text-sm font-medium\">View</span>\n\t\t\t\t\t\t\t\t<ExternalLinkIcon className=\"size-4\" />\n\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<CardContent className=\"space-y-6\">\n\t\t\t\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t\t{data?.user.apiKeys && data.user.apiKeys.length > 0 ? (\n\t\t\t\t\t\t\t\tdata.user.apiKeys.map((apiKey) => (\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tkey={apiKey.id}\n\t\t\t\t\t\t\t\t\t\tclassName=\"flex flex-col gap-2 p-4 border rounded-lg\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex justify-between items-start\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-medium\">{apiKey.name}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-wrap gap-2 items-center text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Clock className=\"size-3.5\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tCreated{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{formatDistanceToNow(new Date(apiKey.createdAt))}{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tago\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{apiKey.prefix && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Tag className=\"size-3.5\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{apiKey.prefix}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t{apiKey.expiresAt && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Clock className=\"size-3.5\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tExpires in{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{formatDistanceToNow(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew Date(apiKey.expiresAt),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"Delete API Key\"\n\t\t\t\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to delete this API key? This action cannot be undone.\"\n\t\t\t\t\t\t\t\t\t\t\t\ttype=\"destructive\"\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait deleteApiKey({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tapiKeyId: apiKey.id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait refetch();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"API key deleted successfully\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\terror instanceof Error\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? error.message\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Error deleting API key\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tisLoading={isLoadingDelete}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Trash2 className=\"size-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t))\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<div className=\"flex flex-col items-center gap-3 py-6\">\n\t\t\t\t\t\t\t\t\t<KeyIcon className=\"size-8 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t<span className=\"text-base text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\tNo API keys found\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t{/* Generate new API key */}\n\t\t\t\t\t\t<div className=\"flex justify-end pt-4 border-t\">\n\t\t\t\t\t\t\t<AddApiKey />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</CardContent>\n\t\t\t\t</div>\n\t\t\t</Card>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/billing/show-billing-invoices.tsx",
    "content": "import { CreditCard, FileText } from \"lucide-react\";\nimport Link from \"next/link\";\nimport { useRouter } from \"next/router\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport { cn } from \"@/lib/utils\";\nimport { ShowInvoices } from \"./show-invoices\";\n\nconst navigationItems = [\n\t{\n\t\tname: \"Subscription\",\n\t\thref: \"/dashboard/settings/billing\",\n\t\ticon: CreditCard,\n\t},\n\t{\n\t\tname: \"Invoices\",\n\t\thref: \"/dashboard/settings/invoices\",\n\t\ticon: FileText,\n\t},\n];\n\nexport const ShowBillingInvoices = () => {\n\tconst router = useRouter();\n\n\treturn (\n\t\t<div className=\"w-full\">\n\t\t\t<Card className=\"bg-sidebar p-2.5 rounded-xl max-w-5xl mx-auto\">\n\t\t\t\t<div className=\"rounded-xl bg-background shadow-md\">\n\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t<CardTitle className=\"text-xl flex flex-row gap-2\">\n\t\t\t\t\t\t\t<CreditCard className=\"size-6 text-muted-foreground self-center\" />\n\t\t\t\t\t\t\tBilling\n\t\t\t\t\t\t</CardTitle>\n\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\tManage your subscription and invoices\n\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<CardContent className=\"space-y-4 py-4 border-t\">\n\t\t\t\t\t\t<nav className=\"flex space-x-2 border-b\">\n\t\t\t\t\t\t\t{navigationItems.map((item) => {\n\t\t\t\t\t\t\t\tconst Icon = item.icon;\n\t\t\t\t\t\t\t\tconst isActive = router.pathname === item.href;\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\tkey={item.name}\n\t\t\t\t\t\t\t\t\t\thref={item.href}\n\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\"flex items-center gap-2 px-4 py-2 text-sm font-medium border-b-2 transition-colors\",\n\t\t\t\t\t\t\t\t\t\t\tisActive\n\t\t\t\t\t\t\t\t\t\t\t\t? \"border-primary text-primary\"\n\t\t\t\t\t\t\t\t\t\t\t\t: \"border-transparent text-muted-foreground hover:text-primary hover:border-muted\",\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Icon className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t{item.name}\n\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t</nav>\n\n\t\t\t\t\t\t<div className=\"mt-6\">\n\t\t\t\t\t\t\t<ShowInvoices />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</CardContent>\n\t\t\t\t</div>\n\t\t\t</Card>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/billing/show-billing.tsx",
    "content": "import { loadStripe } from \"@stripe/stripe-js\";\nimport clsx from \"clsx\";\nimport {\n\tAlertTriangle,\n\tCheckIcon,\n\tCreditCard,\n\tFileText,\n\tLoader2,\n\tMinusIcon,\n\tPlusIcon,\n} from \"lucide-react\";\nimport Link from \"next/link\";\nimport { useRouter } from \"next/router\";\nimport { useEffect, useState } from \"react\";\nimport { toast } from \"sonner\";\nimport { DialogAction } from \"@/components/shared/dialog-action\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport { NumberInput } from \"@/components/ui/input\";\nimport { Progress } from \"@/components/ui/progress\";\nimport { Tabs, TabsList, TabsTrigger } from \"@/components/ui/tabs\";\nimport { cn } from \"@/lib/utils\";\nimport { api } from \"@/utils/api\";\n\nconst stripePromise = loadStripe(\n\tprocess.env.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY!,\n);\n\n/** Precio legacy / Hobby: $4.50/mo primer servidor, $3.50 siguientes; anual $45.90 primero, $35.70 siguientes. */\nexport const calculatePrice = (count: number, isAnnual = false) => {\n\tif (isAnnual) {\n\t\tif (count <= 1) return 45.9;\n\t\treturn 35.7 * count;\n\t}\n\tif (count <= 1) return 4.5;\n\treturn count * 3.5;\n};\n\n/** Hobby: $4.50/mo per server; annual 20% off = $43.20/yr per server (4.5 * 12 * 0.8). */\nexport const calculatePriceHobby = (count: number, isAnnual = false) => {\n\tconst perServerMonthly = 4.5;\n\tconst perServerAnnual = 43.2; // 4.5 * 12 * 0.8\n\treturn isAnnual ? count * perServerAnnual : count * perServerMonthly;\n};\n\n/** Startup: 3 servers included ($15/mo); extra servers $4.50/mo each. Annual 20% off. */\nexport const STARTUP_SERVERS_INCLUDED = 3;\nexport const calculatePriceStartup = (count: number, isAnnual = false) => {\n\tconst baseMonthly = 15;\n\tconst extraMonthly = 4.5;\n\tconst baseAnnual = 144; // 15 * 12 * 0.8\n\tconst extraAnnual = 43.2; // 4.5 * 12 * 0.8, consistent with Hobby annual\n\tif (count <= STARTUP_SERVERS_INCLUDED)\n\t\treturn isAnnual ? baseAnnual : baseMonthly;\n\treturn isAnnual\n\t\t? baseAnnual + (count - STARTUP_SERVERS_INCLUDED) * extraAnnual\n\t\t: baseMonthly + (count - STARTUP_SERVERS_INCLUDED) * extraMonthly;\n};\n\nconst navigationItems = [\n\t{\n\t\tname: \"Subscription\",\n\t\thref: \"/dashboard/settings/billing\",\n\t\ticon: CreditCard,\n\t},\n\t{\n\t\tname: \"Invoices\",\n\t\thref: \"/dashboard/settings/invoices\",\n\t\ticon: FileText,\n\t},\n];\n\nexport const ShowBilling = () => {\n\tconst router = useRouter();\n\tconst { data: servers } = api.server.count.useQuery();\n\tconst { data: admin } = api.user.get.useQuery();\n\tconst { data, isPending } = api.stripe.getProducts.useQuery();\n\tconst { mutateAsync: createCheckoutSession } =\n\t\tapi.stripe.createCheckoutSession.useMutation();\n\n\tconst { mutateAsync: createCustomerPortalSession } =\n\t\tapi.stripe.createCustomerPortalSession.useMutation();\n\tconst { mutateAsync: upgradeSubscription, isPending: isUpgrading } =\n\t\tapi.stripe.upgradeSubscription.useMutation();\n\tconst utils = api.useUtils();\n\n\tconst [hobbyServerQuantity, setHobbyServerQuantity] = useState(1);\n\tconst [startupServerQuantity, setStartupServerQuantity] = useState(\n\t\tSTARTUP_SERVERS_INCLUDED,\n\t);\n\tconst [isAnnual, setIsAnnual] = useState(false);\n\tconst [upgradeTier, setUpgradeTier] = useState<\"hobby\" | \"startup\" | null>(\n\t\tnull,\n\t);\n\tconst [upgradeServerQty, setUpgradeServerQty] = useState(3);\n\t/** Billing interval in the upgrade/update form; synced to current when data loads. */\n\tconst [updateFormAnnual, setUpdateFormAnnual] = useState(false);\n\n\tuseEffect(() => {\n\t\tif (data?.isAnnualCurrent !== undefined) {\n\t\t\tsetUpdateFormAnnual(data.isAnnualCurrent);\n\t\t}\n\t}, [data?.isAnnualCurrent]);\n\n\tconst handleCheckout = async (\n\t\ttier: \"legacy\" | \"hobby\" | \"startup\",\n\t\tproductId: string,\n\t) => {\n\t\tconst stripe = await stripePromise;\n\t\tconst serverQuantity =\n\t\t\ttier === \"startup\"\n\t\t\t\t? startupServerQuantity\n\t\t\t\t: tier === \"hobby\"\n\t\t\t\t\t? hobbyServerQuantity\n\t\t\t\t\t: hobbyServerQuantity;\n\t\tif (data && data.subscriptions.length === 0) {\n\t\t\tcreateCheckoutSession({\n\t\t\t\ttier,\n\t\t\t\tproductId,\n\t\t\t\tserverQuantity,\n\t\t\t\tisAnnual,\n\t\t\t}).then(async (session) => {\n\t\t\t\tawait stripe?.redirectToCheckout({\n\t\t\t\t\tsessionId: session.sessionId,\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t};\n\n\tconst useNewPricing = data?.hobbyProductId && data?.startupProductId;\n\tconst products = data?.products.filter((product) => {\n\t\t// @ts-ignore\n\t\tconst interval = product?.default_price?.recurring?.interval;\n\t\treturn isAnnual ? interval === \"year\" : interval === \"month\";\n\t});\n\n\tconst maxServers = admin?.user.serversQuantity ?? 1;\n\tconst percentage = ((servers ?? 0) / maxServers) * 100;\n\tconst safePercentage = Math.min(percentage, 100);\n\n\treturn (\n\t\t<div className=\"w-full\">\n\t\t\t<Card className=\"bg-sidebar p-2.5 rounded-xl max-w-6xl mx-auto\">\n\t\t\t\t<div className=\"rounded-xl bg-background shadow-md\">\n\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t<CardTitle className=\"text-xl flex flex-row gap-2\">\n\t\t\t\t\t\t\t<CreditCard className=\"size-6 text-muted-foreground self-center\" />\n\t\t\t\t\t\t\tBilling\n\t\t\t\t\t\t</CardTitle>\n\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\tManage your subscription and invoices\n\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<CardContent className=\"space-y-4 py-4 border-t\">\n\t\t\t\t\t\t<nav className=\"flex space-x-2 border-b\">\n\t\t\t\t\t\t\t{navigationItems.map((item) => {\n\t\t\t\t\t\t\t\tconst Icon = item.icon;\n\t\t\t\t\t\t\t\tconst isActive = router.pathname === item.href;\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\tkey={item.name}\n\t\t\t\t\t\t\t\t\t\thref={item.href}\n\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\"flex items-center gap-2 px-4 py-2 text-sm font-medium border-b-2 transition-colors\",\n\t\t\t\t\t\t\t\t\t\t\tisActive\n\t\t\t\t\t\t\t\t\t\t\t\t? \"border-primary text-primary\"\n\t\t\t\t\t\t\t\t\t\t\t\t: \"border-transparent text-muted-foreground hover:text-primary hover:border-muted\",\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Icon className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t{item.name}\n\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t</nav>\n\n\t\t\t\t\t\t<div className=\"flex flex-col gap-4 w-full mt-6\">\n\t\t\t\t\t\t\t{admin?.user.stripeSubscriptionId && (\n\t\t\t\t\t\t\t\t<div className=\"space-y-2 flex flex-col\">\n\t\t\t\t\t\t\t\t\t<h3 className=\"text-lg font-medium\">Servers Plan</h3>\n\t\t\t\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\tYou have {servers} server on your plan of{\" \"}\n\t\t\t\t\t\t\t\t\t\t{admin?.user.serversQuantity} servers\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t<Progress value={safePercentage} className=\"max-w-lg\" />\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t{admin && admin.user.serversQuantity! <= (servers ?? 0) && (\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-4 p-2 bg-yellow-50 dark:bg-yellow-950 rounded-lg items-center\">\n\t\t\t\t\t\t\t\t\t\t\t<AlertTriangle className=\"text-yellow-600 dark:text-yellow-400\" />\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm text-yellow-600 dark:text-yellow-400\">\n\t\t\t\t\t\t\t\t\t\t\t\tYou have reached the maximum number of servers you can\n\t\t\t\t\t\t\t\t\t\t\t\tcreate, please upgrade your plan to add more servers.\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{/* Upgrade: solo para usuarios en plan legacy con nuevos planes disponibles */}\n\t\t\t\t\t\t\t{useNewPricing &&\n\t\t\t\t\t\t\t\tdata?.currentPlan === \"legacy\" &&\n\t\t\t\t\t\t\t\tdata?.subscriptions?.length > 0 && (\n\t\t\t\t\t\t\t\t\t<div className=\"rounded-xl border border-border bg-primary/5 p-4 space-y-4 max-w-2xl\">\n\t\t\t\t\t\t\t\t\t\t<h3 className=\"text-lg font-medium\">Upgrade your plan</h3>\n\t\t\t\t\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\tYou’re on the legacy plan. Switch to Hobby or Startup\n\t\t\t\t\t\t\t\t\t\t\t(same benefits). You can also choose annual billing (20%\n\t\t\t\t\t\t\t\t\t\t\toff). Stripe will prorate the change.\n\t\t\t\t\t\t\t\t\t\t</p>\n\n\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm font-medium block\">\n\t\t\t\t\t\t\t\t\t\t\tBilling interval\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex gap-2 flex-wrap\">\n\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\tvariant={!updateFormAnnual ? \"default\" : \"outline\"}\n\t\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"min-w-[6rem]\"\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => setUpdateFormAnnual(false)}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\tMonthly\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\tvariant={updateFormAnnual ? \"default\" : \"outline\"}\n\t\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"min-w-[6rem]\"\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => setUpdateFormAnnual(true)}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\tAnnual (20% off)\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm font-medium block\">New plan</span>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex gap-2 flex-wrap\">\n\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\t\t\t\t\tupgradeTier === \"hobby\" ? \"default\" : \"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"min-w-[6rem]\"\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => setUpgradeTier(\"hobby\")}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\tHobby\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\t\t\t\t\tupgradeTier === \"startup\" ? \"default\" : \"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"min-w-[6rem]\"\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => setUpgradeTier(\"startup\")}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\tStartup\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t{upgradeTier && (\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-3 pt-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm font-medium\">\n\t\t\t\t\t\t\t\t\t\t\t\t\tServers\n\t\t\t\t\t\t\t\t\t\t\t\t\t{upgradeTier === \"startup\" &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t` (min. ${STARTUP_SERVERS_INCLUDED})`}\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2 w-fit\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-8 w-8\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tupgradeTier === \"startup\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? upgradeServerQty <= STARTUP_SERVERS_INCLUDED\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: upgradeServerQty <= 1\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetUpgradeServerQty((q) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMath.max(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tupgradeTier === \"startup\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? STARTUP_SERVERS_INCLUDED\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: 1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tq - 1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<MinusIcon className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<NumberInput\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={upgradeServerQty}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst v =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tNumber((e.target as HTMLInputElement).value) ||\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetUpgradeServerQty(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMath.max(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tupgradeTier === \"startup\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? STARTUP_SERVERS_INCLUDED\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: 1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tv,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-20 h-8\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-8 w-8\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => setUpgradeServerQty((q) => q + 1)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<PlusIcon className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{upgradeTier === \"hobby\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? `$${calculatePriceHobby(upgradeServerQty, updateFormAnnual).toFixed(2)} per ${updateFormAnnual ? \"year\" : \"month\"}`\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: `$${calculatePriceStartup(upgradeServerQty, updateFormAnnual).toFixed(2)} per ${updateFormAnnual ? \"year\" : \"month\"}`}\n\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"Confirm upgrade\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"font-medium text-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCurrent plan: Legacy\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"font-medium text-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tNew plan:{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{upgradeTier === \"startup\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Startup\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Hobby\"}{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t· {upgradeServerQty} server\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{upgradeServerQty !== 1 ? \"s\" : \"\"} · $\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{upgradeTier === \"hobby\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? calculatePriceHobby(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tupgradeServerQty,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tupdateFormAnnual,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t).toFixed(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: calculatePriceStartup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tupgradeServerQty,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tupdateFormAnnual,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t).toFixed(2)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/{updateFormAnnual ? \"yr\" : \"mo\"} (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{updateFormAnnual ? \"annual\" : \"monthly\"})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tStripe will prorate the change.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"default\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!upgradeTier) return;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait upgradeSubscription({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttier: upgradeTier,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tserverQuantity: upgradeServerQty,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisAnnual: updateFormAnnual,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait utils.stripe.getProducts.invalidate();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait utils.user.get.invalidate();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetUpgradeTier(null);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Plan upgraded successfully\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t} catch {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error upgrading plan\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-full sm:w-auto\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisUpgrading ||\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(upgradeTier === \"startup\" &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tupgradeServerQty < STARTUP_SERVERS_INCLUDED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{isUpgrading ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Loader2 className=\"mr-2 h-4 w-4 animate-spin\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tUpgrading…\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Upgrade plan\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{/* Cambiar plan o cantidad de servidores (usuarios en Hobby o Startup; el portal no permite esto) */}\n\t\t\t\t\t\t\t{useNewPricing &&\n\t\t\t\t\t\t\t\t(data?.currentPlan === \"hobby\" ||\n\t\t\t\t\t\t\t\t\tdata?.currentPlan === \"startup\") &&\n\t\t\t\t\t\t\t\tdata?.subscriptions?.length > 0 && (\n\t\t\t\t\t\t\t\t\t<div className=\"rounded-xl border border-border bg-primary/5 p-4 space-y-4 max-w-2xl\">\n\t\t\t\t\t\t\t\t\t\t<h3 className=\"text-lg font-medium\">\n\t\t\t\t\t\t\t\t\t\t\tChange plan or number of servers\n\t\t\t\t\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\tYour current plan:{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-medium text-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t{data?.currentPlan === \"startup\" ? \"Startup\" : \"Hobby\"}\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t{\" · \"}\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-medium text-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t{admin?.user.serversQuantity ?? 0} server\n\t\t\t\t\t\t\t\t\t\t\t\t{(admin?.user.serversQuantity ?? 0) !== 1 ? \"s\" : \"\"}\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t{data?.currentPriceAmount != null && (\n\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\" · \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-medium text-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t${data.currentPriceAmount.toFixed(2)}/\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{data?.isAnnualCurrent ? \"yr\" : \"mo\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t)}{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t({data?.isAnnualCurrent ? \"annual\" : \"monthly\"} billing).\n\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\tAdd more servers, switch between Hobby and Startup, or\n\t\t\t\t\t\t\t\t\t\t\tchange to annual billing (20% off). Stripe will prorate\n\t\t\t\t\t\t\t\t\t\t\tthe change.\n\t\t\t\t\t\t\t\t\t\t</p>\n\n\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm font-medium block\">\n\t\t\t\t\t\t\t\t\t\t\tBilling interval\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex gap-2 flex-wrap\">\n\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\tvariant={!updateFormAnnual ? \"default\" : \"outline\"}\n\t\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"min-w-[6rem]\"\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => setUpdateFormAnnual(false)}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\tMonthly\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\tvariant={updateFormAnnual ? \"default\" : \"outline\"}\n\t\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"min-w-[6rem]\"\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => setUpdateFormAnnual(true)}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\tAnnual (20% off)\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm font-medium block\">Plan</span>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex gap-2 flex-wrap\">\n\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\t\t\t\t\tupgradeTier === \"hobby\" ? \"default\" : \"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"min-w-[6rem]\"\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => setUpgradeTier(\"hobby\")}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\tHobby\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\t\t\t\t\tupgradeTier === \"startup\" ? \"default\" : \"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"min-w-[6rem]\"\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => setUpgradeTier(\"startup\")}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\tStartup\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t{upgradeTier && (\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-3 pt-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm font-medium\">\n\t\t\t\t\t\t\t\t\t\t\t\t\tServers\n\t\t\t\t\t\t\t\t\t\t\t\t\t{upgradeTier === \"startup\" &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t` (min. ${STARTUP_SERVERS_INCLUDED})`}\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2 w-fit\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-8 w-8\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tupgradeTier === \"startup\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? upgradeServerQty <= STARTUP_SERVERS_INCLUDED\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: upgradeServerQty <= 1\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetUpgradeServerQty((q) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMath.max(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tupgradeTier === \"startup\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? STARTUP_SERVERS_INCLUDED\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: 1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tq - 1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<MinusIcon className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<NumberInput\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={upgradeServerQty}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst v =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tNumber((e.target as HTMLInputElement).value) ||\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetUpgradeServerQty(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMath.max(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tupgradeTier === \"startup\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? STARTUP_SERVERS_INCLUDED\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: 1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tv,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-20 h-8\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-8 w-8\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => setUpgradeServerQty((q) => q + 1)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<PlusIcon className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{upgradeTier === \"hobby\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? `$${calculatePriceHobby(upgradeServerQty, updateFormAnnual).toFixed(2)} per ${updateFormAnnual ? \"year\" : \"month\"}`\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: `$${calculatePriceStartup(upgradeServerQty, updateFormAnnual).toFixed(2)} per ${updateFormAnnual ? \"year\" : \"month\"}`}\n\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"Confirm plan change\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"font-medium text-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCurrent plan:{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{data?.currentPlan === \"startup\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Startup\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Hobby\"}{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t· {admin?.user.serversQuantity ?? 0} server\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{(admin?.user.serversQuantity ?? 0) !== 1\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"s\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"\"}{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t·{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{data?.currentPriceAmount != null\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? `$${data.currentPriceAmount.toFixed(2)}/${data?.isAnnualCurrent ? \"yr\" : \"mo\"}`\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"\"}{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t({data?.isAnnualCurrent ? \"annual\" : \"monthly\"})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"font-medium text-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tNew plan:{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{upgradeTier === \"startup\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Startup\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Hobby\"}{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t· {upgradeServerQty} server\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{upgradeServerQty !== 1 ? \"s\" : \"\"} · $\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{upgradeTier === \"hobby\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? calculatePriceHobby(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tupgradeServerQty,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tupdateFormAnnual,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t).toFixed(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: calculatePriceStartup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tupgradeServerQty,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tupdateFormAnnual,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t).toFixed(2)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/{updateFormAnnual ? \"yr\" : \"mo\"} (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{updateFormAnnual ? \"annual\" : \"monthly\"})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tStripe will prorate the change.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"default\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!upgradeTier) return;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait upgradeSubscription({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttier: upgradeTier,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tserverQuantity: upgradeServerQty,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisAnnual: updateFormAnnual,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait utils.stripe.getProducts.invalidate();\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// add delay of 3 seconds\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait new Promise((resolve) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetTimeout(resolve, 3000),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait utils.user.get.invalidate();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetUpgradeTier(null);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Subscription updated successfully\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t} catch {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error updating subscription\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-auto\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisUpgrading ||\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(upgradeTier === \"startup\" &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tupgradeServerQty < STARTUP_SERVERS_INCLUDED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{isUpgrading ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Loader2 className=\"mr-2 h-4 w-4 animate-spin\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tUpdating…\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Update subscription\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-1.5 mt-4\">\n\t\t\t\t\t\t\t\t<span className=\"text-base text-primary\">\n\t\t\t\t\t\t\t\t\tNeed Help? We are here to help you.\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\tJoin to our Discord server and we will help you.\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<Button className=\"rounded-full bg-[#5965F2] hover:bg-[#4A55E0] w-fit\">\n\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\thref=\"https://discord.gg/2tBnJ3jDJc\"\n\t\t\t\t\t\t\t\t\t\taria-label=\"Dokploy on GitHub\"\n\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"flex flex-row items-center gap-2 text-white\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\t\t\trole=\"img\"\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-6 w-6 fill-white\"\n\t\t\t\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<path d=\"M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z\" />\n\t\t\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t\t\t\tJoin Discord\n\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t{isPending ? (\n\t\t\t\t\t\t\t\t<span className=\"text-base text-muted-foreground flex flex-row gap-3 items-center justify-center min-h-[10vh]\">\n\t\t\t\t\t\t\t\t\tLoading...\n\t\t\t\t\t\t\t\t\t<Loader2 className=\"animate-spin\" />\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t) : useNewPricing ? (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<Tabs\n\t\t\t\t\t\t\t\t\t\tdefaultValue=\"monthly\"\n\t\t\t\t\t\t\t\t\t\tvalue={isAnnual ? \"annual\" : \"monthly\"}\n\t\t\t\t\t\t\t\t\t\tclassName=\"w-full\"\n\t\t\t\t\t\t\t\t\t\tonValueChange={(e) => setIsAnnual(e === \"annual\")}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<TabsList className=\"\">\n\t\t\t\t\t\t\t\t\t\t\t<TabsTrigger value=\"monthly\">Monthly</TabsTrigger>\n\t\t\t\t\t\t\t\t\t\t\t<TabsTrigger value=\"annual\">Annual (20% off)</TabsTrigger>\n\t\t\t\t\t\t\t\t\t\t</TabsList>\n\t\t\t\t\t\t\t\t\t</Tabs>\n\t\t\t\t\t\t\t\t\t<div className=\"grid gap-6 sm:grid-cols-2 lg:grid-cols-3\">\n\t\t\t\t\t\t\t\t\t\t{/* Hobby */}\n\t\t\t\t\t\t\t\t\t\t<section className=\"flex flex-col rounded-2xl border border-border px-5 py-6 shadow-sm\">\n\t\t\t\t\t\t\t\t\t\t\t{isAnnual && (\n\t\t\t\t\t\t\t\t\t\t\t\t<Badge className=\"mb-3 w-fit\" variant=\"secondary\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t20% off\n\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t<h3 className=\"text-xl font-bold tracking-tight text-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\tHobby\n\t\t\t\t\t\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t\t\t\t\t\t<p className=\"mt-1 text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\tEverything an individual developer needs\n\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"mt-4\">\n\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-2xl font-semibold text-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t$\n\t\t\t\t\t\t\t\t\t\t\t\t\t{calculatePriceHobby(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\thobbyServerQuantity,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tisAnnual,\n\t\t\t\t\t\t\t\t\t\t\t\t\t).toFixed(2)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/{isAnnual ? \"yr\" : \"mo\"}\n\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-xs text-muted-foreground mt-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t\tAdd more servers as you&apos;d like for{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t{isAnnual ? \"$43.20/yr\" : \"$4.50/mo\"}\n\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t{isAnnual && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-xs text-muted-foreground mt-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcalculatePriceHobby(hobbyServerQuantity, true) /\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t12\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t).toFixed(2)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/mo\n\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<ul className=\"mt-5 flex flex-col gap-2 text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t{[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Unlimited Deployments\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Unlimited Databases\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Unlimited Applications\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"1 Server Included\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"1 Organization\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"1 User\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"2 Environments\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"1 Volume Backup per Application\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"1 Backup per Database\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"1 Scheduled Job per Application\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Community Support (Discord)\",\n\t\t\t\t\t\t\t\t\t\t\t\t].map((f) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<li key={f} className=\"flex items-start gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CheckIcon className=\"h-4 w-4 shrink-0 text-green-600 dark:text-green-500 mt-0.5\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>{f}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"mt-6 flex flex-col gap-3\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tServers:\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisabled={hobbyServerQuantity <= 1}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetHobbyServerQuantity((q) => Math.max(1, q - 1))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<MinusIcon className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<NumberInput\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={hobbyServerQuantity}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetHobbyServerQuantity(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMath.max(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tNumber(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(e.target as HTMLInputElement).value,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) || 1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-center\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => setHobbyServerQuantity((q) => q + 1)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<PlusIcon className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2 w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{admin?.user.stripeCustomerId && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-full\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst session =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait createCustomerPortalSession();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twindow.open(session.url);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tManage Subscription\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t{(data?.subscriptions?.length ?? 0) === 0 && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-full\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thandleCheckout(\"hobby\", data!.hobbyProductId!)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisabled={hobbyServerQuantity < 1}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGet Started\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</section>\n\n\t\t\t\t\t\t\t\t\t\t{/* Startup - Recommended */}\n\t\t\t\t\t\t\t\t\t\t<section className=\"flex flex-col rounded-2xl border-2 border-primary px-5 py-6 shadow-sm\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"mb-3 flex flex-wrap gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t<Badge className=\"w-fit\" variant=\"default\">\n\t\t\t\t\t\t\t\t\t\t\t\t\tRecommended\n\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t\t{isAnnual && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Badge className=\"w-fit\" variant=\"secondary\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t20% off\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<h3 className=\"text-xl font-bold tracking-tight text-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\tStartup\n\t\t\t\t\t\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t\t\t\t\t\t<p className=\"mt-1 text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\tPerfect for small to mid-size teams\n\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"mt-4\">\n\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-2xl font-semibold text-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t$\n\t\t\t\t\t\t\t\t\t\t\t\t\t{calculatePriceStartup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartupServerQuantity,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tisAnnual,\n\t\t\t\t\t\t\t\t\t\t\t\t\t).toFixed(2)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/{isAnnual ? \"yr\" : \"mo\"}\n\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-xs text-muted-foreground mt-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t\tAdd more servers as you&apos;d like for{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t{isAnnual ? \"$43.20/yr\" : \"$4.50/mo\"}\n\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t{isAnnual && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-xs text-muted-foreground mt-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcalculatePriceStartup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartupServerQuantity,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttrue,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) / 12\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t).toFixed(2)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/mo\n\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<ul className=\"mt-5 flex flex-col gap-2 text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t<li className=\"flex items-start gap-2 font-medium text-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CheckIcon className=\"h-4 w-4 shrink-0 text-green-600 dark:text-green-500 mt-0.5\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\tAll the features of Hobby, plus…\n\t\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t\t\t{[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"3 Servers Included\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"3 Organizations\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Unlimited Users\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Unlimited Environments\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Unlimited Volume Backups\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Unlimited Database Backups\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Unlimited Scheduled Jobs\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Basic RBAC (Admin, Developer)\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"2FA\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Email and Chat Support\",\n\t\t\t\t\t\t\t\t\t\t\t\t].map((f) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<li key={f} className=\"flex items-start gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CheckIcon className=\"h-4 w-4 shrink-0 text-green-600 dark:text-green-500 mt-0.5\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>{f}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"mt-6 flex flex-col gap-3\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm font-medium text-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tServers (min. {STARTUP_SERVERS_INCLUDED} included)\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartupServerQuantity <=\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSTARTUP_SERVERS_INCLUDED\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-8 w-8\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetStartupServerQuantity((q) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMath.max(STARTUP_SERVERS_INCLUDED, q - 1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<MinusIcon className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<NumberInput\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={startupServerQuantity}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetStartupServerQuantity(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMath.max(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSTARTUP_SERVERS_INCLUDED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tNumber(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(e.target as HTMLInputElement).value,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) || STARTUP_SERVERS_INCLUDED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-8 text-center\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-8 w-8\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetStartupServerQuantity((q) => q + 1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<PlusIcon className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2 w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{admin?.user.stripeCustomerId && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-full\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst session =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait createCustomerPortalSession();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twindow.open(session.url);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tManage Subscription\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t{(data?.subscriptions?.length ?? 0) === 0 && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-full\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thandleCheckout(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"startup\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdata!.startupProductId!,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartupServerQuantity < STARTUP_SERVERS_INCLUDED\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGet Started\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</section>\n\n\t\t\t\t\t\t\t\t\t\t{/* Enterprise */}\n\t\t\t\t\t\t\t\t\t\t<section className=\"flex flex-col rounded-2xl border border-border px-5 py-6 shadow-sm\">\n\t\t\t\t\t\t\t\t\t\t\t<h3 className=\"text-xl font-bold tracking-tight text-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\tEnterprise\n\t\t\t\t\t\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t\t\t\t\t\t<p className=\"mt-1 text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\tFor large organizations who want more control\n\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"mt-4\">\n\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-2xl font-semibold text-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\tContact Sales\n\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<ul className=\"mt-5 flex flex-col gap-2 text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t<li className=\"flex items-start gap-2 font-medium text-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CheckIcon className=\"h-4 w-4 shrink-0 text-green-600 dark:text-green-500 mt-0.5\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\tAll the features of Startup, plus…\n\t\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t\t\t{[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Up to Unlimited Servers\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Up to Unlimited Organizations\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Fine-grained RBAC\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Complete Hosting Flexibility\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"SSO / SAML (Azure, OKTA, etc)\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Audit Logs\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"MSA/SLA\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"White Labeling\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Priority Support and Services\",\n\t\t\t\t\t\t\t\t\t\t\t\t].map((f) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<li key={f} className=\"flex items-start gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CheckIcon className=\"h-4 w-4 shrink-0 text-green-600 dark:text-green-500 mt-0.5\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>{f}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t\t\t<Button variant=\"outline\" className=\"mt-6 w-full\" asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\t\thref=\"https://dokploy.com/contact\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\tContact Sales\n\t\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t</section>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<Tabs\n\t\t\t\t\t\t\t\t\t\tdefaultValue=\"monthly\"\n\t\t\t\t\t\t\t\t\t\tvalue={isAnnual ? \"annual\" : \"monthly\"}\n\t\t\t\t\t\t\t\t\t\tclassName=\"w-full\"\n\t\t\t\t\t\t\t\t\t\tonValueChange={(e) => setIsAnnual(e === \"annual\")}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<TabsList className=\"grid w-full max-w-[14rem] grid-cols-2\">\n\t\t\t\t\t\t\t\t\t\t\t<TabsTrigger value=\"monthly\">Monthly</TabsTrigger>\n\t\t\t\t\t\t\t\t\t\t\t<TabsTrigger value=\"annual\">Annual (20% off)</TabsTrigger>\n\t\t\t\t\t\t\t\t\t\t</TabsList>\n\t\t\t\t\t\t\t\t\t</Tabs>\n\t\t\t\t\t\t\t\t\t{products?.map((product) => {\n\t\t\t\t\t\t\t\t\t\tconst featured = true;\n\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t<div key={product.id}>\n\t\t\t\t\t\t\t\t\t\t\t\t<section\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={clsx(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"flex flex-col rounded-3xl  border-dashed border-2 px-4 max-w-sm\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfeatured\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"order-first  border py-8 lg:order-none\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"lg:py-8\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{isAnnual && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"mb-4 flex flex-row items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Badge>Recommended 🚀</Badge>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t{isAnnual ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-2 items-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-2xl font-semibold tracking-tight text-primary \">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t${\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{calculatePrice(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thobbyServerQuantity,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisAnnual,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t).toFixed(2)}{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tUSD\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t|\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-base font-semibold tracking-tight text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t${\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcalculatePrice(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thobbyServerQuantity,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisAnnual,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) / 12\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t).toFixed(2)}{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/ Month USD\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-2xl font-semibold tracking-tight text-primary \">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t${\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{calculatePrice(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thobbyServerQuantity,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisAnnual,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t).toFixed(2)}{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tUSD\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<h3 className=\"mt-5 font-medium text-lg text-primary\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{product.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={clsx(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"text-sm\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfeatured ? \"text-white\" : \"text-slate-400\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{product.description}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ul\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={clsx(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\" mt-4 flex flex-col gap-y-2 text-sm\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfeatured ? \"text-white\" : \"text-slate-200\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"All the features of Dokploy\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Unlimited deployments\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Self-hosted on your own infrastructure\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Full access to all deployment features\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Dokploy integration\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Backups\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"All Incoming features\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t].map((feature) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={feature}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex text-muted-foreground\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CheckIcon />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"ml-4\">{feature}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2 mt-4\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2 justify-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{hobbyServerQuantity} Servers\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center space-x-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisabled={hobbyServerQuantity <= 1}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (hobbyServerQuantity <= 1) return;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetHobbyServerQuantity(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thobbyServerQuantity - 1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<MinusIcon className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<NumberInput\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={hobbyServerQuantity}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetHobbyServerQuantity(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.target.value as unknown as number,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetHobbyServerQuantity(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thobbyServerQuantity + 1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<PlusIcon className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2 mt-4 w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{admin?.user.stripeCustomerId && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-full\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst session =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait createCustomerPortalSession();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twindow.open(session.url);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tManage Subscription\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{(data?.subscriptions?.length ?? 0) === 0 && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-full\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thandleCheckout(\"legacy\", product.id);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisabled={hobbyServerQuantity < 1}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSubscribe\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</section>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</CardContent>\n\t\t\t\t</div>\n\t\t\t</Card>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/billing/show-invoices.tsx",
    "content": "import { Download, ExternalLink, FileText, Loader2 } from \"lucide-react\";\nimport type Stripe from \"stripe\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tTable,\n\tTableBody,\n\tTableCell,\n\tTableHead,\n\tTableHeader,\n\tTableRow,\n} from \"@/components/ui/table\";\nimport { api } from \"@/utils/api\";\n\nconst formatDate = (timestamp: number | null) => {\n\tif (!timestamp) return \"-\";\n\treturn new Date(timestamp * 1000).toLocaleDateString(\"en-US\", {\n\t\tyear: \"numeric\",\n\t\tmonth: \"short\",\n\t\tday: \"numeric\",\n\t});\n};\n\nconst formatAmount = (amount: number, currency: string) => {\n\treturn new Intl.NumberFormat(\"en-US\", {\n\t\tstyle: \"currency\",\n\t\tcurrency: currency.toUpperCase(),\n\t}).format(amount / 100);\n};\n\nconst getStatusBadge = (status: Stripe.Invoice.Status | null) => {\n\tconst statusConfig: Record<\n\t\tStripe.Invoice.Status,\n\t\t{ label: string; variant: \"default\" | \"secondary\" | \"destructive\" }\n\t> = {\n\t\tpaid: { label: \"Paid\", variant: \"default\" },\n\t\topen: { label: \"Open\", variant: \"secondary\" },\n\t\tdraft: { label: \"Draft\", variant: \"secondary\" },\n\t\tvoid: { label: \"Void\", variant: \"destructive\" },\n\t\tuncollectible: { label: \"Uncollectible\", variant: \"destructive\" },\n\t};\n\n\tif (!status) {\n\t\treturn <Badge variant=\"secondary\">Unknown</Badge>;\n\t}\n\n\tconst config = statusConfig[status] || {\n\t\tlabel: status,\n\t\tvariant: \"secondary\" as const,\n\t};\n\n\treturn <Badge variant={config.variant}>{config.label}</Badge>;\n};\n\nexport const ShowInvoices = () => {\n\tconst { data: invoices, isPending } = api.stripe.getInvoices.useQuery();\n\n\treturn (\n\t\t<div className=\"space-y-4\">\n\t\t\t{isPending ? (\n\t\t\t\t<div className=\"flex items-center justify-center min-h-[20vh]\">\n\t\t\t\t\t<span className=\"text-base text-muted-foreground flex flex-row gap-3 items-center\">\n\t\t\t\t\t\tLoading invoices...\n\t\t\t\t\t\t<Loader2 className=\"animate-spin\" />\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t) : invoices && invoices.length > 0 ? (\n\t\t\t\t<div className=\"rounded-md border\">\n\t\t\t\t\t<Table>\n\t\t\t\t\t\t<TableHeader>\n\t\t\t\t\t\t\t<TableRow>\n\t\t\t\t\t\t\t\t<TableHead>Invoice</TableHead>\n\t\t\t\t\t\t\t\t<TableHead>Date</TableHead>\n\t\t\t\t\t\t\t\t<TableHead>Due Date</TableHead>\n\t\t\t\t\t\t\t\t<TableHead>Amount</TableHead>\n\t\t\t\t\t\t\t\t<TableHead>Status</TableHead>\n\t\t\t\t\t\t\t\t<TableHead className=\"text-right\">Actions</TableHead>\n\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t</TableHeader>\n\t\t\t\t\t\t<TableBody>\n\t\t\t\t\t\t\t{invoices.map((invoice) => (\n\t\t\t\t\t\t\t\t<TableRow key={invoice.id}>\n\t\t\t\t\t\t\t\t\t<TableCell className=\"font-medium\">\n\t\t\t\t\t\t\t\t\t\t{invoice.number || invoice.id.slice(0, 12)}\n\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t\t<TableCell>{formatDate(invoice.created)}</TableCell>\n\t\t\t\t\t\t\t\t\t<TableCell>{formatDate(invoice.dueDate)}</TableCell>\n\t\t\t\t\t\t\t\t\t<TableCell>\n\t\t\t\t\t\t\t\t\t\t{formatAmount(invoice.amountDue, invoice.currency)}\n\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t\t<TableCell>{getStatusBadge(invoice.status)}</TableCell>\n\t\t\t\t\t\t\t\t\t<TableCell className=\"text-right\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex justify-end gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t{invoice.hostedInvoiceUrl && (\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twindow.open(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tinvoice.hostedInvoiceUrl || \"\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"_blank\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ExternalLink className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t{invoice.invoicePdf && (\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twindow.open(invoice.invoicePdf || \"\", \"_blank\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Download className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</TableBody>\n\t\t\t\t\t</Table>\n\t\t\t\t</div>\n\t\t\t) : (\n\t\t\t\t<div className=\"flex flex-col items-center justify-center min-h-[20vh] gap-2\">\n\t\t\t\t\t<FileText className=\"size-12 text-muted-foreground\" />\n\t\t\t\t\t<p className=\"text-base text-muted-foreground\">No invoices found</p>\n\t\t\t\t\t<p className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\tYour invoices will appear here once you have a subscription\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/billing/show-welcome-dokploy.tsx",
    "content": "import { useEffect, useState } from \"react\";\nimport { ShowBilling } from \"@/components/dashboard/settings/billing/show-billing\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogHeader,\n\tDialogTitle,\n} from \"@/components/ui/dialog\";\nimport { api } from \"@/utils/api\";\n\nexport const ShowWelcomeDokploy = () => {\n\tconst { data } = api.user.get.useQuery();\n\tconst [open, setOpen] = useState(false);\n\n\tconst { data: isCloud, isPending } = api.settings.isCloud.useQuery();\n\n\tif (!isCloud || data?.role !== \"admin\") {\n\t\treturn null;\n\t}\n\n\tuseEffect(() => {\n\t\tif (\n\t\t\t!isPending &&\n\t\t\tisCloud &&\n\t\t\t!localStorage.getItem(\"hasSeenCloudWelcomeModal\") &&\n\t\t\tdata?.role === \"owner\"\n\t\t) {\n\t\t\tsetOpen(true);\n\t\t}\n\t}, [isCloud, isPending]);\n\n\tconst handleClose = (isOpen: boolean) => {\n\t\tif (data?.role === \"owner\") {\n\t\t\tsetOpen(isOpen);\n\t\t\tif (!isOpen) {\n\t\t\t\tlocalStorage.setItem(\"hasSeenCloudWelcomeModal\", \"true\"); // Establece el flag al cerrar el modal\n\t\t\t}\n\t\t}\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<Dialog open={open} onOpenChange={handleClose}>\n\t\t\t\t<DialogContent className=\"sm:max-w-xl\">\n\t\t\t\t\t<DialogHeader>\n\t\t\t\t\t\t<DialogTitle className=\"text-2xl font-semibold text-center\">\n\t\t\t\t\t\t\tWelcome to Dokploy Cloud 🎉\n\t\t\t\t\t\t</DialogTitle>\n\t\t\t\t\t\t<p className=\"text-center text-sm text-muted-foreground mt-2\">\n\t\t\t\t\t\t\tUnlock powerful features to streamline your deployments and manage\n\t\t\t\t\t\t\tprojects effortlessly.\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</DialogHeader>\n\t\t\t\t\t<div className=\"mt-4 space-y-3 text-sm text-primary \">\n\t\t\t\t\t\t<ShowBilling />\n\t\t\t\t\t</div>\n\t\t\t\t</DialogContent>\n\t\t\t</Dialog>\n\t\t</>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/certificates/add-certificate.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { HelpCircle, PlusIcon } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectGroup,\n\tSelectItem,\n\tSelectLabel,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { Textarea } from \"@/components/ui/textarea\";\nimport {\n\tTooltip,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { api } from \"@/utils/api\";\n\nconst certificateDataHolder =\n\t\"-----BEGIN CERTIFICATE-----\\nMIIFRDCCAyygAwIBAgIUEPOR47ys6VDwMVB9tYoeEka83uQwDQYJKoZIhvcNAQELBQAwGTEXMBUGA1UEAwwObWktZG9taW5pby5jb20wHhcNMjQwMzExMDQyNzU3WhcN\\n------END CERTIFICATE-----\";\n\nconst privateKeyDataHolder =\n\t\"-----BEGIN PRIVATE KEY-----\\nMIIFRDCCAyygAwIBAgIUEPOR47ys6VDwMVB9tYoeEka83uQwDQYJKoZIhvcNAQELBQAwGTEXMBUGA1UEAwwObWktZG9taW5pby5jb20wHhcNMjQwMzExMDQyNzU3WhcN\\n-----END PRIVATE KEY-----\";\n\nconst addCertificate = z.object({\n\tname: z.string().min(1, \"Name is required\"),\n\tcertificateData: z.string().min(1, \"Certificate data is required\"),\n\tprivateKey: z.string().min(1, \"Private key is required\"),\n\tautoRenew: z.boolean().optional(),\n\tserverId: z.string().optional(),\n});\n\ntype AddCertificate = z.infer<typeof addCertificate>;\n\nexport const AddCertificate = () => {\n\tconst [open, setOpen] = useState(false);\n\tconst utils = api.useUtils();\n\n\tconst { data: isCloud } = api.settings.isCloud.useQuery();\n\tconst { mutateAsync, isError, error, isPending } =\n\t\tapi.certificates.create.useMutation();\n\tconst { data: servers } = api.server.withSSHKey.useQuery();\n\tconst hasServers = servers && servers.length > 0;\n\t// Show dropdown logic based on cloud environment\n\t// Cloud: show only if there are remote servers (no Dokploy option)\n\t// Self-hosted: show only if there are remote servers (Dokploy is default, hide if no remote servers)\n\tconst shouldShowServerDropdown = hasServers;\n\n\tconst form = useForm<AddCertificate>({\n\t\tdefaultValues: {\n\t\t\tname: \"\",\n\t\t\tcertificateData: \"\",\n\t\t\tprivateKey: \"\",\n\t\t\tautoRenew: false,\n\t\t},\n\t\tresolver: zodResolver(addCertificate),\n\t});\n\tuseEffect(() => {\n\t\tform.reset();\n\t}, [form, form.formState.isSubmitSuccessful, form.reset]);\n\n\tconst onSubmit = async (data: AddCertificate) => {\n\t\tawait mutateAsync({\n\t\t\tname: data.name,\n\t\t\tcertificateData: data.certificateData,\n\t\t\tprivateKey: data.privateKey,\n\t\t\tautoRenew: data.autoRenew,\n\t\t\tserverId: data.serverId === \"dokploy\" ? undefined : data.serverId,\n\t\t\torganizationId: \"\",\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(\"Certificate Created\");\n\t\t\t\tawait utils.certificates.all.invalidate();\n\t\t\t\tsetOpen(false);\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error creating the Certificate\");\n\t\t\t});\n\t};\n\treturn (\n\t\t<Dialog open={open} onOpenChange={setOpen}>\n\t\t\t<DialogTrigger className=\"\" asChild>\n\t\t\t\t<Button>\n\t\t\t\t\t{\" \"}\n\t\t\t\t\t<PlusIcon className=\"h-4 w-4\" />\n\t\t\t\t\tAdd Certificate\n\t\t\t\t</Button>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-2xl\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Add New Certificate</DialogTitle>\n\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\tUpload or generate a certificate to secure your application\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t{isError && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tid=\"hook-form-add-certificate\"\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\tclassName=\"grid w-full gap-4 \"\n\t\t\t\t\t>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"name\"\n\t\t\t\t\t\t\trender={({ field }) => {\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Certificate Name</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input placeholder={\"My Certificate\"} {...field} />\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"certificateData\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Certificate Data</FormLabel>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Textarea\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-32\"\n\t\t\t\t\t\t\t\t\t\t\tplaceholder={certificateDataHolder}\n\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"privateKey\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Private Key</FormLabel>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Textarea\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-32\"\n\t\t\t\t\t\t\t\t\t\t\tplaceholder={privateKeyDataHolder}\n\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{shouldShowServerDropdown && (\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"serverId\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<TooltipProvider delayDuration={0}>\n\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel className=\"break-all w-fit flex flex-row gap-1 items-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSelect a Server {!isCloud && \"(Optional)\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<HelpCircle className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\n\t\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\t\tonValueChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\tdefaultValue={\n\t\t\t\t\t\t\t\t\t\t\t\tfield.value || (!isCloud ? \"dokploy\" : undefined)\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder={!isCloud ? \"Dokploy\" : \"Select a Server\"}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{!isCloud && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"dokploy\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-2 justify-between w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>Dokploy</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground text-xs self-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDefault\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t{servers?.map((server) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={server.serverId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={server.serverId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-2 justify-between w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>{server.name}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground text-xs self-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{server.ipAddress}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tServers ({servers?.length + (!isCloud ? 1 : 0)})\n\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectGroup>\n\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</form>\n\n\t\t\t\t\t<DialogFooter className=\"flex w-full flex-row !justify-end\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tisLoading={isPending}\n\t\t\t\t\t\t\tform=\"hook-form-add-certificate\"\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tCreate\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</DialogFooter>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/certificates/show-certificates.tsx",
    "content": "import { AlertCircle, Link, Loader2, ShieldCheck, Trash2 } from \"lucide-react\";\nimport { toast } from \"sonner\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { DialogAction } from \"@/components/shared/dialog-action\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport { api } from \"@/utils/api\";\nimport { AddCertificate } from \"./add-certificate\";\nimport { getCertificateChainInfo, getExpirationStatus } from \"./utils\";\n\nexport const ShowCertificates = () => {\n\tconst { mutateAsync, isPending: isRemoving } =\n\t\tapi.certificates.remove.useMutation();\n\tconst { data, isPending, refetch } = api.certificates.all.useQuery();\n\tconst { data: permissions } = api.user.getPermissions.useQuery();\n\n\treturn (\n\t\t<div className=\"w-full\">\n\t\t\t<Card className=\"h-full bg-sidebar  p-2.5 rounded-xl  max-w-5xl mx-auto\">\n\t\t\t\t<div className=\"rounded-xl bg-background shadow-md \">\n\t\t\t\t\t<CardHeader className=\"\">\n\t\t\t\t\t\t<CardTitle className=\"text-xl flex flex-row gap-2\">\n\t\t\t\t\t\t\t<ShieldCheck className=\"size-6 text-muted-foreground self-center\" />\n\t\t\t\t\t\t\tCertificates\n\t\t\t\t\t\t</CardTitle>\n\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\tCreate certificates in the Traefik directory\n\t\t\t\t\t\t</CardDescription>\n\n\t\t\t\t\t\t<AlertBlock type=\"warning\">\n\t\t\t\t\t\t\tCertificates are created in the Traefik directory. Traefik uses\n\t\t\t\t\t\t\tthese certificates to secure your applications. Using invalid\n\t\t\t\t\t\t\tcertificates can break your Traefik instance, preventing access to\n\t\t\t\t\t\t\tyour applications.\n\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<CardContent className=\"space-y-2 py-8 border-t\">\n\t\t\t\t\t\t{isPending ? (\n\t\t\t\t\t\t\t<div className=\"flex flex-row gap-2 items-center justify-center text-sm text-muted-foreground min-h-[25vh]\">\n\t\t\t\t\t\t\t\t<span>Loading...</span>\n\t\t\t\t\t\t\t\t<Loader2 className=\"animate-spin size-4\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{data?.length === 0 ? (\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col items-center gap-3  min-h-[25vh] justify-center\">\n\t\t\t\t\t\t\t\t\t\t<ShieldCheck className=\"size-8 self-center text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t<span className=\"text-base text-muted-foreground text-center\">\n\t\t\t\t\t\t\t\t\t\t\tYou don't have any certificates created\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t{permissions?.certificate.create && <AddCertificate />}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-4  min-h-[25vh]\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-4 rounded-lg \">\n\t\t\t\t\t\t\t\t\t\t\t{data?.map((certificate, index) => {\n\t\t\t\t\t\t\t\t\t\t\t\tconst expiration = getExpirationStatus(\n\t\t\t\t\t\t\t\t\t\t\t\t\tcertificate.certificateData,\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\tconst chainInfo = getCertificateChainInfo(\n\t\t\t\t\t\t\t\t\t\t\t\t\tcertificate.certificateData,\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={certificate.certificateId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center justify-between bg-sidebar p-1 w-full rounded-lg\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center justify-between p-3.5 rounded-lg bg-background border  w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center justify-between\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex gap-2 flex-col\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm font-medium\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{index + 1}. {certificate.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{chainInfo.isChain && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-1 px-1.5 py-0.5 rounded bg-muted/50\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Link className=\"size-3 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-xs text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tChain ({chainInfo.count})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={`text-xs flex items-center gap-1.5 ${expiration.className}`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{expiration.status !== \"valid\" && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<AlertCircle className=\"size-3\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{expiration.message}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{certificate.autoRenew &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\texpiration.status !== \"valid\" && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-xs text-emerald-500 ml-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(Auto-renewal enabled)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{permissions?.certificate.delete && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"Delete Certificate\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to delete this certificate?\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"destructive\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait mutateAsync({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcertificateId:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcertificate.certificateId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Certificate deleted successfully\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Error deleting certificate\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"group hover:bg-red-500/10 \"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisLoading={isRemoving}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Trash2 className=\"size-4 text-primary group-hover:text-red-500\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t{permissions?.certificate.create && (\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-2 flex-wrap w-full justify-end mr-4\">\n\t\t\t\t\t\t\t\t\t\t\t\t<AddCertificate />\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</CardContent>\n\t\t\t\t</div>\n\t\t\t</Card>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/certificates/utils.ts",
    "content": "// @ts-nocheck\n\nexport const extractExpirationDate = (certData: string): Date | null => {\n\ttry {\n\t\t// Decode PEM base64 to DER binary\n\t\tconst b64 = certData.replace(/-----[^-]+-----/g, \"\").replace(/\\s+/g, \"\");\n\t\tconst binStr = atob(b64);\n\t\tconst der = new Uint8Array(binStr.length);\n\t\tfor (let i = 0; i < binStr.length; i++) {\n\t\t\tder[i] = binStr.charCodeAt(i);\n\t\t}\n\n\t\tlet offset = 0;\n\n\t\t// Helper: read ASN.1 length field\n\t\tfunction readLength(pos: number): { length: number; offset: number } {\n\t\t\t// biome-ignore lint/style/noParameterAssign: this is for dynamic length calculation\n\t\t\tlet len = der[pos++];\n\t\t\tif (len & 0x80) {\n\t\t\t\tconst bytes = len & 0x7f;\n\t\t\t\tlen = 0;\n\t\t\t\tfor (let i = 0; i < bytes; i++) {\n\t\t\t\t\t// biome-ignore lint/style/noParameterAssign: this is for dynamic length calculation\n\t\t\t\t\tlen = (len << 8) + der[pos++];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn { length: len, offset: pos };\n\t\t}\n\n\t\t// Skip the outer certificate sequence\n\t\tif (der[offset++] !== 0x30) throw new Error(\"Expected sequence\");\n\t\t({ offset } = readLength(offset));\n\n\t\t// Skip tbsCertificate sequence\n\t\tif (der[offset++] !== 0x30) throw new Error(\"Expected tbsCertificate\");\n\t\t({ offset } = readLength(offset));\n\n\t\t// Check for optional version field (context-specific tag [0])\n\t\tif (der[offset] === 0xa0) {\n\t\t\toffset++;\n\t\t\tconst versionLen = readLength(offset);\n\t\t\toffset = versionLen.offset + versionLen.length;\n\t\t}\n\n\t\t// Skip serialNumber, signature, issuer\n\t\tfor (let i = 0; i < 3; i++) {\n\t\t\tif (der[offset] !== 0x30 && der[offset] !== 0x02)\n\t\t\t\tthrow new Error(\"Unexpected structure\");\n\t\t\toffset++;\n\t\t\tconst fieldLen = readLength(offset);\n\t\t\toffset = fieldLen.offset + fieldLen.length;\n\t\t}\n\n\t\t// Validity sequence (notBefore and notAfter)\n\t\tif (der[offset++] !== 0x30) throw new Error(\"Expected validity sequence\");\n\t\tconst validityLen = readLength(offset);\n\t\toffset = validityLen.offset;\n\n\t\t// notBefore\n\t\toffset++;\n\t\tconst notBeforeLen = readLength(offset);\n\t\toffset = notBeforeLen.offset + notBeforeLen.length;\n\n\t\t// notAfter\n\t\toffset++;\n\t\tconst notAfterLen = readLength(offset);\n\t\tconst notAfterStr = new TextDecoder().decode(\n\t\t\tder.slice(notAfterLen.offset, notAfterLen.offset + notAfterLen.length),\n\t\t);\n\n\t\t// Parse GeneralizedTime (15 chars) or UTCTime (13 chars)\n\t\tfunction parseTime(str: string): Date {\n\t\t\tif (str.length === 13) {\n\t\t\t\t// UTCTime YYMMDDhhmmssZ\n\t\t\t\tconst year = Number.parseInt(str.slice(0, 2), 10);\n\t\t\t\tconst fullYear = year < 50 ? 2000 + year : 1900 + year;\n\t\t\t\treturn new Date(\n\t\t\t\t\t`${fullYear}-${str.slice(2, 4)}-${str.slice(4, 6)}T${str.slice(6, 8)}:${str.slice(8, 10)}:${str.slice(10, 12)}Z`,\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (str.length === 15) {\n\t\t\t\t// GeneralizedTime YYYYMMDDhhmmssZ\n\t\t\t\treturn new Date(\n\t\t\t\t\t`${str.slice(0, 4)}-${str.slice(4, 6)}-${str.slice(6, 8)}T${str.slice(8, 10)}:${str.slice(10, 12)}:${str.slice(12, 14)}Z`,\n\t\t\t\t);\n\t\t\t}\n\t\t\tthrow new Error(\"Invalid ASN.1 time format\");\n\t\t}\n\n\t\treturn parseTime(notAfterStr);\n\t} catch (error) {\n\t\tconsole.error(\"Error parsing certificate:\", error);\n\t\treturn null;\n\t}\n};\n\nexport const getExpirationStatus = (certData: string) => {\n\tconst expirationDate = extractExpirationDate(certData);\n\n\tif (!expirationDate)\n\t\treturn {\n\t\t\tstatus: \"unknown\" as const,\n\t\t\tclassName: \"text-muted-foreground\",\n\t\t\tmessage: \"Could not determine expiration\",\n\t\t};\n\n\tconst now = new Date();\n\tconst daysUntilExpiration = Math.ceil(\n\t\t(expirationDate.getTime() - now.getTime()) / (1000 * 60 * 60 * 24),\n\t);\n\n\tif (daysUntilExpiration < 0) {\n\t\treturn {\n\t\t\tstatus: \"expired\" as const,\n\t\t\tclassName: \"text-red-500\",\n\t\t\tmessage: `Expired on ${expirationDate.toLocaleDateString([], {\n\t\t\t\tyear: \"numeric\",\n\t\t\t\tmonth: \"long\",\n\t\t\t\tday: \"numeric\",\n\t\t\t})}`,\n\t\t};\n\t}\n\n\tif (daysUntilExpiration <= 30) {\n\t\treturn {\n\t\t\tstatus: \"warning\" as const,\n\t\t\tclassName: \"text-yellow-500\",\n\t\t\tmessage: `Expires in ${daysUntilExpiration} days`,\n\t\t};\n\t}\n\n\treturn {\n\t\tstatus: \"valid\" as const,\n\t\tclassName: \"text-muted-foreground\",\n\t\tmessage: `Expires ${expirationDate.toLocaleDateString([], {\n\t\t\tyear: \"numeric\",\n\t\t\tmonth: \"long\",\n\t\t\tday: \"numeric\",\n\t\t})}`,\n\t};\n};\n\nexport const getCertificateChainInfo = (certData: string) => {\n\tconst certCount = (certData.match(/-----BEGIN CERTIFICATE-----/g) || [])\n\t\t.length;\n\treturn certCount > 1\n\t\t? {\n\t\t\t\tisChain: true,\n\t\t\t\tcount: certCount,\n\t\t\t}\n\t\t: {\n\t\t\t\tisChain: false,\n\t\t\t\tcount: 1,\n\t\t\t};\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/cluster/nodes/add-node.tsx",
    "content": "import { ExternalLink, PlusIcon } from \"lucide-react\";\nimport Link from \"next/link\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport { Tabs, TabsContent, TabsList, TabsTrigger } from \"@/components/ui/tabs\";\nimport { AddManager } from \"./manager/add-manager\";\nimport { AddWorker } from \"./workers/add-worker\";\n\ninterface Props {\n\tserverId?: string;\n}\n\nexport const AddNode = ({ serverId }: Props) => {\n\treturn (\n\t\t<Dialog>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t<Button className=\"w-full cursor-pointer space-x-3\">\n\t\t\t\t\t<PlusIcon className=\"h-4 w-4\" />\n\t\t\t\t\tAdd Node\n\t\t\t\t</Button>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-4xl\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Add Node</DialogTitle>\n\t\t\t\t\t<DialogDescription className=\"flex flex-col gap-2\">\n\t\t\t\t\t\tFollow the steps to add a new node to your cluster, before you start\n\t\t\t\t\t\tusing this feature, you need to understand how docker swarm works.{\" \"}\n\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\thref=\"https://docs.docker.com/engine/swarm/\"\n\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\tclassName=\"text-primary flex flex-row gap-2 items-center\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tDocker Swarm\n\t\t\t\t\t\t\t<ExternalLink className=\"h-4 w-4\" />\n\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\thref=\"https://docs.docker.com/engine/swarm/how-swarm-mode-works/nodes/\"\n\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\tclassName=\"text-primary flex flex-row gap-2 items-center\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tArchitecture\n\t\t\t\t\t\t\t<ExternalLink className=\"h-4 w-4\" />\n\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t<AlertBlock type=\"warning\">\n\t\t\t\t\t\t\tMake sure you use the same architecture as the node you are\n\t\t\t\t\t\t\tadding.\n\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t<Tabs defaultValue=\"worker\">\n\t\t\t\t\t\t<TabsList>\n\t\t\t\t\t\t\t<TabsTrigger value=\"worker\">Worker</TabsTrigger>\n\t\t\t\t\t\t\t<TabsTrigger value=\"manager\">Manager</TabsTrigger>\n\t\t\t\t\t\t</TabsList>\n\t\t\t\t\t\t<TabsContent value=\"worker\" className=\"pt-4 overflow-hidden\">\n\t\t\t\t\t\t\t<AddWorker serverId={serverId} />\n\t\t\t\t\t\t</TabsContent>\n\t\t\t\t\t\t<TabsContent value=\"manager\" className=\"pt-4 overflow-hidden\">\n\t\t\t\t\t\t\t<AddManager serverId={serverId} />\n\t\t\t\t\t\t</TabsContent>\n\t\t\t\t\t</Tabs>\n\t\t\t\t</div>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/cluster/nodes/manager/add-manager.tsx",
    "content": "import copy from \"copy-to-clipboard\";\nimport { CopyIcon, Loader2 } from \"lucide-react\";\nimport { toast } from \"sonner\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { CardContent } from \"@/components/ui/card\";\nimport {\n\tDialogDescription,\n\tDialogHeader,\n\tDialogTitle,\n} from \"@/components/ui/dialog\";\nimport { api } from \"@/utils/api\";\n\ninterface Props {\n\tserverId?: string;\n}\n\nexport const AddManager = ({ serverId }: Props) => {\n\tconst { data, isPending, error, isError } = api.cluster.addManager.useQuery({\n\t\tserverId,\n\t});\n\n\treturn (\n\t\t<>\n\t\t\t<CardContent className=\"sm:max-w-4xl  flex flex-col gap-4 px-0\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Add a new manager</DialogTitle>\n\t\t\t\t\t<DialogDescription>Add a new manager</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t{isError && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\t\t\t\t{isPending ? (\n\t\t\t\t\t<Loader2 className=\"w-full animate-spin text-muted-foreground\" />\n\t\t\t\t) : (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<div className=\"flex flex-col gap-2.5 text-sm\">\n\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t1. Go to your new server and run the following command\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span className=\"bg-muted rounded-lg p-2 flex justify-between\">\n\t\t\t\t\t\t\t\tcurl https://get.docker.com | sh -s -- --version {data?.version}\n\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\tclassName=\"self-center\"\n\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\tcopy(\n\t\t\t\t\t\t\t\t\t\t\t`curl https://get.docker.com | sh -s -- --version ${data?.version}`,\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\ttoast.success(\"Copied to clipboard\");\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<CopyIcon className=\"h-4 w-4 cursor-pointer\" />\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div className=\"flex flex-col gap-2.5 text-sm\">\n\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t2. Run the following command to add the node(manager) to your\n\t\t\t\t\t\t\t\tcluster\n\t\t\t\t\t\t\t</span>\n\n\t\t\t\t\t\t\t<span className=\"bg-muted rounded-lg p-2  flex\">\n\t\t\t\t\t\t\t\t{data?.command}\n\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\tclassName=\"self-start\"\n\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\tcopy(data?.command || \"\");\n\t\t\t\t\t\t\t\t\t\ttoast.success(\"Copied to clipboard\");\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<CopyIcon className=\"h-4 w-4 cursor-pointer\" />\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</>\n\t\t\t\t)}\n\t\t\t</CardContent>\n\t\t</>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/cluster/nodes/show-node-data.tsx",
    "content": "import { CodeEditor } from \"@/components/shared/code-editor\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport { DropdownMenuItem } from \"@/components/ui/dropdown-menu\";\n\ninterface Props {\n\tdata: unknown;\n}\n\nexport const ShowNodeData = ({ data }: Props) => {\n\treturn (\n\t\t<Dialog>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t<DropdownMenuItem\n\t\t\t\t\tclassName=\"w-full cursor-pointer\"\n\t\t\t\t\tonSelect={(e) => e.preventDefault()}\n\t\t\t\t>\n\t\t\t\t\tView Config\n\t\t\t\t</DropdownMenuItem>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className={\"sm:max-w-5xl\"}>\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Node Config</DialogTitle>\n\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\tSee in detail the metadata of this node\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t<div className=\"text-wrap rounded-lg border p-4 text-sm sm:max-w-[59rem] bg-card\">\n\t\t\t\t\t<code>\n\t\t\t\t\t\t<pre className=\"whitespace-pre-wrap break-words\">\n\t\t\t\t\t\t\t<CodeEditor\n\t\t\t\t\t\t\t\tlanguage=\"json\"\n\t\t\t\t\t\t\t\tlineWrapping\n\t\t\t\t\t\t\t\tlineNumbers={false}\n\t\t\t\t\t\t\t\treadOnly\n\t\t\t\t\t\t\t\tvalue={JSON.stringify(data, null, 2)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</pre>\n\t\t\t\t\t</code>\n\t\t\t\t</div>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/cluster/nodes/show-nodes-modal.tsx",
    "content": "import { useState } from \"react\";\nimport { Dialog, DialogContent, DialogTrigger } from \"@/components/ui/dialog\";\nimport { DropdownMenuItem } from \"@/components/ui/dropdown-menu\";\nimport { ShowNodes } from \"./show-nodes\";\n\ninterface Props {\n\tserverId: string;\n}\n\nexport const ShowNodesModal = ({ serverId }: Props) => {\n\tconst [isOpen, setIsOpen] = useState(false);\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t<DropdownMenuItem\n\t\t\t\t\tclassName=\"w-full cursor-pointer \"\n\t\t\t\t\tonSelect={(e) => e.preventDefault()}\n\t\t\t\t>\n\t\t\t\t\tShow Swarm Nodes\n\t\t\t\t</DropdownMenuItem>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"min-w-[70vw]\">\n\t\t\t\t<div className=\"grid w-full gap-1\">\n\t\t\t\t\t<ShowNodes serverId={serverId} />\n\t\t\t\t</div>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/cluster/nodes/show-nodes.tsx",
    "content": "import {\n\tBoxes,\n\tHelpCircle,\n\tLoader2,\n\tLockIcon,\n\tMoreHorizontal,\n} from \"lucide-react\";\nimport { toast } from \"sonner\";\nimport { DateTooltip } from \"@/components/shared/date-tooltip\";\nimport { DialogAction } from \"@/components/shared/dialog-action\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\tDropdownMenu,\n\tDropdownMenuContent,\n\tDropdownMenuItem,\n\tDropdownMenuLabel,\n\tDropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\nimport {\n\tTable,\n\tTableBody,\n\tTableCaption,\n\tTableCell,\n\tTableHead,\n\tTableHeader,\n\tTableRow,\n} from \"@/components/ui/table\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { api } from \"@/utils/api\";\nimport { AddNode } from \"./add-node\";\nimport { ShowNodeData } from \"./show-node-data\";\n\ninterface Props {\n\tserverId?: string;\n}\n\nexport const ShowNodes = ({ serverId }: Props) => {\n\tconst { data, isPending, refetch } = api.cluster.getNodes.useQuery({\n\t\tserverId,\n\t});\n\tconst { data: registry } = api.registry.all.useQuery();\n\n\tconst { mutateAsync: deleteNode } = api.cluster.removeWorker.useMutation();\n\n\tconst haveAtLeastOneRegistry = !!(registry && registry?.length > 0);\n\treturn (\n\t\t<div className=\"w-full\">\n\t\t\t<Card className=\"h-full bg-sidebar  p-2.5 rounded-xl  max-w-5xl mx-auto\">\n\t\t\t\t<div className=\"rounded-xl bg-background shadow-md \">\n\t\t\t\t\t<CardHeader className=\"flex flex-row gap-2 justify-between w-full items-center flex-wrap\">\n\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t<CardTitle className=\"text-xl flex flex-row gap-2\">\n\t\t\t\t\t\t\t\t<Boxes className=\"size-6 text-muted-foreground self-center\" />\n\t\t\t\t\t\t\t\tCluster\n\t\t\t\t\t\t\t</CardTitle>\n\t\t\t\t\t\t\t<CardDescription>Add nodes to your cluster</CardDescription>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{haveAtLeastOneRegistry && (\n\t\t\t\t\t\t\t<div className=\"flex flex-row gap-2\">\n\t\t\t\t\t\t\t\t<AddNode serverId={serverId} />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<CardContent className=\"space-y-2 py-8 border-t min-h-[35vh]\">\n\t\t\t\t\t\t{isPending ? (\n\t\t\t\t\t\t\t<div className=\"flex items-center justify-center w-full h-[40vh]\">\n\t\t\t\t\t\t\t\t<Loader2 className=\"size-8 animate-spin text-muted-foreground\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : haveAtLeastOneRegistry ? (\n\t\t\t\t\t\t\t<div className=\"grid md:grid-cols-1 gap-4\">\n\t\t\t\t\t\t\t\t<Table>\n\t\t\t\t\t\t\t\t\t<TableCaption>\n\t\t\t\t\t\t\t\t\t\tA list of your managers / workers.\n\t\t\t\t\t\t\t\t\t</TableCaption>\n\t\t\t\t\t\t\t\t\t<TableHeader>\n\t\t\t\t\t\t\t\t\t\t<TableRow>\n\t\t\t\t\t\t\t\t\t\t\t<TableHead className=\"text-left\">Hostname</TableHead>\n\t\t\t\t\t\t\t\t\t\t\t<TableHead className=\"text-right\">Status</TableHead>\n\t\t\t\t\t\t\t\t\t\t\t<TableHead className=\"text-right\">Role</TableHead>\n\t\t\t\t\t\t\t\t\t\t\t<TableHead className=\"text-right\">Availability</TableHead>\n\t\t\t\t\t\t\t\t\t\t\t<TableHead className=\"text-right\">\n\t\t\t\t\t\t\t\t\t\t\t\tEngine Version\n\t\t\t\t\t\t\t\t\t\t\t</TableHead>\n\t\t\t\t\t\t\t\t\t\t\t<TableHead className=\"text-right\">Created</TableHead>\n\n\t\t\t\t\t\t\t\t\t\t\t<TableHead className=\"text-right\">Actions</TableHead>\n\t\t\t\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t\t\t\t</TableHeader>\n\t\t\t\t\t\t\t\t\t<TableBody>\n\t\t\t\t\t\t\t\t\t\t{data?.map((node) => {\n\t\t\t\t\t\t\t\t\t\t\tconst isManager = node.Spec.Role === \"manager\";\n\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t<TableRow key={node.ID}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TableCell className=\"text-left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{node.Description.Hostname}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TableCell className=\"text-right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{node.Status.State}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TableCell className=\"text-right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant={isManager ? \"default\" : \"secondary\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{node?.Spec?.Role}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TableCell className=\"text-right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{node.Spec.Availability}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TableCell>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TableCell className=\"text-right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{node?.Description.Engine.EngineVersion}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TableCell>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TableCell className=\"text-right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DateTooltip\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdate={node.CreatedAt}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-sm\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCreated{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DateTooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TableCell className=\"text-right flex justify-end\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DropdownMenu>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DropdownMenuTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button variant=\"ghost\" className=\"h-8 w-8 p-0\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"sr-only\">Open menu</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<MoreHorizontal className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DropdownMenuTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DropdownMenuContent align=\"end\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DropdownMenuLabel>Actions</DropdownMenuLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ShowNodeData data={node} />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{!node?.ManagerStatus?.Leader && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"Delete Node\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to delete this node from the cluster?\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"destructive\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait deleteNode({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnodeId: node.ID,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tserverId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Node deleted successfully\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error deleting node\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonSelect={(e) => e.preventDefault()}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDelete\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DropdownMenuContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DropdownMenu>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t</TableBody>\n\t\t\t\t\t\t\t\t</Table>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<div className=\"flex flex-col items-center gap-3\">\n\t\t\t\t\t\t\t\t<LockIcon className=\"size-8 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-2\">\n\t\t\t\t\t\t\t\t\t<span className=\"text-base text-muted-foreground \">\n\t\t\t\t\t\t\t\t\t\tTo add nodes to your cluster, you need to configure at least\n\t\t\t\t\t\t\t\t\t\tone registry.\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t<TooltipProvider delayDuration={0}>\n\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger className=\"self-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t<HelpCircle className=\"size-5 text-muted-foreground \" />\n\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\tNodes need a registry to pull images from.\n\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t<ul className=\"list-disc list-inside text-sm text-muted-foreground border p-4 rounded-lg flex flex-col gap-1.5 mt-2.5\">\n\t\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t\t<strong>Docker Registry:</strong> Use custom registries like\n\t\t\t\t\t\t\t\t\t\tDocker Hub, DigitalOcean Registry, etc.\n\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</CardContent>\n\t\t\t\t</div>\n\t\t\t</Card>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/cluster/nodes/workers/add-worker.tsx",
    "content": "import copy from \"copy-to-clipboard\";\nimport { CopyIcon, Loader2 } from \"lucide-react\";\nimport { toast } from \"sonner\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { CardContent } from \"@/components/ui/card\";\nimport {\n\tDialogDescription,\n\tDialogHeader,\n\tDialogTitle,\n} from \"@/components/ui/dialog\";\nimport { api } from \"@/utils/api\";\n\ninterface Props {\n\tserverId?: string;\n}\n\nexport const AddWorker = ({ serverId }: Props) => {\n\tconst { data, isPending, error, isError } = api.cluster.addWorker.useQuery({\n\t\tserverId,\n\t});\n\n\treturn (\n\t\t<CardContent className=\"sm:max-w-4xl   flex flex-col gap-4 px-0\">\n\t\t\t<DialogHeader>\n\t\t\t\t<DialogTitle>Add a new worker</DialogTitle>\n\t\t\t\t<DialogDescription>Add a new worker</DialogDescription>\n\t\t\t</DialogHeader>\n\t\t\t{isError && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\t\t\t{isPending ? (\n\t\t\t\t<Loader2 className=\"w-full animate-spin text-muted-foreground\" />\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t<div className=\"flex flex-col gap-2.5 text-sm\">\n\t\t\t\t\t\t<span>1. Go to your new server and run the following command</span>\n\t\t\t\t\t\t<span className=\"bg-muted rounded-lg p-2 flex justify-between\">\n\t\t\t\t\t\t\tcurl https://get.docker.com | sh -s -- --version {data?.version}\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tclassName=\"self-center\"\n\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\tcopy(\n\t\t\t\t\t\t\t\t\t\t`curl https://get.docker.com | sh -s -- --version ${data?.version}`,\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\ttoast.success(\"Copied to clipboard\");\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<CopyIcon className=\"h-4 w-4 cursor-pointer\" />\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div className=\"flex flex-col gap-2.5 text-sm\">\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t2. Run the following command to add the node(worker) to your\n\t\t\t\t\t\t\tcluster\n\t\t\t\t\t\t</span>\n\n\t\t\t\t\t\t<span className=\"bg-muted rounded-lg p-2  flex\">\n\t\t\t\t\t\t\t{data?.command}\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tclassName=\"self-start\"\n\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\tcopy(data?.command || \"\");\n\t\t\t\t\t\t\t\t\ttoast.success(\"Copied to clipboard\");\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<CopyIcon className=\"h-4 w-4 cursor-pointer\" />\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t</>\n\t\t\t)}\n\t\t</CardContent>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/cluster/registry/handle-registry.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { AlertTriangle, PenBoxIcon, PlusIcon } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectGroup,\n\tSelectItem,\n\tSelectLabel,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { api } from \"@/utils/api\";\n\nconst AddRegistrySchema = z.object({\n\tregistryName: z.string().min(1, {\n\t\tmessage: \"Registry name is required\",\n\t}),\n\tusername: z.string().min(1, {\n\t\tmessage: \"Username is required\",\n\t}),\n\tpassword: z.string(),\n\tregistryUrl: z\n\t\t.string()\n\t\t.optional()\n\t\t.refine(\n\t\t\t(val) => {\n\t\t\t\t// If empty or undefined, skip validation (field is optional)\n\t\t\t\tif (!val || val.trim().length === 0) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Validate that it's a valid hostname (no protocol, no path, optional port)\n\t\t\t\t// Valid formats: example.com, registry.example.com, [::1], example.com:5000\n\t\t\t\t// Invalid: https://example.com, example.com/path\n\t\t\t\tconst trimmed = val.trim();\n\t\t\t\t// Check for protocol or path - these are not allowed\n\t\t\t\tif (/^https?:\\/\\//i.test(trimmed) || trimmed.includes(\"/\")) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t// Basic hostname validation: allow alphanumeric, dots, hyphens, underscores, and IPv6 in brackets\n\t\t\t\t// Allow optional port at the end\n\t\t\t\tconst hostnameRegex =\n\t\t\t\t\t/^(?:\\[[^\\]]+\\]|[a-zA-Z0-9](?:[a-zA-Z0-9._-]{0,253}[a-zA-Z0-9])?)(?::\\d+)?$/;\n\t\t\t\treturn hostnameRegex.test(trimmed);\n\t\t\t},\n\t\t\t{\n\t\t\t\tmessage:\n\t\t\t\t\t\"Invalid registry URL. Please enter only the hostname (e.g., example.com or registry.example.com). Do not include protocol (https://) or paths.\",\n\t\t\t},\n\t\t),\n\timagePrefix: z.string(),\n\tserverId: z.string().optional(),\n\tisEditing: z.boolean().optional(),\n});\n\ntype AddRegistry = z.infer<typeof AddRegistrySchema>;\n\ninterface Props {\n\tregistryId?: string;\n}\n\nexport const HandleRegistry = ({ registryId }: Props) => {\n\tconst utils = api.useUtils();\n\tconst [isOpen, setIsOpen] = useState(false);\n\n\tconst { data: registry } = api.registry.one.useQuery(\n\t\t{\n\t\t\tregistryId: registryId || \"\",\n\t\t},\n\t\t{\n\t\t\tenabled: !!registryId,\n\t\t},\n\t);\n\n\tconst { data: isCloud } = api.settings.isCloud.useQuery();\n\n\tconst { mutateAsync, error, isError } = registryId\n\t\t? api.registry.update.useMutation()\n\t\t: api.registry.create.useMutation();\n\tconst { data: deployServers } = api.server.withSSHKey.useQuery();\n\tconst { data: buildServers } = api.server.buildServers.useQuery();\n\tconst servers = [...(deployServers || []), ...(buildServers || [])];\n\tconst {\n\t\tmutateAsync: testRegistry,\n\t\tisPending,\n\t\terror: testRegistryError,\n\t\tisError: testRegistryIsError,\n\t} = api.registry.testRegistry.useMutation();\n\tconst {\n\t\tmutateAsync: testRegistryById,\n\t\tisPending: isPendingById,\n\t\terror: testRegistryByIdError,\n\t\tisError: testRegistryByIdIsError,\n\t} = api.registry.testRegistryById.useMutation();\n\tconst form = useForm<AddRegistry>({\n\t\tdefaultValues: {\n\t\t\tusername: \"\",\n\t\t\tpassword: \"\",\n\t\t\tregistryUrl: \"\",\n\t\t\timagePrefix: \"\",\n\t\t\tregistryName: \"\",\n\t\t\tserverId: \"\",\n\t\t\tisEditing: !!registryId,\n\t\t},\n\t\tresolver: zodResolver(\n\t\t\tAddRegistrySchema.refine(\n\t\t\t\t(data) => {\n\t\t\t\t\t// When creating a new registry, password is required\n\t\t\t\t\tif (\n\t\t\t\t\t\t!data.isEditing &&\n\t\t\t\t\t\t(!data.password || data.password.length === 0)\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\treturn true;\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmessage: \"Password is required\",\n\t\t\t\t\tpath: [\"password\"],\n\t\t\t\t},\n\t\t\t),\n\t\t),\n\t});\n\n\tconst password = form.watch(\"password\");\n\tconst username = form.watch(\"username\");\n\tconst registryUrl = form.watch(\"registryUrl\");\n\tconst registryName = form.watch(\"registryName\");\n\tconst imagePrefix = form.watch(\"imagePrefix\");\n\tconst serverId = form.watch(\"serverId\");\n\tconst selectedServer = servers?.find(\n\t\t(server) => server.serverId === serverId,\n\t);\n\n\tuseEffect(() => {\n\t\tif (registry) {\n\t\t\tform.reset({\n\t\t\t\tusername: registry.username,\n\t\t\t\tpassword: \"\",\n\t\t\t\tregistryUrl: registry.registryUrl,\n\t\t\t\timagePrefix: registry.imagePrefix || \"\",\n\t\t\t\tregistryName: registry.registryName,\n\t\t\t\tisEditing: true,\n\t\t\t});\n\t\t} else {\n\t\t\tform.reset({\n\t\t\t\tusername: \"\",\n\t\t\t\tpassword: \"\",\n\t\t\t\tregistryUrl: \"\",\n\t\t\t\timagePrefix: \"\",\n\t\t\t\tserverId: \"\",\n\t\t\t\tisEditing: false,\n\t\t\t});\n\t\t}\n\t}, [form, form.reset, form.formState.isSubmitSuccessful, registry]);\n\n\tconst onSubmit = async (data: AddRegistry) => {\n\t\tconst payload: any = {\n\t\t\tregistryName: data.registryName,\n\t\t\tusername: data.username,\n\t\t\tregistryUrl: data.registryUrl || \"\",\n\t\t\tregistryType: \"cloud\",\n\t\t\timagePrefix: data.imagePrefix,\n\t\t\tserverId: data.serverId,\n\t\t\tregistryId: registryId || \"\",\n\t\t};\n\n\t\t// Only include password if it's been provided (not empty)\n\t\t// When editing, empty password means \"keep the existing password\"\n\t\tif (data.password && data.password.length > 0) {\n\t\t\tpayload.password = data.password;\n\t\t}\n\n\t\tawait mutateAsync(payload)\n\t\t\t.then(async (_data) => {\n\t\t\t\tawait utils.registry.all.invalidate();\n\t\t\t\ttoast.success(registryId ? \"Registry updated\" : \"Registry added\");\n\t\t\t\tsetIsOpen(false);\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\n\t\t\t\t\tregistryId ? \"Error updating a registry\" : \"Error adding a registry\",\n\t\t\t\t);\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t{registryId ? (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\tclassName=\"group hover:bg-blue-500/10 \"\n\t\t\t\t\t>\n\t\t\t\t\t\t<PenBoxIcon className=\"size-3.5  text-primary group-hover:text-blue-500\" />\n\t\t\t\t\t</Button>\n\t\t\t\t) : (\n\t\t\t\t\t<Button className=\"cursor-pointer space-x-3\">\n\t\t\t\t\t\t<PlusIcon className=\"h-4 w-4\" />\n\t\t\t\t\t\tAdd Registry\n\t\t\t\t\t</Button>\n\t\t\t\t)}\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-2xl\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Add a external registry</DialogTitle>\n\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\tFill the next fields to add a external registry.\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t{(isError || testRegistryIsError || testRegistryByIdIsError) && (\n\t\t\t\t\t<div className=\"flex flex-row gap-4 rounded-lg bg-red-50 p-2 dark:bg-red-950\">\n\t\t\t\t\t\t<AlertTriangle className=\"text-red-600 dark:text-red-400\" />\n\t\t\t\t\t\t<span className=\"text-sm text-red-600 dark:text-red-400\">\n\t\t\t\t\t\t\t{testRegistryError?.message ||\n\t\t\t\t\t\t\t\ttestRegistryByIdError?.message ||\n\t\t\t\t\t\t\t\terror?.message ||\n\t\t\t\t\t\t\t\t\"\"}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\tclassName=\"grid grid-cols-1 sm:grid-cols-2 w-full gap-4\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"registryName\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Registry Name</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"Registry Name\" {...field} />\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"username\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Username</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Username\"\n\t\t\t\t\t\t\t\t\t\t\t\tautoComplete=\"username\"\n\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"password\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Password{registryId && \" (Optional)\"}</FormLabel>\n\t\t\t\t\t\t\t\t\t\t{registryId && (\n\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\tLeave blank to keep existing password. Enter new\n\t\t\t\t\t\t\t\t\t\t\t\tpassword to test or update it.\n\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder={\n\t\t\t\t\t\t\t\t\t\t\t\t\tregistryId\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Leave blank to keep existing\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Password\"\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tautoComplete=\"one-time-code\"\n\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\ttype=\"password\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"imagePrefix\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Image Prefix</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input {...field} placeholder=\"Image Prefix\" />\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"flex flex-col gap-4  col-span-2\">\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"registryUrl\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Registry URL</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\tEnter only the hostname (e.g.,\n\t\t\t\t\t\t\t\t\t\t\taws_account_id.dkr.ecr.us-west-2.amazonaws.com).\n\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"aws_account_id.dkr.ecr.us-west-2.amazonaws.com\"\n\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div className=\"col-span-2\">\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"serverId\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Server {!isCloud && \"(Optional)\"}</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t{!isCloud ? (\n\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{serverId && serverId !== \"none\" && selectedServer ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAuthentication will be performed on{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<strong>{selectedServer.name}</strong>. This\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tregistry will be available on this server.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tChoose where to authenticate with the registry. By\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdefault, authentication occurs on the Dokploy\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tserver. Select a specific server to authenticate\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfrom that server instead.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{serverId && serverId !== \"none\" && selectedServer ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAuthentication will be performed on{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<strong>{selectedServer.name}</strong>. This\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tregistry will be available on this server.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSelect a server to authenticate with the registry.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tThe authentication will be performed from the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tselected server.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\t\t\tonValueChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\tdefaultValue={field.value}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger className=\"w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a server\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{deployServers && deployServers.length > 0 && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectLabel>Deploy Servers</SelectLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{deployServers.map((server) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={server.serverId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={server.serverId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{server.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t{buildServers && buildServers.length > 0 && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectLabel>Build Servers</SelectLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{buildServers.map((server) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={server.serverId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={server.serverId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{server.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value={\"none\"}>None</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<DialogFooter className=\"flex flex-col w-full sm:justify-between gap-4 flex-wrap sm:flex-col col-span-2\">\n\t\t\t\t\t\t\t<div className=\"flex flex-row gap-2 justify-between\">\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\tvariant={\"secondary\"}\n\t\t\t\t\t\t\t\t\tisLoading={isPending || isPendingById}\n\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t// When editing with empty password, use the existing password from DB\n\t\t\t\t\t\t\t\t\t\tif (registryId && (!password || password.length === 0)) {\n\t\t\t\t\t\t\t\t\t\t\tawait testRegistryById({\n\t\t\t\t\t\t\t\t\t\t\t\tregistryId: registryId || \"\",\n\t\t\t\t\t\t\t\t\t\t\t\t...(serverId && { serverId }),\n\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t.then((data) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (data) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Registry Tested Successfully\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Registry Test Failed\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error testing the registry\");\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// When creating, password is required\n\t\t\t\t\t\t\t\t\t\tif (!registryId && (!password || password.length === 0)) {\n\t\t\t\t\t\t\t\t\t\t\tform.setError(\"password\", {\n\t\t\t\t\t\t\t\t\t\t\t\ttype: \"manual\",\n\t\t\t\t\t\t\t\t\t\t\t\tmessage: \"Password is required\",\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// When creating or editing with new password, validate and test with provided credentials\n\t\t\t\t\t\t\t\t\t\tconst validationResult = AddRegistrySchema.safeParse({\n\t\t\t\t\t\t\t\t\t\t\tusername,\n\t\t\t\t\t\t\t\t\t\t\tpassword,\n\t\t\t\t\t\t\t\t\t\t\tregistryUrl,\n\t\t\t\t\t\t\t\t\t\t\tregistryName: \"Dokploy Registry\",\n\t\t\t\t\t\t\t\t\t\t\timagePrefix,\n\t\t\t\t\t\t\t\t\t\t\tserverId,\n\t\t\t\t\t\t\t\t\t\t\tisEditing: !!registryId,\n\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\tif (!validationResult.success) {\n\t\t\t\t\t\t\t\t\t\t\tfor (const issue of validationResult.error.issues) {\n\t\t\t\t\t\t\t\t\t\t\t\tform.setError(issue.path[0] as any, {\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype: \"manual\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tmessage: issue.message,\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tawait testRegistry({\n\t\t\t\t\t\t\t\t\t\t\tusername: username,\n\t\t\t\t\t\t\t\t\t\t\tpassword: password,\n\t\t\t\t\t\t\t\t\t\t\tregistryUrl: registryUrl || \"\",\n\t\t\t\t\t\t\t\t\t\t\tregistryName: registryName,\n\t\t\t\t\t\t\t\t\t\t\tregistryType: \"cloud\",\n\t\t\t\t\t\t\t\t\t\t\timagePrefix: imagePrefix,\n\t\t\t\t\t\t\t\t\t\t\tserverId: serverId,\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t.then((data) => {\n\t\t\t\t\t\t\t\t\t\t\t\tif (data) {\n\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Registry Tested Successfully\");\n\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Registry Test Failed\");\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error testing the registry\");\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tTest Registry\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t<Button isLoading={form.formState.isSubmitting} type=\"submit\">\n\t\t\t\t\t\t\t\t\t{registryId ? \"Update\" : \"Create\"}\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</DialogFooter>\n\t\t\t\t\t</form>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/cluster/registry/show-registry.tsx",
    "content": "import { Loader2, Package, Trash2 } from \"lucide-react\";\nimport { toast } from \"sonner\";\nimport { DialogAction } from \"@/components/shared/dialog-action\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport { api } from \"@/utils/api\";\nimport { HandleRegistry } from \"./handle-registry\";\n\nexport const ShowRegistry = () => {\n\tconst { mutateAsync, isPending: isRemoving } =\n\t\tapi.registry.remove.useMutation();\n\tconst { data, isPending, refetch } = api.registry.all.useQuery();\n\tconst { data: permissions } = api.user.getPermissions.useQuery();\n\n\treturn (\n\t\t<div className=\"w-full\">\n\t\t\t<Card className=\"h-full bg-sidebar  p-2.5 rounded-xl  max-w-5xl mx-auto\">\n\t\t\t\t<div className=\"rounded-xl bg-background shadow-md \">\n\t\t\t\t\t<CardHeader className=\"\">\n\t\t\t\t\t\t<CardTitle className=\"text-xl flex flex-row gap-2\">\n\t\t\t\t\t\t\t<Package className=\"size-6 text-muted-foreground self-center\" />\n\t\t\t\t\t\t\tDocker Registry\n\t\t\t\t\t\t</CardTitle>\n\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\tManage your Docker Registry configurations\n\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<CardContent className=\"space-y-2 py-8 border-t\">\n\t\t\t\t\t\t{isPending ? (\n\t\t\t\t\t\t\t<div className=\"flex flex-row gap-2 items-center justify-center text-sm text-muted-foreground min-h-[25vh]\">\n\t\t\t\t\t\t\t\t<span>Loading...</span>\n\t\t\t\t\t\t\t\t<Loader2 className=\"animate-spin size-4\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{data?.length === 0 ? (\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col items-center gap-3  min-h-[25vh] justify-center\">\n\t\t\t\t\t\t\t\t\t\t<Package className=\"size-8 self-center text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t<span className=\"text-base text-muted-foreground text-center\">\n\t\t\t\t\t\t\t\t\t\t\tYou don't have any registry configurations\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t{permissions?.registry.create && <HandleRegistry />}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-4  min-h-[25vh]\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-4 rounded-lg \">\n\t\t\t\t\t\t\t\t\t\t\t{data?.map((registry, index) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={registry.registryId}\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center justify-between bg-sidebar p-1 w-full rounded-lg\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center justify-between p-3.5 rounded-lg bg-background border  w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center justify-between\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex gap-2 flex-col\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm font-medium\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{index + 1}. {registry.registryName}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{registry.registryUrl && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"text-xs text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{registry.registryUrl}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<HandleRegistry\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tregistryId={registry.registryId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{permissions?.registry.delete && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"Delete Registry\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to delete this registry configuration?\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"destructive\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait mutateAsync({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tregistryId: registry.registryId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Registry configuration deleted successfully\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Error deleting registry configuration\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"group hover:bg-red-500/10 \"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisLoading={isRemoving}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Trash2 className=\"size-4 text-primary group-hover:text-red-500\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t{permissions?.registry.create && (\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-2 flex-wrap w-full justify-end mr-4\">\n\t\t\t\t\t\t\t\t\t\t\t\t<HandleRegistry />\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</CardContent>\n\t\t\t\t</div>\n\t\t\t</Card>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/destination/constants.ts",
    "content": "export const S3_PROVIDERS: Array<{\n\tkey: string;\n\tname: string;\n}> = [\n\t{\n\t\tkey: \"AWS\",\n\t\tname: \"Amazon Web Services (AWS) S3\",\n\t},\n\t{\n\t\tkey: \"Alibaba\",\n\t\tname: \"Alibaba Cloud Object Storage System (OSS) formerly Aliyun\",\n\t},\n\t{\n\t\tkey: \"ArvanCloud\",\n\t\tname: \"Arvan Cloud Object Storage (AOS)\",\n\t},\n\t{\n\t\tkey: \"Ceph\",\n\t\tname: \"Ceph Object Storage\",\n\t},\n\t{\n\t\tkey: \"ChinaMobile\",\n\t\tname: \"China Mobile Ecloud Elastic Object Storage (EOS)\",\n\t},\n\t{\n\t\tkey: \"Cloudflare\",\n\t\tname: \"Cloudflare R2 Storage\",\n\t},\n\t{\n\t\tkey: \"DigitalOcean\",\n\t\tname: \"DigitalOcean Spaces\",\n\t},\n\t{\n\t\tkey: \"Dreamhost\",\n\t\tname: \"Dreamhost DreamObjects\",\n\t},\n\t{\n\t\tkey: \"GCS\",\n\t\tname: \"Google Cloud Storage\",\n\t},\n\t{\n\t\tkey: \"HuaweiOBS\",\n\t\tname: \"Huawei Object Storage Service\",\n\t},\n\t{\n\t\tkey: \"IBMCOS\",\n\t\tname: \"IBM COS S3\",\n\t},\n\t{\n\t\tkey: \"IDrive\",\n\t\tname: \"IDrive e2\",\n\t},\n\t{\n\t\tkey: \"IONOS\",\n\t\tname: \"IONOS Cloud\",\n\t},\n\t{\n\t\tkey: \"LyveCloud\",\n\t\tname: \"Seagate Lyve Cloud\",\n\t},\n\t{\n\t\tkey: \"Leviia\",\n\t\tname: \"Leviia Object Storage\",\n\t},\n\t{\n\t\tkey: \"Liara\",\n\t\tname: \"Liara Object Storage\",\n\t},\n\t{\n\t\tkey: \"Linode\",\n\t\tname: \"Linode Object Storage\",\n\t},\n\t{\n\t\tkey: \"Magalu\",\n\t\tname: \"Magalu Object Storage\",\n\t},\n\t{\n\t\tkey: \"Minio\",\n\t\tname: \"Minio Object Storage\",\n\t},\n\t{\n\t\tkey: \"Netease\",\n\t\tname: \"Netease Object Storage (NOS)\",\n\t},\n\t{\n\t\tkey: \"Petabox\",\n\t\tname: \"Petabox Object Storage\",\n\t},\n\t{\n\t\tkey: \"RackCorp\",\n\t\tname: \"RackCorp Object Storage\",\n\t},\n\t{\n\t\tkey: \"Rclone\",\n\t\tname: \"Rclone S3 Server\",\n\t},\n\t{\n\t\tkey: \"Scaleway\",\n\t\tname: \"Scaleway Object Storage\",\n\t},\n\t{\n\t\tkey: \"SeaweedFS\",\n\t\tname: \"SeaweedFS S3\",\n\t},\n\t{\n\t\tkey: \"StackPath\",\n\t\tname: \"StackPath Object Storage\",\n\t},\n\t{\n\t\tkey: \"Storj\",\n\t\tname: \"Storj (S3 Compatible Gateway)\",\n\t},\n\t{\n\t\tkey: \"Synology\",\n\t\tname: \"Synology C2 Object Storage\",\n\t},\n\t{\n\t\tkey: \"TencentCOS\",\n\t\tname: \"Tencent Cloud Object Storage (COS)\",\n\t},\n\t{\n\t\tkey: \"Wasabi\",\n\t\tname: \"Wasabi Object Storage\",\n\t},\n\t{\n\t\tkey: \"Qiniu\",\n\t\tname: \"Qiniu Object Storage (Kodo)\",\n\t},\n\t{\n\t\tkey: \"Other\",\n\t\tname: \"Any other S3 compatible provider\",\n\t},\n];\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/destination/handle-destinations.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { PenBoxIcon, PlusIcon } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectGroup,\n\tSelectItem,\n\tSelectLabel,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { cn } from \"@/lib/utils\";\nimport { api } from \"@/utils/api\";\nimport { S3_PROVIDERS } from \"./constants\";\n\nconst addDestination = z.object({\n\tname: z.string().min(1, \"Name is required\"),\n\tprovider: z.string().min(1, \"Provider is required\"),\n\taccessKeyId: z.string().min(1, \"Access Key Id is required\"),\n\tsecretAccessKey: z.string().min(1, \"Secret Access Key is required\"),\n\tbucket: z.string().min(1, \"Bucket is required\"),\n\tregion: z.string(),\n\tendpoint: z.string().min(1, \"Endpoint is required\"),\n\tserverId: z.string().optional(),\n});\n\ntype AddDestination = z.infer<typeof addDestination>;\n\ninterface Props {\n\tdestinationId?: string;\n}\n\nexport const HandleDestinations = ({ destinationId }: Props) => {\n\tconst [open, setOpen] = useState(false);\n\tconst utils = api.useUtils();\n\tconst { data: servers } = api.server.withSSHKey.useQuery();\n\tconst { data: isCloud } = api.settings.isCloud.useQuery();\n\n\tconst { mutateAsync, isError, error, isPending } = destinationId\n\t\t? api.destination.update.useMutation()\n\t\t: api.destination.create.useMutation();\n\n\tconst { data: destination } = api.destination.one.useQuery(\n\t\t{\n\t\t\tdestinationId: destinationId || \"\",\n\t\t},\n\t\t{\n\t\t\tenabled: !!destinationId,\n\t\t\trefetchOnWindowFocus: false,\n\t\t},\n\t);\n\tconst {\n\t\tmutateAsync: testConnection,\n\t\tisPending: isPendingConnection,\n\t\terror: connectionError,\n\t\tisError: isErrorConnection,\n\t} = api.destination.testConnection.useMutation();\n\n\tconst form = useForm<AddDestination>({\n\t\tdefaultValues: {\n\t\t\tprovider: \"\",\n\t\t\taccessKeyId: \"\",\n\t\t\tbucket: \"\",\n\t\t\tname: \"\",\n\t\t\tregion: \"\",\n\t\t\tsecretAccessKey: \"\",\n\t\t\tendpoint: \"\",\n\t\t},\n\t\tresolver: zodResolver(addDestination),\n\t});\n\tuseEffect(() => {\n\t\tif (destination) {\n\t\t\tform.reset({\n\t\t\t\tname: destination.name,\n\t\t\t\tprovider: destination.provider || \"\",\n\t\t\t\taccessKeyId: destination.accessKey,\n\t\t\t\tsecretAccessKey: destination.secretAccessKey,\n\t\t\t\tbucket: destination.bucket,\n\t\t\t\tregion: destination.region,\n\t\t\t\tendpoint: destination.endpoint,\n\t\t\t});\n\t\t} else {\n\t\t\tform.reset();\n\t\t}\n\t}, [form, form.reset, form.formState.isSubmitSuccessful, destination]);\n\n\tconst onSubmit = async (data: AddDestination) => {\n\t\tawait mutateAsync({\n\t\t\tprovider: data.provider || \"\",\n\t\t\taccessKey: data.accessKeyId,\n\t\t\tbucket: data.bucket,\n\t\t\tendpoint: data.endpoint,\n\t\t\tname: data.name,\n\t\t\tregion: data.region,\n\t\t\tsecretAccessKey: data.secretAccessKey,\n\t\t\tdestinationId: destinationId || \"\",\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(`Destination ${destinationId ? \"Updated\" : \"Created\"}`);\n\t\t\t\tawait utils.destination.all.invalidate();\n\t\t\t\tif (destinationId) {\n\t\t\t\t\tawait utils.destination.one.invalidate({ destinationId });\n\t\t\t\t}\n\t\t\t\tsetOpen(false);\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\n\t\t\t\t\t`Error ${destinationId ? \"Updating\" : \"Creating\"} the Destination`,\n\t\t\t\t);\n\t\t\t});\n\t};\n\n\tconst handleTestConnection = async (serverId?: string) => {\n\t\tconst result = await form.trigger([\n\t\t\t\"provider\",\n\t\t\t\"accessKeyId\",\n\t\t\t\"secretAccessKey\",\n\t\t\t\"bucket\",\n\t\t\t\"endpoint\",\n\t\t]);\n\n\t\tif (!result) {\n\t\t\tconst errors = form.formState.errors;\n\t\t\tconst errorFields = Object.entries(errors)\n\t\t\t\t.map(([field, error]) => `${field}: ${error?.message}`)\n\t\t\t\t.filter(Boolean)\n\t\t\t\t.join(\"\\n\");\n\n\t\t\ttoast.error(\"Please fill all required fields\", {\n\t\t\t\tdescription: errorFields,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tif (isCloud && !serverId) {\n\t\t\ttoast.error(\"Please select a server\");\n\t\t\treturn;\n\t\t}\n\n\t\tconst provider = form.getValues(\"provider\");\n\t\tconst accessKey = form.getValues(\"accessKeyId\");\n\t\tconst secretKey = form.getValues(\"secretAccessKey\");\n\t\tconst bucket = form.getValues(\"bucket\");\n\t\tconst endpoint = form.getValues(\"endpoint\");\n\t\tconst region = form.getValues(\"region\");\n\n\t\tconst connectionString = `:s3,provider=${provider},access_key_id=${accessKey},secret_access_key=${secretKey},endpoint=${endpoint}${region ? `,region=${region}` : \"\"}:${bucket}`;\n\n\t\tawait testConnection({\n\t\t\tprovider,\n\t\t\taccessKey,\n\t\t\tbucket,\n\t\t\tendpoint,\n\t\t\tname: \"Test\",\n\t\t\tregion,\n\t\t\tsecretAccessKey: secretKey,\n\t\t\tserverId,\n\t\t})\n\t\t\t.then(() => {\n\t\t\t\ttoast.success(\"Connection Success\");\n\t\t\t})\n\t\t\t.catch((e) => {\n\t\t\t\ttoast.error(\"Error connecting to provider\", {\n\t\t\t\t\tdescription: `${e.message}\\n\\nTry manually: rclone ls ${connectionString}`,\n\t\t\t\t});\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<Dialog open={open} onOpenChange={setOpen}>\n\t\t\t<DialogTrigger className=\"\" asChild>\n\t\t\t\t{destinationId ? (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\tclassName=\"group hover:bg-blue-500/10 \"\n\t\t\t\t\t>\n\t\t\t\t\t\t<PenBoxIcon className=\"size-3.5  text-primary group-hover:text-blue-500\" />\n\t\t\t\t\t</Button>\n\t\t\t\t) : (\n\t\t\t\t\t<Button className=\"cursor-pointer space-x-3\">\n\t\t\t\t\t\t<PlusIcon className=\"h-4 w-4\" />\n\t\t\t\t\t\tAdd Destination\n\t\t\t\t\t</Button>\n\t\t\t\t)}\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-2xl\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>\n\t\t\t\t\t\t{destinationId ? \"Update\" : \"Add\"} Destination\n\t\t\t\t\t</DialogTitle>\n\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\tIn this section, you can configure and add new destinations for your\n\t\t\t\t\t\tbackups. Please ensure that you provide the correct information to\n\t\t\t\t\t\tguarantee secure and efficient storage.\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t{(isError || isErrorConnection) && (\n\t\t\t\t\t<AlertBlock type=\"error\" className=\"w-full\">\n\t\t\t\t\t\t{connectionError?.message || error?.message}\n\t\t\t\t\t</AlertBlock>\n\t\t\t\t)}\n\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tid=\"hook-form-destination-add\"\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\tclassName=\"grid w-full gap-4 \"\n\t\t\t\t\t>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"name\"\n\t\t\t\t\t\t\trender={({ field }) => {\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Name</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input placeholder={\"S3 Bucket\"} {...field} />\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"provider\"\n\t\t\t\t\t\t\trender={({ field }) => {\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Provider</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\t\t\tonValueChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\tdefaultValue={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a S3 Provider\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{S3_PROVIDERS.map((s3Provider) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={s3Provider.key}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={s3Provider.key}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{s3Provider.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"accessKeyId\"\n\t\t\t\t\t\t\trender={({ field }) => {\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Access Key Id</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input placeholder={\"xcas41dasde\"} {...field} />\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"secretAccessKey\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Secret Access Key</FormLabel>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input placeholder={\"asd123asdasw\"} {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"bucket\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Bucket</FormLabel>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input placeholder={\"dokploy-bucket\"} {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"region\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Region</FormLabel>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input placeholder={\"us-east-1\"} {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"endpoint\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Endpoint</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\tplaceholder={\"https://us.bucket.aws/s3\"}\n\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</form>\n\n\t\t\t\t\t<DialogFooter\n\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\tisCloud ? \"!flex-col\" : \"flex-row\",\n\t\t\t\t\t\t\t\"flex w-full  !justify-between gap-4\",\n\t\t\t\t\t\t)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{isCloud ? (\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-4 border p-2 rounded-lg\">\n\t\t\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\tSelect a server to test the destination. If you don't have a\n\t\t\t\t\t\t\t\t\tserver choose the default one.\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"serverId\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Server (Optional)</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\t\t\t\tonValueChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t\tdefaultValue={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger className=\"w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a server\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectLabel>Servers</SelectLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{servers?.map((server) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={server.serverId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={server.serverId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{server.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value={\"none\"}>None</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\tvariant={\"secondary\"}\n\t\t\t\t\t\t\t\t\tisLoading={isPendingConnection}\n\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\tawait handleTestConnection(form.getValues(\"serverId\"));\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tTest Connection\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tisLoading={isPendingConnection}\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\tawait handleTestConnection();\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tTest connection\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tisLoading={isPending}\n\t\t\t\t\t\t\tform=\"hook-form-destination-add\"\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{destinationId ? \"Update\" : \"Create\"}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</DialogFooter>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/destination/show-destinations.tsx",
    "content": "import { Database, FolderUp, Loader2, Trash2 } from \"lucide-react\";\nimport { toast } from \"sonner\";\nimport { DialogAction } from \"@/components/shared/dialog-action\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport { api } from \"@/utils/api\";\nimport { HandleDestinations } from \"./handle-destinations\";\n\nexport const ShowDestinations = () => {\n\tconst { data, isPending, refetch } = api.destination.all.useQuery();\n\tconst { mutateAsync, isPending: isRemoving } =\n\t\tapi.destination.remove.useMutation();\n\tconst { data: permissions } = api.user.getPermissions.useQuery();\n\treturn (\n\t\t<div className=\"w-full\">\n\t\t\t<Card className=\"h-full bg-sidebar  p-2.5 rounded-xl  max-w-5xl mx-auto\">\n\t\t\t\t<div className=\"rounded-xl bg-background shadow-md \">\n\t\t\t\t\t<CardHeader className=\"\">\n\t\t\t\t\t\t<CardTitle className=\"text-xl flex flex-row gap-2\">\n\t\t\t\t\t\t\t<Database className=\"size-6 text-muted-foreground self-center\" />\n\t\t\t\t\t\t\tS3 Destinations\n\t\t\t\t\t\t</CardTitle>\n\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\tAdd your providers like AWS S3, Cloudflare R2, Wasabi,\n\t\t\t\t\t\t\tDigitalOcean Spaces etc.\n\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<CardContent className=\"space-y-2 py-8 border-t\">\n\t\t\t\t\t\t{isPending ? (\n\t\t\t\t\t\t\t<div className=\"flex flex-row gap-2 items-center justify-center text-sm text-muted-foreground min-h-[25vh]\">\n\t\t\t\t\t\t\t\t<span>Loading...</span>\n\t\t\t\t\t\t\t\t<Loader2 className=\"animate-spin size-4\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{data?.length === 0 ? (\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col items-center gap-3  min-h-[25vh] justify-center\">\n\t\t\t\t\t\t\t\t\t\t<FolderUp className=\"size-8 self-center text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t<span className=\"text-base text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\tTo create a backup it is required to set at least 1\n\t\t\t\t\t\t\t\t\t\t\tprovider.\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t{permissions?.destination.create && <HandleDestinations />}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-4  min-h-[25vh]\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-4 rounded-lg \">\n\t\t\t\t\t\t\t\t\t\t\t{data?.map((destination, index) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={destination.destinationId}\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center justify-between bg-sidebar p-1 w-full rounded-lg\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center justify-between p-3.5 rounded-lg bg-background border  w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{index + 1}. {destination.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-xs text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCreated at:{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{new Date(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdestination.createdAt,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t).toLocaleDateString()}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<HandleDestinations\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdestinationId={destination.destinationId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{permissions?.destination.delete && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"Delete Destination\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to delete this destination?\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"destructive\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait mutateAsync({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdestinationId: destination.destinationId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Destination deleted successfully\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Error deleting destination\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"group hover:bg-red-500/10 \"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisLoading={isRemoving}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Trash2 className=\"size-4 text-primary group-hover:text-red-500\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t{permissions?.destination.create && (\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-2 flex-wrap w-full justify-end mr-4\">\n\t\t\t\t\t\t\t\t\t\t\t\t<HandleDestinations />\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</CardContent>\n\t\t\t\t</div>\n\t\t\t</Card>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/git/bitbucket/add-bitbucket-provider.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { ExternalLink } from \"lucide-react\";\nimport Link from \"next/link\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { BitbucketIcon } from \"@/components/icons/data-tools-icons\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport { CardContent } from \"@/components/ui/card\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { api } from \"@/utils/api\";\n\nconst Schema = z.object({\n\tname: z.string().min(1, { message: \"Name is required\" }),\n\tusername: z.string().min(1, { message: \"Username is required\" }),\n\temail: z.string().email().optional(),\n\tapiToken: z.string().min(1, { message: \"API Token is required\" }),\n\tworkspaceName: z.string().optional(),\n});\n\ntype Schema = z.infer<typeof Schema>;\n\nexport const AddBitbucketProvider = () => {\n\tconst utils = api.useUtils();\n\tconst [isOpen, setIsOpen] = useState(false);\n\tconst { mutateAsync, error, isError } = api.bitbucket.create.useMutation();\n\tconst { data: auth } = api.user.get.useQuery();\n\tconst form = useForm<Schema>({\n\t\tdefaultValues: {\n\t\t\tusername: \"\",\n\t\t\tapiToken: \"\",\n\t\t\tworkspaceName: \"\",\n\t\t},\n\t\tresolver: zodResolver(Schema),\n\t});\n\n\tuseEffect(() => {\n\t\tform.reset({\n\t\t\tusername: \"\",\n\t\t\temail: \"\",\n\t\t\tapiToken: \"\",\n\t\t\tworkspaceName: \"\",\n\t\t});\n\t}, [form, isOpen]);\n\n\tconst onSubmit = async (data: Schema) => {\n\t\tawait mutateAsync({\n\t\t\tbitbucketUsername: data.username,\n\t\t\tapiToken: data.apiToken,\n\t\t\tbitbucketWorkspaceName: data.workspaceName || \"\",\n\t\t\tauthId: auth?.id || \"\",\n\t\t\tname: data.name || \"\",\n\t\t\tbitbucketEmail: data.email || \"\",\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\tawait utils.gitProvider.getAll.invalidate();\n\t\t\t\ttoast.success(\"Bitbucket configured successfully\");\n\t\t\t\tsetIsOpen(false);\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error configuring Bitbucket\");\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tclassName=\"flex items-center space-x-1 bg-blue-700 text-white hover:bg-blue-600\"\n\t\t\t\t>\n\t\t\t\t\t<BitbucketIcon />\n\t\t\t\t\t<span>Bitbucket</span>\n\t\t\t\t</Button>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-2xl \">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle className=\"flex items-center gap-2\">\n\t\t\t\t\t\tBitbucket Provider <BitbucketIcon className=\"size-5\" />\n\t\t\t\t\t</DialogTitle>\n\t\t\t\t</DialogHeader>\n\n\t\t\t\t{isError && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tid=\"hook-form-add-bitbucket\"\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\tclassName=\"grid w-full gap-1\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<CardContent className=\"p-0\">\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t\t\t<AlertBlock type=\"warning\">\n\t\t\t\t\t\t\t\t\tBitbucket App Passwords are deprecated for new providers. Use\n\t\t\t\t\t\t\t\t\tan API Token instead. Existing providers with App Passwords\n\t\t\t\t\t\t\t\t\twill continue to work until 9th June 2026.\n\t\t\t\t\t\t\t\t</AlertBlock>\n\n\t\t\t\t\t\t\t\t<div className=\"mt-1 text-sm\">\n\t\t\t\t\t\t\t\t\tManage tokens in\n\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\thref=\"https://id.atlassian.com/manage-profile/security/api-tokens\"\n\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"inline-flex items-center gap-1 ml-1\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<span>Bitbucket settings</span>\n\t\t\t\t\t\t\t\t\t\t<ExternalLink className=\"w-fit text-primary size-4\" />\n\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<ul className=\"list-disc list-inside ml-4 text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t<li className=\"text-muted-foreground text-sm\">\n\t\t\t\t\t\t\t\t\t\tClick on Create API token with scopes\n\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t<li className=\"text-muted-foreground text-sm\">\n\t\t\t\t\t\t\t\t\t\tSelect the expiration date (Max 1 year)\n\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t<li className=\"text-muted-foreground text-sm\">\n\t\t\t\t\t\t\t\t\t\tSelect Bitbucket product.\n\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t<p className=\"text-muted-foreground text-sm\">\n\t\t\t\t\t\t\t\t\tSelect the following scopes:\n\t\t\t\t\t\t\t\t</p>\n\n\t\t\t\t\t\t\t\t<ul className=\"list-disc list-inside ml-4 text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t<li>read:repository:bitbucket</li>\n\t\t\t\t\t\t\t\t\t<li>read:pullrequest:bitbucket</li>\n\t\t\t\t\t\t\t\t\t<li>read:webhook:bitbucket</li>\n\t\t\t\t\t\t\t\t\t<li>read:workspace:bitbucket</li>\n\t\t\t\t\t\t\t\t\t<li>write:webhook:bitbucket</li>\n\t\t\t\t\t\t\t\t</ul>\n\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"name\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Name</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Your Bitbucket Provider, eg: my-personal-account\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"username\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Bitbucket Username</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Your Bitbucket username\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"email\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Bitbucket Email</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"Your Bitbucket email\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"apiToken\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>API Token</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Paste your Bitbucket API token\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"workspaceName\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Workspace Name (optional)</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"For organization accounts\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<Button isLoading={form.formState.isSubmitting}>\n\t\t\t\t\t\t\t\t\tConfigure Bitbucket\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t</form>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/git/bitbucket/edit-bitbucket-provider.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { PenBoxIcon } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { BitbucketIcon } from \"@/components/icons/data-tools-icons\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport { CardContent } from \"@/components/ui/card\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { api } from \"@/utils/api\";\n\nconst Schema = z.object({\n\tname: z.string().min(1, {\n\t\tmessage: \"Name is required\",\n\t}),\n\tusername: z.string().min(1, {\n\t\tmessage: \"Username is required\",\n\t}),\n\temail: z.string().email().optional(),\n\tworkspaceName: z.string().optional(),\n\tapiToken: z.string().optional(),\n\tappPassword: z.string().optional(),\n});\n\ntype Schema = z.infer<typeof Schema>;\n\ninterface Props {\n\tbitbucketId: string;\n}\n\nexport const EditBitbucketProvider = ({ bitbucketId }: Props) => {\n\tconst { data: bitbucket } = api.bitbucket.one.useQuery(\n\t\t{\n\t\t\tbitbucketId,\n\t\t},\n\t\t{\n\t\t\tenabled: !!bitbucketId,\n\t\t},\n\t);\n\n\tconst utils = api.useUtils();\n\tconst [isOpen, setIsOpen] = useState(false);\n\tconst { mutateAsync, error, isError } = api.bitbucket.update.useMutation();\n\tconst { mutateAsync: testConnection, isPending } =\n\t\tapi.bitbucket.testConnection.useMutation();\n\tconst form = useForm<Schema>({\n\t\tdefaultValues: {\n\t\t\tusername: \"\",\n\t\t\temail: \"\",\n\t\t\tworkspaceName: \"\",\n\t\t\tapiToken: \"\",\n\t\t\tappPassword: \"\",\n\t\t},\n\t\tresolver: zodResolver(Schema),\n\t});\n\n\tconst username = form.watch(\"username\");\n\tconst email = form.watch(\"email\");\n\tconst workspaceName = form.watch(\"workspaceName\");\n\tconst apiToken = form.watch(\"apiToken\");\n\tconst appPassword = form.watch(\"appPassword\");\n\n\tuseEffect(() => {\n\t\tform.reset({\n\t\t\tusername: bitbucket?.bitbucketUsername || \"\",\n\t\t\temail: bitbucket?.bitbucketEmail || \"\",\n\t\t\tworkspaceName: bitbucket?.bitbucketWorkspaceName || \"\",\n\t\t\tname: bitbucket?.gitProvider.name || \"\",\n\t\t\tapiToken: bitbucket?.apiToken || \"\",\n\t\t\tappPassword: bitbucket?.appPassword || \"\",\n\t\t});\n\t}, [form, isOpen, bitbucket]);\n\n\tconst onSubmit = async (data: Schema) => {\n\t\tawait mutateAsync({\n\t\t\tbitbucketId,\n\t\t\tgitProviderId: bitbucket?.gitProviderId || \"\",\n\t\t\tbitbucketUsername: data.username,\n\t\t\tbitbucketEmail: data.email || \"\",\n\t\t\tbitbucketWorkspaceName: data.workspaceName || \"\",\n\t\t\tname: data.name || \"\",\n\t\t\tapiToken: data.apiToken || \"\",\n\t\t\tappPassword: data.appPassword || \"\",\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\tawait utils.gitProvider.getAll.invalidate();\n\t\t\t\ttoast.success(\"Bitbucket updated successfully\");\n\t\t\t\tsetIsOpen(false);\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error updating Bitbucket\");\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\tclassName=\"group hover:bg-blue-500/10 \"\n\t\t\t\t>\n\t\t\t\t\t<PenBoxIcon className=\"size-3.5  text-primary group-hover:text-blue-500\" />\n\t\t\t\t</Button>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-2xl \">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle className=\"flex items-center gap-2\">\n\t\t\t\t\t\tUpdate Bitbucket <BitbucketIcon className=\"size-5\" />\n\t\t\t\t\t</DialogTitle>\n\t\t\t\t</DialogHeader>\n\n\t\t\t\t{isError && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tid=\"hook-form-add-bitbucket\"\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\tclassName=\"grid w-full gap-1\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<CardContent className=\"p-0\">\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t\t\t<p className=\"text-muted-foreground text-sm\">\n\t\t\t\t\t\t\t\t\tUpdate your Bitbucket authentication. Use API Token for\n\t\t\t\t\t\t\t\t\tenhanced security (recommended) or App Password for legacy\n\t\t\t\t\t\t\t\t\tsupport.\n\t\t\t\t\t\t\t\t</p>\n\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"name\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Name</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Random Name eg(my-personal-account)\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"username\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Bitbucket Username</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Your Bitbucket username\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"email\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Email (Required for API Tokens)</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"email\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Your Bitbucket email address\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"workspaceName\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Workspace Name (Optional)</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"For organization accounts\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2 border-t pt-4\">\n\t\t\t\t\t\t\t\t\t<h3 className=\"text-sm font-medium mb-2\">\n\t\t\t\t\t\t\t\t\t\tAuthentication (Update to use API Token)\n\t\t\t\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\tname=\"apiToken\"\n\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>API Token (Recommended)</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"password\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Enter your Bitbucket API Token\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\tname=\"appPassword\"\n\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\tApp Password (Legacy - will be deprecated June 2026)\n\t\t\t\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"password\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Enter your Bitbucket App Password\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t<div className=\"flex w-full justify-between gap-4 mt-4\">\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\tvariant={\"secondary\"}\n\t\t\t\t\t\t\t\t\t\tisLoading={isPending}\n\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\tawait testConnection({\n\t\t\t\t\t\t\t\t\t\t\t\tbitbucketId,\n\t\t\t\t\t\t\t\t\t\t\t\tbitbucketUsername: username,\n\t\t\t\t\t\t\t\t\t\t\t\tbitbucketEmail: email,\n\t\t\t\t\t\t\t\t\t\t\t\tworkspaceName: workspaceName,\n\t\t\t\t\t\t\t\t\t\t\t\tapiToken: apiToken,\n\t\t\t\t\t\t\t\t\t\t\t\tappPassword: appPassword,\n\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t.then(async (message) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.info(`Message: ${message}`);\n\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t.catch((error) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(`Error: ${error.message}`);\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tTest Connection\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t<Button type=\"submit\" isLoading={form.formState.isSubmitting}>\n\t\t\t\t\t\t\t\t\t\tUpdate\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t</form>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/git/gitea/add-gitea-provider.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { ExternalLink } from \"lucide-react\";\nimport Link from \"next/link\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { GiteaIcon } from \"@/components/icons/data-tools-icons\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport { CardContent } from \"@/components/ui/card\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { api } from \"@/utils/api\";\nimport {\n\ttype GiteaProviderResponse,\n\tgetGiteaOAuthUrl,\n} from \"@/utils/gitea-utils\";\nimport { useUrl } from \"@/utils/hooks/use-url\";\n\nconst Schema = z.object({\n\tname: z.string().min(1, {\n\t\tmessage: \"Name is required\",\n\t}),\n\tgiteaUrl: z.string().min(1, {\n\t\tmessage: \"Gitea URL is required\",\n\t}),\n\tgiteaInternalUrl: z\n\t\t.union([z.string().url(), z.literal(\"\")])\n\t\t.optional()\n\t\t.transform((v) => (v === \"\" ? undefined : v)),\n\tclientId: z.string().min(1, {\n\t\tmessage: \"Client ID is required\",\n\t}),\n\tclientSecret: z.string().min(1, {\n\t\tmessage: \"Client Secret is required\",\n\t}),\n\tredirectUri: z.string().min(1, {\n\t\tmessage: \"Redirect URI is required\",\n\t}),\n\torganizationName: z.string().optional(),\n});\n\ntype Schema = z.infer<typeof Schema>;\n\nexport const AddGiteaProvider = () => {\n\tconst [isOpen, setIsOpen] = useState(false);\n\n\tconst urlObj = useUrl();\n\tconst baseUrl =\n\t\ttypeof urlObj === \"string\" ? urlObj : (urlObj as any)?.url || \"\";\n\n\tconst { mutateAsync, error, isError } = api.gitea.create.useMutation();\n\tconst webhookUrl = `${baseUrl}/api/providers/gitea/callback`;\n\n\tconst form = useForm({\n\t\tdefaultValues: {\n\t\t\tclientId: \"\",\n\t\t\tclientSecret: \"\",\n\t\t\tredirectUri: webhookUrl,\n\t\t\tname: \"\",\n\t\t\tgiteaUrl: \"https://gitea.com\",\n\t\t\tgiteaInternalUrl: \"\",\n\t\t},\n\t\tresolver: zodResolver(Schema),\n\t});\n\n\tconst giteaUrl = form.watch(\"giteaUrl\");\n\n\tuseEffect(() => {\n\t\tform.reset({\n\t\t\tclientId: \"\",\n\t\t\tclientSecret: \"\",\n\t\t\tredirectUri: webhookUrl,\n\t\t\tname: \"\",\n\t\t\tgiteaUrl: \"https://gitea.com\",\n\t\t\tgiteaInternalUrl: \"\",\n\t\t});\n\t}, [form, webhookUrl, isOpen]);\n\n\tconst onSubmit = async (data: Schema) => {\n\t\ttry {\n\t\t\t// Send the form data to create the Gitea provider\n\t\t\tconst result = (await mutateAsync({\n\t\t\t\tclientId: data.clientId,\n\t\t\t\tclientSecret: data.clientSecret,\n\t\t\t\tname: data.name,\n\t\t\t\tredirectUri: data.redirectUri,\n\t\t\t\tgiteaUrl: data.giteaUrl,\n\t\t\t\tgiteaInternalUrl: data.giteaInternalUrl || undefined,\n\t\t\t\torganizationName: data.organizationName,\n\t\t\t})) as unknown as GiteaProviderResponse;\n\n\t\t\t// Check if we have a giteaId from the response\n\t\t\tif (!result || !result.giteaId) {\n\t\t\t\ttoast.error(\"Failed to get Gitea ID from response\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Generate OAuth URL using the shared utility\n\t\t\tconst authUrl = getGiteaOAuthUrl(\n\t\t\t\tresult.giteaId,\n\t\t\t\tdata.clientId,\n\t\t\t\tdata.giteaUrl,\n\t\t\t\tbaseUrl,\n\t\t\t);\n\n\t\t\t// Open the Gitea OAuth URL\n\t\t\tif (authUrl !== \"#\") {\n\t\t\t\twindow.open(authUrl, \"_blank\");\n\t\t\t} else {\n\t\t\t\ttoast.error(\"Configuration Incomplete\", {\n\t\t\t\t\tdescription: \"Please fill in Client ID and Gitea URL first.\",\n\t\t\t\t});\n\t\t\t}\n\n\t\t\ttoast.success(\"Gitea provider created successfully\");\n\t\t\tsetIsOpen(false);\n\t\t} catch (error: unknown) {\n\t\t\tif (error instanceof Error) {\n\t\t\t\ttoast.error(`Error configuring Gitea: ${error.message}`);\n\t\t\t} else {\n\t\t\t\ttoast.error(\"An unknown error occurred.\");\n\t\t\t}\n\t\t}\n\t};\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"default\"\n\t\t\t\t\tclassName=\"flex items-center space-x-1 bg-green-700 text-white hover:bg-green-500\"\n\t\t\t\t>\n\t\t\t\t\t<GiteaIcon />\n\t\t\t\t\t<span>Gitea</span>\n\t\t\t\t</Button>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-2xl\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle className=\"flex items-center gap-2\">\n\t\t\t\t\t\tGitea Provider <GiteaIcon className=\"size-5\" />\n\t\t\t\t\t</DialogTitle>\n\t\t\t\t</DialogHeader>\n\n\t\t\t\t{isError && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tid=\"hook-form-add-gitea\"\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\tclassName=\"grid w-full gap-1\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<CardContent className=\"p-0\">\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t\t\t<p className=\"text-muted-foreground text-sm\">\n\t\t\t\t\t\t\t\t\tTo integrate your Gitea account, you need to create a new\n\t\t\t\t\t\t\t\t\tapplication in your Gitea settings. Follow these steps:\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t<ol className=\"list-decimal list-inside text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t<li className=\"flex flex-row gap-2 items-center\">\n\t\t\t\t\t\t\t\t\t\tGo to your Gitea settings{\" \"}\n\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\thref={`${giteaUrl}/user/settings/applications`}\n\t\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<ExternalLink className=\"w-fit text-primary size-4\" />\n\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t\tNavigate to Applications {\"->\"} Create new OAuth2\n\t\t\t\t\t\t\t\t\t\tApplication\n\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t\tCreate a new application with the following details:\n\t\t\t\t\t\t\t\t\t\t<ul className=\"list-disc list-inside ml-4\">\n\t\t\t\t\t\t\t\t\t\t\t<li>Name: Dokploy</li>\n\t\t\t\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t\t\t\tRedirect URI:{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-primary\">{webhookUrl}</span>{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t\tAfter creating, you'll receive an ID and Secret, copy them\n\t\t\t\t\t\t\t\t\t\tand paste them below.\n\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t</ol>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"name\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Name</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Random Name eg(my-personal-account)\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"giteaUrl\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Gitea URL</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"https://gitea.com/\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"giteaInternalUrl\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Internal URL (Optional)</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"http://gitea:3000\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value ?? \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\tUse when Gitea runs on the same instance as Dokploy.\n\t\t\t\t\t\t\t\t\t\t\t\tUsed for OAuth token exchange to reach Gitea via\n\t\t\t\t\t\t\t\t\t\t\t\tinternal network (e.g. Docker service name).\n\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"redirectUri\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Redirect URI</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\tdisabled\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Random Name eg(my-personal-account)\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"clientId\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Client ID</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"Client ID\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"clientSecret\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Client Secret</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"password\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Client Secret\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<Button isLoading={form.formState.isSubmitting}>\n\t\t\t\t\t\t\t\t\tConfigure Gitea App\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t</form>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/git/gitea/edit-gitea-provider.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { PenBoxIcon } from \"lucide-react\";\nimport { useRouter } from \"next/router\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { api } from \"@/utils/api\";\nimport { getGiteaOAuthUrl } from \"@/utils/gitea-utils\";\nimport { useUrl } from \"@/utils/hooks/use-url\";\n\nconst formSchema = z.object({\n\tname: z.string().min(1, \"Name is required\"),\n\tgiteaUrl: z.string().min(1, \"Gitea URL is required\"),\n\tgiteaInternalUrl: z\n\t\t.union([z.string().url(), z.literal(\"\")])\n\t\t.optional()\n\t\t.transform((v) => (v === \"\" ? undefined : v)),\n\tclientId: z.string().min(1, \"Client ID is required\"),\n\tclientSecret: z.string().min(1, \"Client Secret is required\"),\n});\n\ninterface Props {\n\tgiteaId: string;\n}\n\nexport const EditGiteaProvider = ({ giteaId }: Props) => {\n\tconst router = useRouter();\n\tconst [open, setOpen] = useState(false);\n\tconst {\n\t\tdata: gitea,\n\t\tisLoading,\n\t\trefetch,\n\t} = api.gitea.one.useQuery({ giteaId });\n\tconst { mutateAsync, isPending: isUpdating } = api.gitea.update.useMutation();\n\tconst { mutateAsync: testConnection, isPending: isTesting } =\n\t\tapi.gitea.testConnection.useMutation();\n\tconst url = useUrl();\n\tconst utils = api.useUtils();\n\n\tuseEffect(() => {\n\t\tconst { connected, error } = router.query;\n\n\t\tif (!router.isReady) return;\n\n\t\tif (connected) {\n\t\t\ttoast.success(\"Successfully connected to Gitea\", {\n\t\t\t\tdescription: \"Your Gitea provider has been authorized.\",\n\t\t\t\tid: \"gitea-connection-success\",\n\t\t\t});\n\t\t\trefetch();\n\t\t\trouter.replace(\n\t\t\t\t{\n\t\t\t\t\tpathname: router.pathname,\n\t\t\t\t\tquery: {},\n\t\t\t\t},\n\t\t\t\tundefined,\n\t\t\t\t{ shallow: true },\n\t\t\t);\n\t\t}\n\n\t\tif (error) {\n\t\t\ttoast.error(\"Gitea Connection Failed\", {\n\t\t\t\tdescription: decodeURIComponent(error as string),\n\t\t\t\tid: \"gitea-connection-error\",\n\t\t\t});\n\t\t\trouter.replace(\n\t\t\t\t{\n\t\t\t\t\tpathname: router.pathname,\n\t\t\t\t\tquery: {},\n\t\t\t\t},\n\t\t\t\tundefined,\n\t\t\t\t{ shallow: true },\n\t\t\t);\n\t\t}\n\t}, [router.query, router.isReady, refetch]);\n\n\tconst form = useForm({\n\t\tresolver: zodResolver(formSchema),\n\t\tdefaultValues: {\n\t\t\tname: \"\",\n\t\t\tgiteaUrl: \"https://gitea.com\",\n\t\t\tgiteaInternalUrl: \"\",\n\t\t\tclientId: \"\",\n\t\t\tclientSecret: \"\",\n\t\t},\n\t});\n\n\tuseEffect(() => {\n\t\tif (gitea) {\n\t\t\tform.reset({\n\t\t\t\tname: gitea.gitProvider?.name || \"\",\n\t\t\t\tgiteaUrl: gitea.giteaUrl || \"https://gitea.com\",\n\t\t\t\tgiteaInternalUrl: gitea.giteaInternalUrl || \"\",\n\t\t\t\tclientId: gitea.clientId || \"\",\n\t\t\t\tclientSecret: gitea.clientSecret || \"\",\n\t\t\t});\n\t\t}\n\t}, [gitea, form]);\n\n\tconst onSubmit = async (values: z.infer<typeof formSchema>) => {\n\t\tawait mutateAsync({\n\t\t\tgiteaId: giteaId,\n\t\t\tgitProviderId: gitea?.gitProvider?.gitProviderId || \"\",\n\t\t\tname: values.name,\n\t\t\tgiteaUrl: values.giteaUrl,\n\t\t\tgiteaInternalUrl: values.giteaInternalUrl ?? null,\n\t\t\tclientId: values.clientId,\n\t\t\tclientSecret: values.clientSecret,\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\tawait utils.gitProvider.getAll.invalidate();\n\t\t\t\ttoast.success(\"Gitea provider updated successfully\");\n\t\t\t\tawait refetch();\n\t\t\t\tsetOpen(false);\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error updating Gitea provider\");\n\t\t\t});\n\t};\n\n\tconst handleTestConnection = async () => {\n\t\ttry {\n\t\t\tconst result = await testConnection({ giteaId });\n\t\t\ttoast.success(\"Gitea Connection Verified\", {\n\t\t\t\tdescription: result,\n\t\t\t});\n\t\t} catch (error: any) {\n\t\t\tconst formValues = form.getValues();\n\t\t\tconst authUrl =\n\t\t\t\terror.authorizationUrl ||\n\t\t\t\tgetGiteaOAuthUrl(\n\t\t\t\t\tgiteaId,\n\t\t\t\t\tformValues.clientId,\n\t\t\t\t\tformValues.giteaUrl,\n\t\t\t\t\ttypeof url === \"string\" ? url : (url as any).url || \"\",\n\t\t\t\t);\n\n\t\t\ttoast.error(\"Gitea Not Connected\", {\n\t\t\t\tdescription:\n\t\t\t\t\terror.message || \"Please complete the OAuth authorization process.\",\n\t\t\t\taction:\n\t\t\t\t\tauthUrl && authUrl !== \"#\"\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tlabel: \"Authorize Now\",\n\t\t\t\t\t\t\t\tonClick: () => window.open(authUrl, \"_blank\"),\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t: undefined,\n\t\t\t});\n\t\t}\n\t};\n\n\tif (isLoading) {\n\t\treturn (\n\t\t\t<Button variant=\"ghost\" size=\"icon\" disabled>\n\t\t\t\t<PenBoxIcon className=\"h-4 w-4 text-muted-foreground\" />\n\t\t\t</Button>\n\t\t);\n\t}\n\n\t// Function to handle dialog open state\n\tconst handleOpenChange = (newOpen: boolean) => {\n\t\tsetOpen(newOpen);\n\t};\n\n\treturn (\n\t\t<Dialog open={open} onOpenChange={handleOpenChange}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\tclassName=\"group hover:bg-blue-500/10\"\n\t\t\t\t>\n\t\t\t\t\t<PenBoxIcon className=\"size-3.5 text-primary group-hover:text-blue-500\" />\n\t\t\t\t</Button>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent>\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Edit Gitea Provider</DialogTitle>\n\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\tUpdate your Gitea provider details.\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form onSubmit={form.handleSubmit(onSubmit)} className=\"space-y-4\">\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"name\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Name</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"My Gitea\"\n\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\tautoFocus={false}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"giteaUrl\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Gitea URL</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"https://gitea.example.com\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"giteaInternalUrl\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Internal URL (Optional)</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"http://gitea:3000\"\n\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\tvalue={field.value ?? \"\"}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\tUse when Gitea runs on the same instance as Dokploy. Used\n\t\t\t\t\t\t\t\t\t\tfor OAuth token exchange to reach Gitea via internal network\n\t\t\t\t\t\t\t\t\t\t(e.g. Docker service name).\n\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"clientId\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Client ID</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"Client ID\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"clientSecret\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Client Secret</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\ttype=\"password\"\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Client Secret\"\n\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<div className=\"flex justify-end gap-2\">\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\tonClick={handleTestConnection}\n\t\t\t\t\t\t\t\tisLoading={isTesting}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tTest Connection\n\t\t\t\t\t\t\t</Button>\n\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\tconst formValues = form.getValues();\n\t\t\t\t\t\t\t\t\tconst authUrl = getGiteaOAuthUrl(\n\t\t\t\t\t\t\t\t\t\tgiteaId,\n\t\t\t\t\t\t\t\t\t\tformValues.clientId,\n\t\t\t\t\t\t\t\t\t\tformValues.giteaUrl,\n\t\t\t\t\t\t\t\t\t\ttypeof url === \"string\" ? url : (url as any).url || \"\",\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tif (authUrl !== \"#\") {\n\t\t\t\t\t\t\t\t\t\twindow.open(authUrl, \"_blank\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tConnect to Gitea\n\t\t\t\t\t\t\t</Button>\n\n\t\t\t\t\t\t\t<Button type=\"submit\" isLoading={isUpdating}>\n\t\t\t\t\t\t\t\tSave\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</form>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/git/github/add-github-provider.tsx",
    "content": "import { format } from \"date-fns\";\nimport { useEffect, useState } from \"react\";\nimport { GithubIcon } from \"@/components/icons/data-tools-icons\";\nimport { Button } from \"@/components/ui/button\";\nimport { CardContent } from \"@/components/ui/card\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport { Input } from \"@/components/ui/input\";\nimport { Switch } from \"@/components/ui/switch\";\nimport { api } from \"@/utils/api\";\n\nexport const AddGithubProvider = () => {\n\tconst [isOpen, setIsOpen] = useState(false);\n\tconst { data: activeOrganization } = api.organization.active.useQuery();\n\n\tconst { data: session } = api.user.session.useQuery();\n\tconst { data } = api.user.get.useQuery();\n\tconst [manifest, setManifest] = useState(\"\");\n\tconst [isOrganization, setIsOrganization] = useState(false);\n\tconst [organizationName, setOrganization] = useState(\"\");\n\n\tconst randomString = () => Math.random().toString(36).slice(2, 8);\n\n\tuseEffect(() => {\n\t\tconst url = document.location.origin;\n\t\tconst manifest = JSON.stringify(\n\t\t\t{\n\t\t\t\tredirect_url: `${origin}/api/providers/github/setup?organizationId=${activeOrganization?.id ?? \"\"}&userId=${session?.user?.id ?? \"\"}`,\n\t\t\t\tname: `Dokploy-${format(new Date(), \"yyyy-MM-dd\")}-${randomString()}`,\n\t\t\t\turl: origin,\n\t\t\t\thook_attributes: {\n\t\t\t\t\turl: `${url}/api/deploy/github`,\n\t\t\t\t},\n\t\t\t\tcallback_urls: [`${origin}/api/providers/github/setup`],\n\t\t\t\tpublic: false,\n\t\t\t\trequest_oauth_on_install: true,\n\t\t\t\tdefault_permissions: {\n\t\t\t\t\tcontents: \"read\",\n\t\t\t\t\tmetadata: \"read\",\n\t\t\t\t\temails: \"read\",\n\t\t\t\t\tpull_requests: \"write\",\n\t\t\t\t},\n\t\t\t\tdefault_events: [\"pull_request\", \"push\"],\n\t\t\t},\n\t\t\tnull,\n\t\t\t4,\n\t\t);\n\n\t\tsetManifest(manifest);\n\t}, [activeOrganization?.id, session?.user?.id]);\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t<Button variant=\"secondary\" className=\"flex items-center space-x-1\">\n\t\t\t\t\t<GithubIcon className=\"text-current fill-current\" />\n\t\t\t\t\t<span>Github</span>\n\t\t\t\t</Button>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-2xl \">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle className=\"flex items-center gap-2\">\n\t\t\t\t\t\tGithub Provider <GithubIcon className=\"size-5\" />\n\t\t\t\t\t</DialogTitle>\n\t\t\t\t</DialogHeader>\n\n\t\t\t\t<div id=\"hook-form-add-project\" className=\"grid w-full gap-1\">\n\t\t\t\t\t<CardContent className=\"p-0\">\n\t\t\t\t\t\t<div className=\"flex flex-col \">\n\t\t\t\t\t\t\t<p className=\"text-muted-foreground text-sm\">\n\t\t\t\t\t\t\t\tTo integrate your GitHub account with our services, you'll need\n\t\t\t\t\t\t\t\tto create and install a GitHub app. This process is\n\t\t\t\t\t\t\t\tstraightforward and only takes a few minutes. Click the button\n\t\t\t\t\t\t\t\tbelow to get started.\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t<div className=\"mt-4 flex flex-col gap-4\">\n\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-4\">\n\t\t\t\t\t\t\t\t\t<span>Organization?</span>\n\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\tchecked={isOrganization}\n\t\t\t\t\t\t\t\t\t\tonCheckedChange={(checked) => setIsOrganization(checked)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t{isOrganization && (\n\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\t\t\t\tplaceholder=\"Organization name\"\n\t\t\t\t\t\t\t\t\t\tonChange={(e) => setOrganization(e.target.value)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<form\n\t\t\t\t\t\t\t\taction={\n\t\t\t\t\t\t\t\t\tisOrganization\n\t\t\t\t\t\t\t\t\t\t? `https://github.com/organizations/${organizationName}/settings/apps/new?state=gh_init:${activeOrganization?.id}:${session?.user?.id ?? \"\"}`\n\t\t\t\t\t\t\t\t\t\t: `https://github.com/settings/apps/new?state=gh_init:${activeOrganization?.id}:${session?.user?.id ?? \"\"}`\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tmethod=\"post\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\t\tname=\"manifest\"\n\t\t\t\t\t\t\t\t\tid=\"manifest\"\n\t\t\t\t\t\t\t\t\tdefaultValue={manifest}\n\t\t\t\t\t\t\t\t\tclassName=\"invisible\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<br />\n\n\t\t\t\t\t\t\t\t<div className=\"flex w-full items-center justify-between\">\n\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\thref={\n\t\t\t\t\t\t\t\t\t\t\tisOrganization && organizationName\n\t\t\t\t\t\t\t\t\t\t\t\t? `https://github.com/organizations/${organizationName}/settings/installations`\n\t\t\t\t\t\t\t\t\t\t\t\t: \"https://github.com/settings/installations\"\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tclassName={`text-muted-foreground text-sm hover:underline duration-300\n\t\t\t\t\t\t\t\t\t\t\t ${\n\t\t\t\t\t\t\t\t\t\t\t\t\tisOrganization && !organizationName\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"pointer-events-none opacity-50\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"\"\n\t\t\t\t\t\t\t\t\t\t\t\t}`}\n\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tUnsure if you already have an app?\n\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tdisabled={isOrganization && organizationName.length < 1}\n\t\t\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"self-end\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tCreate GitHub App\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</CardContent>\n\t\t\t\t</div>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/git/github/edit-github-provider.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { PenBoxIcon } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { GithubIcon } from \"@/components/icons/data-tools-icons\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport { CardContent } from \"@/components/ui/card\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { api } from \"@/utils/api\";\n\nconst Schema = z.object({\n\tname: z.string().min(1, {\n\t\tmessage: \"Name is required\",\n\t}),\n\tappName: z.string().min(1, {\n\t\tmessage: \"App Name is required\",\n\t}),\n});\n\ntype Schema = z.infer<typeof Schema>;\n\ninterface Props {\n\tgithubId: string;\n}\n\nexport const EditGithubProvider = ({ githubId }: Props) => {\n\tconst { data: github } = api.github.one.useQuery(\n\t\t{\n\t\t\tgithubId,\n\t\t},\n\t\t{\n\t\t\tenabled: !!githubId,\n\t\t},\n\t);\n\tconst utils = api.useUtils();\n\tconst [isOpen, setIsOpen] = useState(false);\n\tconst { mutateAsync, error, isError } = api.github.update.useMutation();\n\tconst { mutateAsync: testConnection, isPending } =\n\t\tapi.github.testConnection.useMutation();\n\tconst form = useForm<Schema>({\n\t\tdefaultValues: {\n\t\t\tname: \"\",\n\t\t\tappName: \"\",\n\t\t},\n\t\tresolver: zodResolver(Schema),\n\t});\n\n\tuseEffect(() => {\n\t\tform.reset({\n\t\t\tname: github?.gitProvider.name || \"\",\n\t\t\tappName: github?.githubAppName || \"\",\n\t\t});\n\t}, [form, isOpen]);\n\n\tconst onSubmit = async (data: Schema) => {\n\t\tawait mutateAsync({\n\t\t\tgithubId,\n\t\t\tname: data.name || \"\",\n\t\t\tgitProviderId: github?.gitProviderId || \"\",\n\t\t\tgithubAppName: data.appName || \"\",\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\tawait utils.gitProvider.getAll.invalidate();\n\t\t\t\ttoast.success(\"Github updated successfully\");\n\t\t\t\tsetIsOpen(false);\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error updating Github\");\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\tclassName=\"group hover:bg-blue-500/10 \"\n\t\t\t\t>\n\t\t\t\t\t<PenBoxIcon className=\"size-3.5  text-primary group-hover:text-blue-500\" />\n\t\t\t\t</Button>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-2xl \">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle className=\"flex items-center gap-2\">\n\t\t\t\t\t\tUpdate Github <GithubIcon className=\"size-5\" />\n\t\t\t\t\t</DialogTitle>\n\t\t\t\t</DialogHeader>\n\n\t\t\t\t{isError && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tid=\"hook-form-add-github\"\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\tclassName=\"grid w-full gap-1\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<CardContent className=\"p-0\">\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"name\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Name</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Random Name eg(my-personal-account)\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"appName\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>App Name</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"pp Name eg(my-personal)\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<div className=\"flex w-full justify-between gap-4 mt-4\">\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\tvariant={\"secondary\"}\n\t\t\t\t\t\t\t\t\t\tisLoading={isPending}\n\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\tawait testConnection({\n\t\t\t\t\t\t\t\t\t\t\t\tgithubId,\n\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t.then(async (message) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.info(`Message: ${message}`);\n\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t.catch((error) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(`Error: ${error.message}`);\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tTest Connection\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t<Button type=\"submit\" isLoading={form.formState.isSubmitting}>\n\t\t\t\t\t\t\t\t\t\tUpdate\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t</form>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/git/gitlab/add-gitlab-provider.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { ExternalLink } from \"lucide-react\";\nimport Link from \"next/link\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { GitlabIcon } from \"@/components/icons/data-tools-icons\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport { CardContent } from \"@/components/ui/card\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { api } from \"@/utils/api\";\nimport { useUrl } from \"@/utils/hooks/use-url\";\n\nconst Schema = z.object({\n\tname: z.string().min(1, {\n\t\tmessage: \"Name is required\",\n\t}),\n\tgitlabUrl: z.string().min(1, {\n\t\tmessage: \"GitLab URL is required\",\n\t}),\n\tgitlabInternalUrl: z\n\t\t.union([z.string().url(), z.literal(\"\")])\n\t\t.optional()\n\t\t.transform((v) => (v === \"\" ? undefined : v)),\n\tapplicationId: z.string().min(1, {\n\t\tmessage: \"Application ID is required\",\n\t}),\n\tapplicationSecret: z.string().min(1, {\n\t\tmessage: \"Application Secret is required\",\n\t}),\n\n\tredirectUri: z.string().min(1, {\n\t\tmessage: \"Redirect URI is required\",\n\t}),\n\tgroupName: z.string().optional(),\n});\n\ntype Schema = z.infer<typeof Schema>;\n\nexport const AddGitlabProvider = () => {\n\tconst utils = api.useUtils();\n\tconst [isOpen, setIsOpen] = useState(false);\n\tconst url = useUrl();\n\tconst { data: auth } = api.user.get.useQuery();\n\tconst { mutateAsync, error, isError } = api.gitlab.create.useMutation();\n\tconst webhookUrl = `${url}/api/providers/gitlab/callback`;\n\n\tconst form = useForm({\n\t\tdefaultValues: {\n\t\t\tapplicationId: \"\",\n\t\t\tapplicationSecret: \"\",\n\t\t\tgroupName: \"\",\n\t\t\tredirectUri: webhookUrl,\n\t\t\tname: \"\",\n\t\t\tgitlabUrl: \"https://gitlab.com\",\n\t\t\tgitlabInternalUrl: \"\",\n\t\t},\n\t\tresolver: zodResolver(Schema),\n\t});\n\n\tconst gitlabUrl = form.watch(\"gitlabUrl\");\n\n\tuseEffect(() => {\n\t\tform.reset({\n\t\t\tapplicationId: \"\",\n\t\t\tapplicationSecret: \"\",\n\t\t\tgroupName: \"\",\n\t\t\tredirectUri: webhookUrl,\n\t\t\tname: \"\",\n\t\t\tgitlabUrl: \"https://gitlab.com\",\n\t\t\tgitlabInternalUrl: \"\",\n\t\t});\n\t}, [form, isOpen]);\n\n\tconst onSubmit = async (data: Schema) => {\n\t\tawait mutateAsync({\n\t\t\tapplicationId: data.applicationId || \"\",\n\t\t\tsecret: data.applicationSecret || \"\",\n\t\t\tgroupName: data.groupName || \"\",\n\t\t\tauthId: auth?.id || \"\",\n\t\t\tname: data.name || \"\",\n\t\t\tredirectUri: data.redirectUri || \"\",\n\t\t\tgitlabUrl: data.gitlabUrl || \"https://gitlab.com\",\n\t\t\tgitlabInternalUrl: data.gitlabInternalUrl || undefined,\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\tawait utils.gitProvider.getAll.invalidate();\n\t\t\t\ttoast.success(\"GitLab created successfully\");\n\t\t\t\tsetIsOpen(false);\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error configuring GitLab\");\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"default\"\n\t\t\t\t\tclassName=\"flex items-center space-x-1 bg-purple-700 text-white hover:bg-purple-600\"\n\t\t\t\t>\n\t\t\t\t\t<GitlabIcon />\n\t\t\t\t\t<span>GitLab</span>\n\t\t\t\t</Button>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-2xl  \">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle className=\"flex items-center gap-2\">\n\t\t\t\t\t\tGitLab Provider <GitlabIcon className=\"size-5\" />\n\t\t\t\t\t</DialogTitle>\n\t\t\t\t</DialogHeader>\n\n\t\t\t\t{isError && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tid=\"hook-form-add-gitlab\"\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\tclassName=\"grid w-full gap-1\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<CardContent className=\"p-0\">\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t\t\t<p className=\"text-muted-foreground text-sm\">\n\t\t\t\t\t\t\t\t\tTo integrate your GitLab account, you need to create a new\n\t\t\t\t\t\t\t\t\tapplication in your GitLab settings. Follow these steps:\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t<ol className=\"list-decimal list-inside text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t<li className=\"flex flex-row gap-2 items-center\">\n\t\t\t\t\t\t\t\t\t\tGo to your GitLab profile settings{\" \"}\n\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\thref={`${gitlabUrl}/-/profile/applications`}\n\t\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<ExternalLink className=\"w-fit text-primary size-4\" />\n\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t<li>Navigate to Applications</li>\n\t\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t\tCreate a new application with the following details:\n\t\t\t\t\t\t\t\t\t\t<ul className=\"list-disc list-inside ml-4\">\n\t\t\t\t\t\t\t\t\t\t\t<li>Name: Dokploy</li>\n\t\t\t\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t\t\t\tRedirect URI:{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-primary\">{webhookUrl}</span>{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t\t<li>Scopes: api, read_user, read_repository</li>\n\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t\tAfter creating, you'll receive an Application ID and Secret,\n\t\t\t\t\t\t\t\t\t\tcopy them and paste them below.\n\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t</ol>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"name\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Name</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Random Name eg(my-personal-account)\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"gitlabUrl\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Gitlab URL</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"https://gitlab.com/\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"gitlabInternalUrl\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Internal URL (Optional)</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"http://gitlab:80\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value ?? \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\tUse when GitLab runs on the same instance as Dokploy.\n\t\t\t\t\t\t\t\t\t\t\t\tUsed for OAuth token exchange to reach GitLab via\n\t\t\t\t\t\t\t\t\t\t\t\tinternal network (e.g. Docker service name).\n\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"redirectUri\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Redirect URI</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\tdisabled\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Random Name eg(my-personal-account)\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"applicationId\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Application ID</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"Application ID\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"applicationSecret\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Application Secret</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"password\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Application Secret\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"groupName\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\tGroup Name (Optional, Comma-Separated List)\n\t\t\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"For organization/group access use the slugish name of the group eg: my-org\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<Button isLoading={form.formState.isSubmitting}>\n\t\t\t\t\t\t\t\t\tConfigure GitLab App\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t</form>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/git/gitlab/edit-gitlab-provider.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { PenBoxIcon } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { GitlabIcon } from \"@/components/icons/data-tools-icons\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport { CardContent } from \"@/components/ui/card\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { api } from \"@/utils/api\";\n\nconst Schema = z.object({\n\tname: z.string().min(1, {\n\t\tmessage: \"Name is required\",\n\t}),\n\tgitlabUrl: z.string().url({\n\t\tmessage: \"Invalid Gitlab URL\",\n\t}),\n\tgitlabInternalUrl: z\n\t\t.union([z.string().url(), z.literal(\"\")])\n\t\t.optional()\n\t\t.transform((v) => (v === \"\" ? undefined : v)),\n\tgroupName: z.string().optional(),\n});\n\ntype Schema = z.infer<typeof Schema>;\n\ninterface Props {\n\tgitlabId: string;\n}\n\nexport const EditGitlabProvider = ({ gitlabId }: Props) => {\n\tconst { data: gitlab, refetch } = api.gitlab.one.useQuery(\n\t\t{\n\t\t\tgitlabId,\n\t\t},\n\t\t{\n\t\t\tenabled: !!gitlabId,\n\t\t},\n\t);\n\tconst utils = api.useUtils();\n\tconst [isOpen, setIsOpen] = useState(false);\n\tconst { mutateAsync, error, isError } = api.gitlab.update.useMutation();\n\tconst { mutateAsync: testConnection, isPending } =\n\t\tapi.gitlab.testConnection.useMutation();\n\tconst form = useForm({\n\t\tdefaultValues: {\n\t\t\tgroupName: \"\",\n\t\t\tname: \"\",\n\t\t\tgitlabUrl: \"https://gitlab.com\",\n\t\t\tgitlabInternalUrl: \"\",\n\t\t},\n\t\tresolver: zodResolver(Schema),\n\t});\n\n\tconst groupName = form.watch(\"groupName\");\n\n\tuseEffect(() => {\n\t\tform.reset({\n\t\t\tgroupName: gitlab?.groupName || \"\",\n\t\t\tname: gitlab?.gitProvider.name || \"\",\n\t\t\tgitlabUrl: gitlab?.gitlabUrl || \"\",\n\t\t\tgitlabInternalUrl: gitlab?.gitlabInternalUrl || \"\",\n\t\t});\n\t}, [form, isOpen]);\n\n\tconst onSubmit = async (data: Schema) => {\n\t\tawait mutateAsync({\n\t\t\tgitlabId,\n\t\t\tgitProviderId: gitlab?.gitProviderId || \"\",\n\t\t\tgroupName: data.groupName || \"\",\n\t\t\tname: data.name || \"\",\n\t\t\tgitlabUrl: data.gitlabUrl || \"\",\n\t\t\tgitlabInternalUrl: data.gitlabInternalUrl ?? null,\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\tawait utils.gitProvider.getAll.invalidate();\n\t\t\t\ttoast.success(\"Gitlab updated successfully\");\n\t\t\t\tsetIsOpen(false);\n\t\t\t\trefetch();\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error updating Gitlab\");\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\tclassName=\"group hover:bg-blue-500/10 \"\n\t\t\t\t>\n\t\t\t\t\t<PenBoxIcon className=\"size-3.5  text-primary group-hover:text-blue-500\" />\n\t\t\t\t</Button>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-2xl \">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle className=\"flex items-center gap-2\">\n\t\t\t\t\t\tUpdate GitLab <GitlabIcon className=\"size-5\" />\n\t\t\t\t\t</DialogTitle>\n\t\t\t\t</DialogHeader>\n\n\t\t\t\t{isError && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tid=\"hook-form-add-bitbucket\"\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\tclassName=\"grid w-full gap-1\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<CardContent className=\"p-0\">\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"name\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Name</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Random Name eg(my-personal-account)\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"gitlabUrl\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Gitlab Url</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"https://gitlab.com\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"gitlabInternalUrl\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Internal URL (Optional)</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"http://gitlab:80\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value ?? \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\tUse when GitLab runs on the same instance as Dokploy.\n\t\t\t\t\t\t\t\t\t\t\t\tUsed for OAuth token exchange to reach GitLab via\n\t\t\t\t\t\t\t\t\t\t\t\tinternal network (e.g. Docker service name).\n\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"groupName\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\tGroup Name (Optional, Comma-Separated List)\n\t\t\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"For organization/group access use the slugish name of the group eg: my-org\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<div className=\"flex w-full justify-between gap-4 mt-4\">\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\tvariant={\"secondary\"}\n\t\t\t\t\t\t\t\t\t\tisLoading={isPending}\n\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\tawait testConnection({\n\t\t\t\t\t\t\t\t\t\t\t\tgitlabId,\n\t\t\t\t\t\t\t\t\t\t\t\tgroupName: groupName || \"\",\n\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t.then(async (message) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.info(`Message: ${message}`);\n\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t.catch((error) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(`Error: ${error.message}`);\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tTest Connection\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t<Button type=\"submit\" isLoading={form.formState.isSubmitting}>\n\t\t\t\t\t\t\t\t\t\tUpdate\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t</form>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/git/show-git-providers.tsx",
    "content": "import { formatDate } from \"date-fns\";\nimport {\n\tExternalLinkIcon,\n\tGitBranch,\n\tImportIcon,\n\tLoader2,\n\tTrash2,\n} from \"lucide-react\";\nimport Link from \"next/link\";\nimport { toast } from \"sonner\";\nimport {\n\tBitbucketIcon,\n\tGiteaIcon,\n\tGithubIcon,\n\tGitlabIcon,\n} from \"@/components/icons/data-tools-icons\";\nimport { DialogAction } from \"@/components/shared/dialog-action\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button, buttonVariants } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport { api } from \"@/utils/api\";\nimport { useUrl } from \"@/utils/hooks/use-url\";\nimport { AddBitbucketProvider } from \"./bitbucket/add-bitbucket-provider\";\nimport { EditBitbucketProvider } from \"./bitbucket/edit-bitbucket-provider\";\nimport { AddGiteaProvider } from \"./gitea/add-gitea-provider\";\nimport { EditGiteaProvider } from \"./gitea/edit-gitea-provider\";\nimport { AddGithubProvider } from \"./github/add-github-provider\";\nimport { EditGithubProvider } from \"./github/edit-github-provider\";\nimport { AddGitlabProvider } from \"./gitlab/add-gitlab-provider\";\nimport { EditGitlabProvider } from \"./gitlab/edit-gitlab-provider\";\n\nexport const ShowGitProviders = () => {\n\tconst { data, isPending, refetch } = api.gitProvider.getAll.useQuery();\n\tconst { mutateAsync, isPending: isRemoving } =\n\t\tapi.gitProvider.remove.useMutation();\n\tconst url = useUrl();\n\n\tconst getGitlabUrl = (\n\t\tclientId: string,\n\t\tgitlabId: string,\n\t\tgitlabUrl: string,\n\t) => {\n\t\tconst redirectUri = `${url}/api/providers/gitlab/callback?gitlabId=${gitlabId}`;\n\t\tconst scope = \"api read_user read_repository\";\n\t\tconst authUrl = `${gitlabUrl}/oauth/authorize?client_id=${clientId}&redirect_uri=${encodeURIComponent(redirectUri)}&response_type=code&scopes=${encodeURIComponent(scope)}`;\n\t\treturn authUrl;\n\t};\n\n\treturn (\n\t\t<div className=\"w-full\">\n\t\t\t<Card className=\"h-full bg-sidebar p-2.5 rounded-xl max-w-5xl mx-auto\">\n\t\t\t\t<div className=\"rounded-xl bg-background shadow-md \">\n\t\t\t\t\t<CardHeader className=\"\">\n\t\t\t\t\t\t<CardTitle className=\"text-xl flex flex-row gap-2\">\n\t\t\t\t\t\t\t<GitBranch className=\"size-6 text-muted-foreground self-center\" />\n\t\t\t\t\t\t\tGit Providers\n\t\t\t\t\t\t</CardTitle>\n\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\tConnect your Git provider for authentication.\n\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<CardContent className=\"space-y-2 py-8 border-t\">\n\t\t\t\t\t\t{isPending ? (\n\t\t\t\t\t\t\t<div className=\"flex flex-row gap-2 items-center justify-center text-sm text-muted-foreground min-h-[25vh]\">\n\t\t\t\t\t\t\t\t<span>Loading...</span>\n\t\t\t\t\t\t\t\t<Loader2 className=\"animate-spin size-4\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{data?.length === 0 ? (\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col items-center gap-3 min-h-[25vh] justify-center\">\n\t\t\t\t\t\t\t\t\t\t<GitBranch className=\"size-8 self-center text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t<span className=\"text-base text-muted-foreground text-center\">\n\t\t\t\t\t\t\t\t\t\t\tCreate your first Git Provider\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center bg-sidebar p-1 w-full rounded-lg\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-wrap items-center gap-4 p-3.5 rounded-lg bg-background border w-full [&>button]:grow\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<AddGithubProvider />\n\t\t\t\t\t\t\t\t\t\t\t\t\t<AddGitlabProvider />\n\t\t\t\t\t\t\t\t\t\t\t\t\t<AddBitbucketProvider />\n\t\t\t\t\t\t\t\t\t\t\t\t\t<AddGiteaProvider />\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-4 min-h-[25vh]\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2 rounded-lg \">\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-base font-medium\">\n\t\t\t\t\t\t\t\t\t\t\t\tAvailable Providers\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center bg-sidebar p-1 w-full rounded-lg\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-wrap items-center gap-4 p-3.5 rounded-lg bg-background border w-full [&>button]:grow\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<AddGithubProvider />\n\t\t\t\t\t\t\t\t\t\t\t\t\t<AddGitlabProvider />\n\t\t\t\t\t\t\t\t\t\t\t\t\t<AddBitbucketProvider />\n\t\t\t\t\t\t\t\t\t\t\t\t\t<AddGiteaProvider />\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-4 rounded-lg \">\n\t\t\t\t\t\t\t\t\t\t\t{data?.map((gitProvider, _index) => {\n\t\t\t\t\t\t\t\t\t\t\t\tconst isGithub = gitProvider.providerType === \"github\";\n\t\t\t\t\t\t\t\t\t\t\t\tconst isGitlab = gitProvider.providerType === \"gitlab\";\n\t\t\t\t\t\t\t\t\t\t\t\tconst isBitbucket =\n\t\t\t\t\t\t\t\t\t\t\t\t\tgitProvider.providerType === \"bitbucket\";\n\t\t\t\t\t\t\t\t\t\t\t\tconst isGitea = gitProvider.providerType === \"gitea\";\n\n\t\t\t\t\t\t\t\t\t\t\t\tconst haveGithubRequirements =\n\t\t\t\t\t\t\t\t\t\t\t\t\tisGithub &&\n\t\t\t\t\t\t\t\t\t\t\t\t\tgitProvider.github?.githubPrivateKey &&\n\t\t\t\t\t\t\t\t\t\t\t\t\tgitProvider.github?.githubAppId &&\n\t\t\t\t\t\t\t\t\t\t\t\t\tgitProvider.github?.githubInstallationId;\n\n\t\t\t\t\t\t\t\t\t\t\t\tconst haveGitlabRequirements =\n\t\t\t\t\t\t\t\t\t\t\t\t\tisGitlab &&\n\t\t\t\t\t\t\t\t\t\t\t\t\tgitProvider.gitlab?.accessToken &&\n\t\t\t\t\t\t\t\t\t\t\t\t\tgitProvider.gitlab?.refreshToken;\n\n\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={gitProvider.gitProviderId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center justify-between bg-sidebar p-1 w-full rounded-lg\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center justify-between p-3.5 rounded-lg bg-background border w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col items-center justify-between\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex gap-2 flex-row items-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{isGithub && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<GithubIcon className=\"size-5\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{isGitlab && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<GitlabIcon className=\"size-5\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{isBitbucket && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<BitbucketIcon className=\"size-5\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{isGitea && <GiteaIcon className=\"size-5\" />}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm font-medium\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{gitProvider.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-xs text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{formatDate(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgitProvider.createdAt,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"yyyy-MM-dd hh:mm:ss a\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-1 items-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{isBitbucket &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgitProvider.bitbucket?.appPassword &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t!gitProvider.bitbucket?.apiToken ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Badge variant=\"yellow\">Deprecated</Badge>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) : null}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{!haveGithubRequirements && isGithub && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-1 items-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-xs\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAction Required\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thref={`${gitProvider?.github?.githubAppName}/installations/new?state=gh_setup:${gitProvider?.github.githubId}`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={buttonVariants({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize: \"icon\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant: \"ghost\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ImportIcon className=\"size-4 text-primary\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{haveGithubRequirements && isGithub && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thref={`${gitProvider?.github?.githubAppName}`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={buttonVariants({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize: \"icon\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant: \"ghost\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ExternalLinkIcon className=\"size-4 text-primary\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{!haveGitlabRequirements && isGitlab && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-1 items-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-xs\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAction Required\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thref={getGitlabUrl(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgitProvider.gitlab?.applicationId || \"\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgitProvider.gitlab?.gitlabId || \"\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgitProvider.gitlab?.gitlabUrl,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={buttonVariants({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize: \"icon\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant: \"ghost\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ImportIcon className=\"size-4 text-primary\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{isGithub && haveGithubRequirements && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<EditGithubProvider\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgithubId={gitProvider.github?.githubId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{isGitlab && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<EditGitlabProvider\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgitlabId={gitProvider.gitlab?.gitlabId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{isBitbucket && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<EditBitbucketProvider\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbitbucketId={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgitProvider.bitbucket?.bitbucketId\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{isGitea && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<EditGiteaProvider\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgiteaId={gitProvider.gitea?.giteaId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"Delete Git Provider\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to delete this Git Provider?\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"destructive\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait mutateAsync({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgitProviderId: gitProvider.gitProviderId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Git Provider deleted successfully\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Error deleting Git Provider\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"group hover:bg-red-500/10\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisLoading={isRemoving}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Trash2 className=\"size-4 text-primary group-hover:text-red-500\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-2 flex-wrap w-full justify-end mr-4\">\n\t\t\t\t\t\t\t\t\t\t\t{/* <AddCertificate /> */}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</CardContent>\n\t\t\t\t</div>\n\t\t\t</Card>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/handle-ai.tsx",
    "content": "\"use client\";\nimport { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { Check, ChevronDown, PenBoxIcon, PlusIcon } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCommand,\n\tCommandEmpty,\n\tCommandInput,\n\tCommandItem,\n\tCommandList,\n} from \"@/components/ui/command\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport {\n\tPopover,\n\tPopoverContent,\n\tPopoverTrigger,\n} from \"@/components/ui/popover\";\nimport { Switch } from \"@/components/ui/switch\";\nimport { cn } from \"@/lib/utils\";\nimport { api } from \"@/utils/api\";\n\nconst Schema = z.object({\n\tname: z.string().min(1, { message: \"Name is required\" }),\n\tapiUrl: z.string().url({ message: \"Please enter a valid URL\" }),\n\tapiKey: z.string(),\n\tmodel: z.string().min(1, { message: \"Model is required\" }),\n\tisEnabled: z.boolean(),\n});\n\ntype Schema = z.infer<typeof Schema>;\n\ninterface Props {\n\taiId?: string;\n}\n\nexport const HandleAi = ({ aiId }: Props) => {\n\tconst utils = api.useUtils();\n\tconst [open, setOpen] = useState(false);\n\tconst [modelPopoverOpen, setModelPopoverOpen] = useState(false);\n\tconst [modelSearch, setModelSearch] = useState(\"\");\n\tconst { data, refetch } = api.ai.one.useQuery(\n\t\t{\n\t\t\taiId: aiId || \"\",\n\t\t},\n\t\t{\n\t\t\tenabled: !!aiId,\n\t\t},\n\t);\n\tconst { mutateAsync, isPending } = aiId\n\t\t? api.ai.update.useMutation()\n\t\t: api.ai.create.useMutation();\n\n\tconst form = useForm<Schema>({\n\t\tresolver: zodResolver(Schema),\n\t\tdefaultValues: {\n\t\t\tname: \"\",\n\t\t\tapiUrl: \"\",\n\t\t\tapiKey: \"\",\n\t\t\tmodel: \"\",\n\t\t\tisEnabled: true,\n\t\t},\n\t});\n\n\tuseEffect(() => {\n\t\tif (data) {\n\t\t\tform.reset({\n\t\t\t\tname: data?.name ?? \"\",\n\t\t\t\tapiUrl: data?.apiUrl ?? \"https://api.openai.com/v1\",\n\t\t\t\tapiKey: data?.apiKey ?? \"\",\n\t\t\t\tmodel: data?.model ?? \"\",\n\t\t\t\tisEnabled: data?.isEnabled ?? true,\n\t\t\t});\n\t\t}\n\t\tsetModelSearch(\"\");\n\t\tsetModelPopoverOpen(false);\n\t}, [aiId, form, data]);\n\n\tconst apiUrl = form.watch(\"apiUrl\");\n\tconst apiKey = form.watch(\"apiKey\");\n\n\tconst isOllama = apiUrl.includes(\":11434\") || apiUrl.includes(\"ollama\");\n\tconst {\n\t\tdata: models,\n\t\tisPending: isLoadingServerModels,\n\t\terror: modelsError,\n\t} = api.ai.getModels.useQuery(\n\t\t{\n\t\t\tapiUrl: apiUrl ?? \"\",\n\t\t\tapiKey: apiKey ?? \"\",\n\t\t},\n\t\t{\n\t\t\tenabled: !!apiUrl && (isOllama || !!apiKey),\n\t\t},\n\t);\n\n\tconst onSubmit = async (data: Schema) => {\n\t\ttry {\n\t\t\tawait mutateAsync({\n\t\t\t\t...data,\n\t\t\t\taiId: aiId || \"\",\n\t\t\t});\n\n\t\t\tutils.ai.getAll.invalidate();\n\t\t\ttoast.success(\"AI settings saved successfully\");\n\t\t\trefetch();\n\t\t\tsetOpen(false);\n\t\t} catch (error) {\n\t\t\ttoast.error(\"Failed to save AI settings\", {\n\t\t\t\tdescription: error instanceof Error ? error.message : \"Unknown error\",\n\t\t\t});\n\t\t}\n\t};\n\n\treturn (\n\t\t<Dialog\n\t\t\topen={open}\n\t\t\tonOpenChange={(isOpen) => {\n\t\t\t\tsetOpen(isOpen);\n\t\t\t\tif (!isOpen) {\n\t\t\t\t\tsetModelSearch(\"\");\n\t\t\t\t\tsetModelPopoverOpen(false);\n\t\t\t\t}\n\t\t\t}}\n\t\t>\n\t\t\t<DialogTrigger className=\"\" asChild>\n\t\t\t\t{aiId ? (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\tclassName=\"group hover:bg-blue-500/10 \"\n\t\t\t\t\t>\n\t\t\t\t\t\t<PenBoxIcon className=\"size-3.5  text-primary group-hover:text-blue-500\" />\n\t\t\t\t\t</Button>\n\t\t\t\t) : (\n\t\t\t\t\t<Button className=\"cursor-pointer space-x-3\">\n\t\t\t\t\t\t<PlusIcon className=\"h-4 w-4\" />\n\t\t\t\t\t\tAdd AI\n\t\t\t\t\t</Button>\n\t\t\t\t)}\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-lg\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>{aiId ? \"Edit AI\" : \"Add AI\"}</DialogTitle>\n\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\tConfigure your AI provider settings\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t{modelsError && (\n\t\t\t\t\t\t<AlertBlock type=\"error\">{modelsError.message}</AlertBlock>\n\t\t\t\t\t)}\n\t\t\t\t\t<form onSubmit={form.handleSubmit(onSubmit)} className=\"space-y-2\">\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"name\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Name</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"My OpenAI Config\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\tA name to identify this configuration\n\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"apiUrl\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>API URL</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"https://api.openai.com/v1\"\n\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(e);\n\t\t\t\t\t\t\t\t\t\t\t\t// Reset model when user changes API URL\n\t\t\t\t\t\t\t\t\t\t\t\tif (form.getValues(\"model\")) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"model\", \"\");\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\tThe base URL for your AI provider's API\n\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t{!isOllama && (\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"apiKey\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>API Key</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\ttype=\"password\"\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"sk-...\"\n\t\t\t\t\t\t\t\t\t\t\t\tautoComplete=\"one-time-code\"\n\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(e);\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Reset model when user changes API Key\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (form.getValues(\"model\")) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"model\", \"\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\tYour API key for authentication\n\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{isLoadingServerModels && (\n\t\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\tLoading models...\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{!isLoadingServerModels && !models?.length && (\n\t\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\tNo models available\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{!isLoadingServerModels && models && models.length > 0 && (\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"model\"\n\t\t\t\t\t\t\t\trender={({ field }) => {\n\t\t\t\t\t\t\t\t\tconst selectedModel = models.find(\n\t\t\t\t\t\t\t\t\t\t(m) => m.id === field.value,\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tconst filteredModels = models.filter((model) =>\n\t\t\t\t\t\t\t\t\t\tmodel.id.toLowerCase().includes(modelSearch.toLowerCase()),\n\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t// Ensure selected model is always in the filtered list\n\t\t\t\t\t\t\t\t\tconst displayModels =\n\t\t\t\t\t\t\t\t\t\tfield.value &&\n\t\t\t\t\t\t\t\t\t\t!filteredModels.find((m) => m.id === field.value) &&\n\t\t\t\t\t\t\t\t\t\tselectedModel\n\t\t\t\t\t\t\t\t\t\t\t? [selectedModel, ...filteredModels]\n\t\t\t\t\t\t\t\t\t\t\t: filteredModels;\n\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Model</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<Popover\n\t\t\t\t\t\t\t\t\t\t\t\topen={modelPopoverOpen}\n\t\t\t\t\t\t\t\t\t\t\t\tonOpenChange={setModelPopoverOpen}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<PopoverTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"w-full justify-between\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t!field.value && \"text-muted-foreground\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{field.value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? (selectedModel?.id ?? field.value)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Select a model\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ChevronDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t</PopoverTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<PopoverContent className=\"w-[400px] p-0\" align=\"start\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Command>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandInput\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Search models...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={modelSearch}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonValueChange={setModelSearch}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandList>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandEmpty>No models found.</CommandEmpty>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{displayModels.map((model) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst isSelected = field.value === model.id;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={model.id}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={model.id}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(model.id);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetModelPopoverOpen(false);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetModelSearch(\"\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Check\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"mr-2 h-4 w-4\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisSelected\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"opacity-100\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"opacity-0\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{model.id}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandList>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Command>\n\t\t\t\t\t\t\t\t\t\t\t\t</PopoverContent>\n\t\t\t\t\t\t\t\t\t\t\t</Popover>\n\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\tSelect an AI model to use\n\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"isEnabled\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"flex flex-row items-center justify-between rounded-lg border p-4\">\n\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t<FormLabel className=\"text-base\">\n\t\t\t\t\t\t\t\t\t\t\tEnable AI Features\n\t\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\tTurn on/off AI functionality\n\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<div className=\"flex justify-end  gap-2 pt-4\">\n\t\t\t\t\t\t\t<Button type=\"submit\" isLoading={isPending}>\n\t\t\t\t\t\t\t\t{aiId ? \"Update\" : \"Create\"}\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</form>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/linking-account/linking-account.tsx",
    "content": "\"use client\";\n\nimport { Link2, Loader2, Unlink } from \"lucide-react\";\nimport { useCallback, useEffect, useState } from \"react\";\nimport { toast } from \"sonner\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport { authClient } from \"@/lib/auth-client\";\n\nconst LINKING_CALLBACK_URL = \"/dashboard/settings/profile\";\n\nconst TRUSTED_PROVIDERS = [\"google\", \"github\"] as const;\ntype SocialProvider = (typeof TRUSTED_PROVIDERS)[number];\n\ntype AccountItem = {\n\tproviderId: string;\n\taccountId?: string;\n};\n\nfunction providerLabel(providerId: string): string {\n\treturn providerId.charAt(0).toUpperCase() + providerId.slice(1);\n}\n\nexport function LinkingAccount() {\n\tconst [accounts, setAccounts] = useState<AccountItem[]>([]);\n\tconst [accountsLoading, setAccountsLoading] = useState(true);\n\tconst [linkingProvider, setLinkingProvider] = useState<SocialProvider | null>(\n\t\tnull,\n\t);\n\tconst [unlinkingProviderId, setUnlinkingProviderId] = useState<string | null>(\n\t\tnull,\n\t);\n\n\tconst fetchAccounts = useCallback(async () => {\n\t\tsetAccountsLoading(true);\n\t\ttry {\n\t\t\tconst { data } = await authClient.listAccounts();\n\t\t\tconst list = Array.isArray(data)\n\t\t\t\t? data\n\t\t\t\t: ((data && typeof data === \"object\" && \"accounts\" in data\n\t\t\t\t\t\t? (data as { accounts?: AccountItem[] }).accounts\n\t\t\t\t\t\t: null) ?? []);\n\t\t\tsetAccounts(Array.isArray(list) ? list : []);\n\t\t} catch {\n\t\t\tsetAccounts([]);\n\t\t} finally {\n\t\t\tsetAccountsLoading(false);\n\t\t}\n\t}, []);\n\n\tuseEffect(() => {\n\t\tfetchAccounts();\n\t}, [fetchAccounts]);\n\n\tconst linkedProviderIds = new Set(accounts.map((a) => a.providerId));\n\tconst socialAccounts = accounts.filter((a) =>\n\t\tTRUSTED_PROVIDERS.includes(a.providerId as SocialProvider),\n\t);\n\n\tconst handleLinkSocial = async (provider: SocialProvider) => {\n\t\tsetLinkingProvider(provider);\n\t\ttry {\n\t\t\tconst { error } = await authClient.linkSocial({\n\t\t\t\tprovider,\n\t\t\t\tcallbackURL: LINKING_CALLBACK_URL,\n\t\t\t});\n\t\t\tif (error) {\n\t\t\t\ttoast.error(error.message ?? \"Failed to link account\");\n\t\t\t\tsetLinkingProvider(null);\n\t\t\t\treturn;\n\t\t\t}\n\t\t} catch (err) {\n\t\t\ttoast.error(\n\t\t\t\t\"Failed to link account\",\n\t\t\t\terr instanceof Error ? { description: err.message } : undefined,\n\t\t\t);\n\t\t\tsetLinkingProvider(null);\n\t\t}\n\t};\n\n\tconst handleUnlink = async (providerId: string, accountId?: string) => {\n\t\tsetUnlinkingProviderId(providerId);\n\t\ttry {\n\t\t\tconst { error } = await authClient.unlinkAccount({\n\t\t\t\tproviderId,\n\t\t\t\t...(accountId && { accountId }),\n\t\t\t});\n\t\t\tif (error) {\n\t\t\t\ttoast.error(error.message ?? \"Failed to unlink account\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ttoast.success(\"Account unlinked\");\n\t\t\tawait fetchAccounts();\n\t\t} catch (err) {\n\t\t\ttoast.error(\n\t\t\t\t\"Failed to unlink account\",\n\t\t\t\terr instanceof Error ? { description: err.message } : undefined,\n\t\t\t);\n\t\t} finally {\n\t\t\tsetUnlinkingProviderId(null);\n\t\t}\n\t};\n\n\tconst canUnlink = accounts.length > 1;\n\n\treturn (\n\t\t<Card className=\"h-full bg-sidebar p-2.5 rounded-xl max-w-6xl mx-auto w-full\">\n\t\t\t<div className=\"rounded-xl bg-background shadow-md\">\n\t\t\t\t<CardHeader>\n\t\t\t\t\t<div className=\"flex flex-row gap-2 flex-wrap justify-between items-center\">\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<CardTitle className=\"text-xl flex flex-row gap-2\">\n\t\t\t\t\t\t\t\t<Link2 className=\"size-6 text-muted-foreground self-center\" />\n\t\t\t\t\t\t\t\tLinking account\n\t\t\t\t\t\t\t</CardTitle>\n\t\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\t\tLink your Google or GitHub account to sign in with them.\n\t\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</CardHeader>\n\t\t\t\t<CardContent className=\"space-y-6 py-8 border-t\">\n\t\t\t\t\t{/* Linked accounts */}\n\t\t\t\t\t<div className=\"space-y-2\">\n\t\t\t\t\t\t<p className=\"text-sm font-medium\">Linked accounts</p>\n\t\t\t\t\t\t{accountsLoading ? (\n\t\t\t\t\t\t\t<div className=\"flex items-center gap-2 text-sm text-muted-foreground py-2\">\n\t\t\t\t\t\t\t\t<Loader2 className=\"size-4 animate-spin\" />\n\t\t\t\t\t\t\t\tLoading...\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : socialAccounts.length === 0 ? (\n\t\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground py-2\">\n\t\t\t\t\t\t\t\tNo social accounts linked yet.\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<ul className=\"space-y-2\">\n\t\t\t\t\t\t\t\t{socialAccounts.map((acc) => (\n\t\t\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\t\t\tkey={acc.accountId ?? acc.providerId}\n\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center justify-between rounded-lg border px-3 py-2 text-sm\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<span className=\"font-medium\">\n\t\t\t\t\t\t\t\t\t\t\t{providerLabel(acc.providerId)}\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t{canUnlink && (\n\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-destructive hover:text-destructive hover:bg-destructive/10\"\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\t\t\t\t\t\thandleUnlink(acc.providerId, acc.accountId)\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tdisabled={unlinkingProviderId === acc.providerId}\n\t\t\t\t\t\t\t\t\t\t\t\tisLoading={unlinkingProviderId === acc.providerId}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{unlinkingProviderId === acc.providerId ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Loader2 className=\"size-4 animate-spin\" />\n\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Unlink className=\"mr-1.5 size-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tUnlink\n\t\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<p className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\tClick a provider below to link it to your account. You will be\n\t\t\t\t\t\tredirected to complete the flow.\n\t\t\t\t\t</p>\n\t\t\t\t\t<div className=\"flex flex-wrap gap-3\">\n\t\t\t\t\t\t{!linkedProviderIds.has(\"google\") && (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tclassName=\"min-w-[180px]\"\n\t\t\t\t\t\t\t\tonClick={() => handleLinkSocial(\"google\")}\n\t\t\t\t\t\t\t\tdisabled={!!linkingProvider}\n\t\t\t\t\t\t\t\tisLoading={linkingProvider === \"google\"}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{linkingProvider === \"google\" ? (\n\t\t\t\t\t\t\t\t\t<Loader2 className=\"mr-2 size-4 animate-spin\" />\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<svg viewBox=\"0 0 24 24\" className=\"mr-2 size-4\">\n\t\t\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t\t\t\t\t\t\td=\"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z\"\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t\t\t\t\t\t\td=\"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z\"\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t\t\t\t\t\t\td=\"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z\"\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t\t\t\t\t\t\td=\"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z\"\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\tLink with Google\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!linkedProviderIds.has(\"github\") && (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tclassName=\"min-w-[180px]\"\n\t\t\t\t\t\t\t\tonClick={() => handleLinkSocial(\"github\")}\n\t\t\t\t\t\t\t\tdisabled={!!linkingProvider}\n\t\t\t\t\t\t\t\tisLoading={linkingProvider === \"github\"}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{linkingProvider === \"github\" ? (\n\t\t\t\t\t\t\t\t\t<Loader2 className=\"mr-2 size-4 animate-spin\" />\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"mr-2 size-4\"\n\t\t\t\t\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<path d=\"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z\" />\n\t\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\tLink with GitHub\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</CardContent>\n\t\t\t</div>\n\t\t</Card>\n\t);\n}\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/notifications/handle-notifications.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport {\n\tAlertTriangle,\n\tMail,\n\tPenBoxIcon,\n\tPlusIcon,\n\tTrash2,\n} from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { useFieldArray, useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport {\n\tDiscordIcon,\n\tGotifyIcon,\n\tLarkIcon,\n\tNtfyIcon,\n\tPushoverIcon,\n\tResendIcon,\n\tSlackIcon,\n\tTeamsIcon,\n\tTelegramIcon,\n} from \"@/components/icons/notification-icons\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { Label } from \"@/components/ui/label\";\nimport { RadioGroup, RadioGroupItem } from \"@/components/ui/radio-group\";\nimport { Switch } from \"@/components/ui/switch\";\nimport { api } from \"@/utils/api\";\n\nconst notificationBaseSchema = z.object({\n\tname: z.string().min(1, {\n\t\tmessage: \"Name is required\",\n\t}),\n\tappDeploy: z.boolean().default(false),\n\tappBuildError: z.boolean().default(false),\n\tdatabaseBackup: z.boolean().default(false),\n\tvolumeBackup: z.boolean().default(false),\n\tdokployRestart: z.boolean().default(false),\n\tdockerCleanup: z.boolean().default(false),\n\tserverThreshold: z.boolean().default(false),\n});\n\nexport const notificationSchema = z.discriminatedUnion(\"type\", [\n\tz\n\t\t.object({\n\t\t\ttype: z.literal(\"slack\"),\n\t\t\twebhookUrl: z.string().min(1, { message: \"Webhook URL is required\" }),\n\t\t\tchannel: z.string(),\n\t\t})\n\t\t.merge(notificationBaseSchema),\n\tz\n\t\t.object({\n\t\t\ttype: z.literal(\"telegram\"),\n\t\t\tbotToken: z.string().min(1, { message: \"Bot Token is required\" }),\n\t\t\tchatId: z.string().min(1, { message: \"Chat ID is required\" }),\n\t\t\tmessageThreadId: z.string().optional(),\n\t\t})\n\t\t.merge(notificationBaseSchema),\n\tz\n\t\t.object({\n\t\t\ttype: z.literal(\"discord\"),\n\t\t\twebhookUrl: z.string().min(1, { message: \"Webhook URL is required\" }),\n\t\t\tdecoration: z.boolean().default(true),\n\t\t})\n\t\t.merge(notificationBaseSchema),\n\tz\n\t\t.object({\n\t\t\ttype: z.literal(\"email\"),\n\t\t\tsmtpServer: z.string().min(1, { message: \"SMTP Server is required\" }),\n\t\t\tsmtpPort: z.number().min(1, { message: \"SMTP Port is required\" }),\n\t\t\tusername: z.string().min(1, { message: \"Username is required\" }),\n\t\t\tpassword: z.string().min(1, { message: \"Password is required\" }),\n\t\t\tfromAddress: z.string().min(1, { message: \"From Address is required\" }),\n\t\t\ttoAddresses: z\n\t\t\t\t.array(\n\t\t\t\t\tz.string().min(1, { message: \"Email is required\" }).email({\n\t\t\t\t\t\tmessage: \"Email is invalid\",\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t\t.min(1, { message: \"At least one email is required\" }),\n\t\t})\n\t\t.merge(notificationBaseSchema),\n\tz\n\t\t.object({\n\t\t\ttype: z.literal(\"resend\"),\n\t\t\tapiKey: z.string().min(1, { message: \"API Key is required\" }),\n\t\t\tfromAddress: z\n\t\t\t\t.string()\n\t\t\t\t.min(1, { message: \"From Address is required\" })\n\t\t\t\t.email({ message: \"Email is invalid\" }),\n\t\t\ttoAddresses: z\n\t\t\t\t.array(\n\t\t\t\t\tz.string().min(1, { message: \"Email is required\" }).email({\n\t\t\t\t\t\tmessage: \"Email is invalid\",\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t\t.min(1, { message: \"At least one email is required\" }),\n\t\t})\n\t\t.merge(notificationBaseSchema),\n\tz\n\t\t.object({\n\t\t\ttype: z.literal(\"gotify\"),\n\t\t\tserverUrl: z.string().min(1, { message: \"Server URL is required\" }),\n\t\t\tappToken: z.string().min(1, { message: \"App Token is required\" }),\n\t\t\tpriority: z.number().min(1).max(10).default(5),\n\t\t\tdecoration: z.boolean().default(true),\n\t\t})\n\t\t.merge(notificationBaseSchema),\n\tz\n\t\t.object({\n\t\t\ttype: z.literal(\"ntfy\"),\n\t\t\tserverUrl: z.string().min(1, { message: \"Server URL is required\" }),\n\t\t\ttopic: z.string().min(1, { message: \"Topic is required\" }),\n\t\t\taccessToken: z.string().optional(),\n\t\t\tpriority: z.number().min(1).max(5).default(3),\n\t\t})\n\t\t.merge(notificationBaseSchema),\n\tz\n\t\t.object({\n\t\t\ttype: z.literal(\"pushover\"),\n\t\t\tuserKey: z.string().min(1, { message: \"User Key is required\" }),\n\t\t\tapiToken: z.string().min(1, { message: \"API Token is required\" }),\n\t\t\tpriority: z.number().min(-2).max(2).default(0),\n\t\t\tretry: z.number().min(30).nullish(),\n\t\t\texpire: z.number().min(1).max(10800).nullish(),\n\t\t})\n\t\t.merge(notificationBaseSchema),\n\tz\n\t\t.object({\n\t\t\ttype: z.literal(\"custom\"),\n\t\t\tendpoint: z.string().min(1, { message: \"Endpoint URL is required\" }),\n\t\t\theaders: z\n\t\t\t\t.array(\n\t\t\t\t\tz.object({\n\t\t\t\t\t\tkey: z.string(),\n\t\t\t\t\t\tvalue: z.string(),\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t\t.optional()\n\t\t\t\t.default([]),\n\t\t})\n\t\t.merge(notificationBaseSchema),\n\tz\n\t\t.object({\n\t\t\ttype: z.literal(\"lark\"),\n\t\t\twebhookUrl: z.string().min(1, { message: \"Webhook URL is required\" }),\n\t\t})\n\t\t.merge(notificationBaseSchema),\n\tz\n\t\t.object({\n\t\t\ttype: z.literal(\"teams\"),\n\t\t\twebhookUrl: z.string().min(1, { message: \"Webhook URL is required\" }),\n\t\t})\n\t\t.merge(notificationBaseSchema),\n]);\n\nexport const notificationsMap = {\n\tslack: {\n\t\ticon: <SlackIcon />,\n\t\tlabel: \"Slack\",\n\t},\n\ttelegram: {\n\t\ticon: <TelegramIcon />,\n\t\tlabel: \"Telegram\",\n\t},\n\tdiscord: {\n\t\ticon: <DiscordIcon />,\n\t\tlabel: \"Discord\",\n\t},\n\tlark: {\n\t\ticon: <LarkIcon className=\"text-muted-foreground\" />,\n\t\tlabel: \"Lark\",\n\t},\n\tteams: {\n\t\ticon: <TeamsIcon className=\"text-muted-foreground\" />,\n\t\tlabel: \"Microsoft Teams\",\n\t},\n\temail: {\n\t\ticon: <Mail size={29} className=\"text-muted-foreground\" />,\n\t\tlabel: \"Email\",\n\t},\n\tresend: {\n\t\ticon: <ResendIcon className=\"text-muted-foreground\" />,\n\t\tlabel: \"Resend\",\n\t},\n\tgotify: {\n\t\ticon: <GotifyIcon />,\n\t\tlabel: \"Gotify\",\n\t},\n\tntfy: {\n\t\ticon: <NtfyIcon />,\n\t\tlabel: \"ntfy\",\n\t},\n\tpushover: {\n\t\ticon: <PushoverIcon />,\n\t\tlabel: \"Pushover\",\n\t},\n\tcustom: {\n\t\ticon: <PenBoxIcon size={29} className=\"text-muted-foreground\" />,\n\t\tlabel: \"Custom\",\n\t},\n};\n\nexport type NotificationSchema = z.infer<typeof notificationSchema>;\n\ninterface Props {\n\tnotificationId?: string;\n}\n\nexport const HandleNotifications = ({ notificationId }: Props) => {\n\tconst utils = api.useUtils();\n\tconst [visible, setVisible] = useState(false);\n\tconst { data: isCloud } = api.settings.isCloud.useQuery();\n\n\tconst { data: notification } = api.notification.one.useQuery(\n\t\t{\n\t\t\tnotificationId: notificationId || \"\",\n\t\t},\n\t\t{\n\t\t\tenabled: !!notificationId,\n\t\t},\n\t);\n\tconst { mutateAsync: testSlackConnection, isPending: isLoadingSlack } =\n\t\tapi.notification.testSlackConnection.useMutation();\n\tconst { mutateAsync: testTelegramConnection, isPending: isLoadingTelegram } =\n\t\tapi.notification.testTelegramConnection.useMutation();\n\tconst { mutateAsync: testDiscordConnection, isPending: isLoadingDiscord } =\n\t\tapi.notification.testDiscordConnection.useMutation();\n\tconst { mutateAsync: testEmailConnection, isPending: isLoadingEmail } =\n\t\tapi.notification.testEmailConnection.useMutation();\n\tconst { mutateAsync: testResendConnection, isPending: isLoadingResend } =\n\t\tapi.notification.testResendConnection.useMutation();\n\tconst { mutateAsync: testGotifyConnection, isPending: isLoadingGotify } =\n\t\tapi.notification.testGotifyConnection.useMutation();\n\tconst { mutateAsync: testNtfyConnection, isPending: isLoadingNtfy } =\n\t\tapi.notification.testNtfyConnection.useMutation();\n\tconst { mutateAsync: testLarkConnection, isPending: isLoadingLark } =\n\t\tapi.notification.testLarkConnection.useMutation();\n\tconst { mutateAsync: testTeamsConnection, isPending: isLoadingTeams } =\n\t\tapi.notification.testTeamsConnection.useMutation();\n\n\tconst { mutateAsync: testCustomConnection, isPending: isLoadingCustom } =\n\t\tapi.notification.testCustomConnection.useMutation();\n\n\tconst { mutateAsync: testPushoverConnection, isPending: isLoadingPushover } =\n\t\tapi.notification.testPushoverConnection.useMutation();\n\n\tconst customMutation = notificationId\n\t\t? api.notification.updateCustom.useMutation()\n\t\t: api.notification.createCustom.useMutation();\n\tconst slackMutation = notificationId\n\t\t? api.notification.updateSlack.useMutation()\n\t\t: api.notification.createSlack.useMutation();\n\tconst telegramMutation = notificationId\n\t\t? api.notification.updateTelegram.useMutation()\n\t\t: api.notification.createTelegram.useMutation();\n\tconst discordMutation = notificationId\n\t\t? api.notification.updateDiscord.useMutation()\n\t\t: api.notification.createDiscord.useMutation();\n\tconst emailMutation = notificationId\n\t\t? api.notification.updateEmail.useMutation()\n\t\t: api.notification.createEmail.useMutation();\n\tconst resendMutation = notificationId\n\t\t? api.notification.updateResend.useMutation()\n\t\t: api.notification.createResend.useMutation();\n\tconst gotifyMutation = notificationId\n\t\t? api.notification.updateGotify.useMutation()\n\t\t: api.notification.createGotify.useMutation();\n\tconst ntfyMutation = notificationId\n\t\t? api.notification.updateNtfy.useMutation()\n\t\t: api.notification.createNtfy.useMutation();\n\tconst larkMutation = notificationId\n\t\t? api.notification.updateLark.useMutation()\n\t\t: api.notification.createLark.useMutation();\n\tconst teamsMutation = notificationId\n\t\t? api.notification.updateTeams.useMutation()\n\t\t: api.notification.createTeams.useMutation();\n\tconst pushoverMutation = notificationId\n\t\t? api.notification.updatePushover.useMutation()\n\t\t: api.notification.createPushover.useMutation();\n\n\tconst form = useForm({\n\t\tdefaultValues: {\n\t\t\ttype: \"slack\",\n\t\t\twebhookUrl: \"\",\n\t\t\tchannel: \"\",\n\t\t\tname: \"\",\n\t\t},\n\t\tresolver: zodResolver(notificationSchema),\n\t});\n\tconst type = form.watch(\"type\");\n\n\tconst { fields, append, remove } = useFieldArray({\n\t\tcontrol: form.control,\n\t\tname: \"toAddresses\" as never,\n\t});\n\n\tconst {\n\t\tfields: headerFields,\n\t\tappend: appendHeader,\n\t\tremove: removeHeader,\n\t} = useFieldArray({\n\t\tcontrol: form.control,\n\t\tname: \"headers\" as never,\n\t});\n\n\tuseEffect(() => {\n\t\tif ((type === \"email\" || type === \"resend\") && fields.length === 0) {\n\t\t\tappend(\"\");\n\t\t}\n\t}, [type, append, fields.length]);\n\n\tuseEffect(() => {\n\t\tif (notification) {\n\t\t\tif (notification.notificationType === \"slack\") {\n\t\t\t\tform.reset({\n\t\t\t\t\tappBuildError: notification.appBuildError,\n\t\t\t\t\tappDeploy: notification.appDeploy,\n\t\t\t\t\tdokployRestart: notification.dokployRestart,\n\t\t\t\t\tdatabaseBackup: notification.databaseBackup,\n\t\t\t\t\tvolumeBackup: notification.volumeBackup,\n\t\t\t\t\tdockerCleanup: notification.dockerCleanup,\n\t\t\t\t\twebhookUrl: notification.slack?.webhookUrl,\n\t\t\t\t\tchannel: notification.slack?.channel || \"\",\n\t\t\t\t\tname: notification.name,\n\t\t\t\t\ttype: notification.notificationType,\n\t\t\t\t\tserverThreshold: notification.serverThreshold,\n\t\t\t\t});\n\t\t\t} else if (notification.notificationType === \"telegram\") {\n\t\t\t\tform.reset({\n\t\t\t\t\tappBuildError: notification.appBuildError,\n\t\t\t\t\tappDeploy: notification.appDeploy,\n\t\t\t\t\tdokployRestart: notification.dokployRestart,\n\t\t\t\t\tdatabaseBackup: notification.databaseBackup,\n\t\t\t\t\tvolumeBackup: notification.volumeBackup,\n\t\t\t\t\tbotToken: notification.telegram?.botToken,\n\t\t\t\t\tmessageThreadId: notification.telegram?.messageThreadId || \"\",\n\t\t\t\t\tchatId: notification.telegram?.chatId,\n\t\t\t\t\ttype: notification.notificationType,\n\t\t\t\t\tname: notification.name,\n\t\t\t\t\tdockerCleanup: notification.dockerCleanup,\n\t\t\t\t\tserverThreshold: notification.serverThreshold,\n\t\t\t\t});\n\t\t\t} else if (notification.notificationType === \"discord\") {\n\t\t\t\tform.reset({\n\t\t\t\t\tappBuildError: notification.appBuildError,\n\t\t\t\t\tappDeploy: notification.appDeploy,\n\t\t\t\t\tdokployRestart: notification.dokployRestart,\n\t\t\t\t\tdatabaseBackup: notification.databaseBackup,\n\t\t\t\t\tvolumeBackup: notification.volumeBackup,\n\t\t\t\t\ttype: notification.notificationType,\n\t\t\t\t\twebhookUrl: notification.discord?.webhookUrl,\n\t\t\t\t\tdecoration: notification.discord?.decoration ?? undefined,\n\t\t\t\t\tname: notification.name,\n\t\t\t\t\tdockerCleanup: notification.dockerCleanup,\n\t\t\t\t\tserverThreshold: notification.serverThreshold,\n\t\t\t\t});\n\t\t\t} else if (notification.notificationType === \"email\") {\n\t\t\t\tform.reset({\n\t\t\t\t\tappBuildError: notification.appBuildError,\n\t\t\t\t\tappDeploy: notification.appDeploy,\n\t\t\t\t\tdokployRestart: notification.dokployRestart,\n\t\t\t\t\tdatabaseBackup: notification.databaseBackup,\n\t\t\t\t\tvolumeBackup: notification.volumeBackup,\n\t\t\t\t\ttype: notification.notificationType,\n\t\t\t\t\tsmtpServer: notification.email?.smtpServer,\n\t\t\t\t\tsmtpPort: notification.email?.smtpPort,\n\t\t\t\t\tusername: notification.email?.username,\n\t\t\t\t\tpassword: notification.email?.password,\n\t\t\t\t\ttoAddresses: notification.email?.toAddresses,\n\t\t\t\t\tfromAddress: notification.email?.fromAddress,\n\t\t\t\t\tname: notification.name,\n\t\t\t\t\tdockerCleanup: notification.dockerCleanup,\n\t\t\t\t\tserverThreshold: notification.serverThreshold,\n\t\t\t\t});\n\t\t\t} else if (notification.notificationType === \"resend\") {\n\t\t\t\tform.reset({\n\t\t\t\t\tappBuildError: notification.appBuildError,\n\t\t\t\t\tappDeploy: notification.appDeploy,\n\t\t\t\t\tdokployRestart: notification.dokployRestart,\n\t\t\t\t\tdatabaseBackup: notification.databaseBackup,\n\t\t\t\t\tvolumeBackup: notification.volumeBackup,\n\t\t\t\t\ttype: notification.notificationType,\n\t\t\t\t\tapiKey: notification.resend?.apiKey,\n\t\t\t\t\ttoAddresses: notification.resend?.toAddresses,\n\t\t\t\t\tfromAddress: notification.resend?.fromAddress,\n\t\t\t\t\tname: notification.name,\n\t\t\t\t\tdockerCleanup: notification.dockerCleanup,\n\t\t\t\t\tserverThreshold: notification.serverThreshold,\n\t\t\t\t});\n\t\t\t} else if (notification.notificationType === \"gotify\") {\n\t\t\t\tform.reset({\n\t\t\t\t\tappBuildError: notification.appBuildError,\n\t\t\t\t\tappDeploy: notification.appDeploy,\n\t\t\t\t\tdokployRestart: notification.dokployRestart,\n\t\t\t\t\tdatabaseBackup: notification.databaseBackup,\n\t\t\t\t\tvolumeBackup: notification.volumeBackup,\n\t\t\t\t\ttype: notification.notificationType,\n\t\t\t\t\tappToken: notification.gotify?.appToken,\n\t\t\t\t\tdecoration: notification.gotify?.decoration ?? undefined,\n\t\t\t\t\tpriority: notification.gotify?.priority,\n\t\t\t\t\tserverUrl: notification.gotify?.serverUrl,\n\t\t\t\t\tname: notification.name,\n\t\t\t\t\tdockerCleanup: notification.dockerCleanup,\n\t\t\t\t});\n\t\t\t} else if (notification.notificationType === \"ntfy\") {\n\t\t\t\tform.reset({\n\t\t\t\t\tappBuildError: notification.appBuildError,\n\t\t\t\t\tappDeploy: notification.appDeploy,\n\t\t\t\t\tdokployRestart: notification.dokployRestart,\n\t\t\t\t\tdatabaseBackup: notification.databaseBackup,\n\t\t\t\t\tvolumeBackup: notification.volumeBackup,\n\t\t\t\t\ttype: notification.notificationType,\n\t\t\t\t\taccessToken: notification.ntfy?.accessToken || \"\",\n\t\t\t\t\ttopic: notification.ntfy?.topic,\n\t\t\t\t\tpriority: notification.ntfy?.priority,\n\t\t\t\t\tserverUrl: notification.ntfy?.serverUrl,\n\t\t\t\t\tname: notification.name,\n\t\t\t\t\tdockerCleanup: notification.dockerCleanup,\n\t\t\t\t\tserverThreshold: notification.serverThreshold,\n\t\t\t\t});\n\t\t\t} else if (notification.notificationType === \"lark\") {\n\t\t\t\tform.reset({\n\t\t\t\t\tappBuildError: notification.appBuildError,\n\t\t\t\t\tappDeploy: notification.appDeploy,\n\t\t\t\t\tdokployRestart: notification.dokployRestart,\n\t\t\t\t\tdatabaseBackup: notification.databaseBackup,\n\t\t\t\t\ttype: notification.notificationType,\n\t\t\t\t\twebhookUrl: notification.lark?.webhookUrl,\n\t\t\t\t\tname: notification.name,\n\t\t\t\t\tdockerCleanup: notification.dockerCleanup,\n\t\t\t\t\tvolumeBackup: notification.volumeBackup,\n\t\t\t\t\tserverThreshold: notification.serverThreshold,\n\t\t\t\t});\n\t\t\t} else if (notification.notificationType === \"teams\") {\n\t\t\t\tform.reset({\n\t\t\t\t\tappBuildError: notification.appBuildError,\n\t\t\t\t\tappDeploy: notification.appDeploy,\n\t\t\t\t\tdokployRestart: notification.dokployRestart,\n\t\t\t\t\tdatabaseBackup: notification.databaseBackup,\n\t\t\t\t\tvolumeBackup: notification.volumeBackup,\n\t\t\t\t\ttype: notification.notificationType,\n\t\t\t\t\twebhookUrl: notification.teams?.webhookUrl,\n\t\t\t\t\tname: notification.name,\n\t\t\t\t\tdockerCleanup: notification.dockerCleanup,\n\t\t\t\t\tserverThreshold: notification.serverThreshold,\n\t\t\t\t});\n\t\t\t} else if (notification.notificationType === \"custom\") {\n\t\t\t\tform.reset({\n\t\t\t\t\tappBuildError: notification.appBuildError,\n\t\t\t\t\tappDeploy: notification.appDeploy,\n\t\t\t\t\tdokployRestart: notification.dokployRestart,\n\t\t\t\t\tdatabaseBackup: notification.databaseBackup,\n\t\t\t\t\ttype: notification.notificationType,\n\t\t\t\t\tendpoint: notification.custom?.endpoint || \"\",\n\t\t\t\t\theaders: notification.custom?.headers\n\t\t\t\t\t\t? Object.entries(notification.custom.headers).map(\n\t\t\t\t\t\t\t\t([key, value]) => ({\n\t\t\t\t\t\t\t\t\tkey,\n\t\t\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t: [],\n\t\t\t\t\tname: notification.name,\n\t\t\t\t\tvolumeBackup: notification.volumeBackup,\n\t\t\t\t\tdockerCleanup: notification.dockerCleanup,\n\t\t\t\t\tserverThreshold: notification.serverThreshold,\n\t\t\t\t});\n\t\t\t} else if (notification.notificationType === \"pushover\") {\n\t\t\t\tform.reset({\n\t\t\t\t\tappBuildError: notification.appBuildError,\n\t\t\t\t\tappDeploy: notification.appDeploy,\n\t\t\t\t\tdokployRestart: notification.dokployRestart,\n\t\t\t\t\tdatabaseBackup: notification.databaseBackup,\n\t\t\t\t\tvolumeBackup: notification.volumeBackup,\n\t\t\t\t\ttype: notification.notificationType,\n\t\t\t\t\tuserKey: notification.pushover?.userKey,\n\t\t\t\t\tapiToken: notification.pushover?.apiToken,\n\t\t\t\t\tpriority: notification.pushover?.priority,\n\t\t\t\t\tretry: notification.pushover?.retry ?? undefined,\n\t\t\t\t\texpire: notification.pushover?.expire ?? undefined,\n\t\t\t\t\tname: notification.name,\n\t\t\t\t\tdockerCleanup: notification.dockerCleanup,\n\t\t\t\t\tserverThreshold: notification.serverThreshold,\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\tform.reset();\n\t\t}\n\t}, [form, form.reset, form.formState.isSubmitSuccessful, notification]);\n\n\tconst activeMutation = {\n\t\tslack: slackMutation,\n\t\ttelegram: telegramMutation,\n\t\tdiscord: discordMutation,\n\t\temail: emailMutation,\n\t\tresend: resendMutation,\n\t\tgotify: gotifyMutation,\n\t\tntfy: ntfyMutation,\n\t\tlark: larkMutation,\n\t\tteams: teamsMutation,\n\t\tcustom: customMutation,\n\t\tpushover: pushoverMutation,\n\t};\n\n\tconst onSubmit = async (data: NotificationSchema) => {\n\t\tconst {\n\t\t\tappBuildError,\n\t\t\tappDeploy,\n\t\t\tdokployRestart,\n\t\t\tdatabaseBackup,\n\t\t\tvolumeBackup,\n\t\t\tdockerCleanup,\n\t\t\tserverThreshold,\n\t\t} = data;\n\t\tlet promise: Promise<unknown> | null = null;\n\t\tif (data.type === \"slack\") {\n\t\t\tpromise = slackMutation.mutateAsync({\n\t\t\t\tappBuildError: appBuildError,\n\t\t\t\tappDeploy: appDeploy,\n\t\t\t\tdokployRestart: dokployRestart,\n\t\t\t\tdatabaseBackup: databaseBackup,\n\t\t\t\tvolumeBackup: volumeBackup,\n\t\t\t\twebhookUrl: data.webhookUrl,\n\t\t\t\tchannel: data.channel,\n\t\t\t\tname: data.name,\n\t\t\t\tdockerCleanup: dockerCleanup,\n\t\t\t\tslackId: notification?.slackId || \"\",\n\t\t\t\tnotificationId: notificationId || \"\",\n\t\t\t\tserverThreshold: serverThreshold,\n\t\t\t});\n\t\t} else if (data.type === \"telegram\") {\n\t\t\tpromise = telegramMutation.mutateAsync({\n\t\t\t\tappBuildError: appBuildError,\n\t\t\t\tappDeploy: appDeploy,\n\t\t\t\tdokployRestart: dokployRestart,\n\t\t\t\tdatabaseBackup: databaseBackup,\n\t\t\t\tvolumeBackup: volumeBackup,\n\t\t\t\tbotToken: data.botToken,\n\t\t\t\tmessageThreadId: data.messageThreadId || \"\",\n\t\t\t\tchatId: data.chatId,\n\t\t\t\tname: data.name,\n\t\t\t\tdockerCleanup: dockerCleanup,\n\t\t\t\tnotificationId: notificationId || \"\",\n\t\t\t\ttelegramId: notification?.telegramId || \"\",\n\t\t\t\tserverThreshold: serverThreshold,\n\t\t\t});\n\t\t} else if (data.type === \"discord\") {\n\t\t\tpromise = discordMutation.mutateAsync({\n\t\t\t\tappBuildError: appBuildError,\n\t\t\t\tappDeploy: appDeploy,\n\t\t\t\tdokployRestart: dokployRestart,\n\t\t\t\tdatabaseBackup: databaseBackup,\n\t\t\t\tvolumeBackup: volumeBackup,\n\t\t\t\twebhookUrl: data.webhookUrl,\n\t\t\t\tdecoration: data.decoration,\n\t\t\t\tname: data.name,\n\t\t\t\tdockerCleanup: dockerCleanup,\n\t\t\t\tnotificationId: notificationId || \"\",\n\t\t\t\tdiscordId: notification?.discordId || \"\",\n\t\t\t\tserverThreshold: serverThreshold,\n\t\t\t});\n\t\t} else if (data.type === \"email\") {\n\t\t\tpromise = emailMutation.mutateAsync({\n\t\t\t\tappBuildError: appBuildError,\n\t\t\t\tappDeploy: appDeploy,\n\t\t\t\tdokployRestart: dokployRestart,\n\t\t\t\tdatabaseBackup: databaseBackup,\n\t\t\t\tvolumeBackup: volumeBackup,\n\t\t\t\tsmtpServer: data.smtpServer,\n\t\t\t\tsmtpPort: data.smtpPort,\n\t\t\t\tusername: data.username,\n\t\t\t\tpassword: data.password,\n\t\t\t\tfromAddress: data.fromAddress,\n\t\t\t\ttoAddresses: data.toAddresses,\n\t\t\t\tname: data.name,\n\t\t\t\tdockerCleanup: dockerCleanup,\n\t\t\t\tnotificationId: notificationId || \"\",\n\t\t\t\temailId: notification?.emailId || \"\",\n\t\t\t\tserverThreshold: serverThreshold,\n\t\t\t});\n\t\t} else if (data.type === \"resend\") {\n\t\t\tpromise = resendMutation.mutateAsync({\n\t\t\t\tappBuildError: appBuildError,\n\t\t\t\tappDeploy: appDeploy,\n\t\t\t\tdokployRestart: dokployRestart,\n\t\t\t\tdatabaseBackup: databaseBackup,\n\t\t\t\tvolumeBackup: volumeBackup,\n\t\t\t\tapiKey: data.apiKey,\n\t\t\t\tfromAddress: data.fromAddress,\n\t\t\t\ttoAddresses: data.toAddresses,\n\t\t\t\tname: data.name,\n\t\t\t\tdockerCleanup: dockerCleanup,\n\t\t\t\tnotificationId: notificationId || \"\",\n\t\t\t\tresendId: notification?.resendId || \"\",\n\t\t\t\tserverThreshold: serverThreshold,\n\t\t\t});\n\t\t} else if (data.type === \"gotify\") {\n\t\t\tpromise = gotifyMutation.mutateAsync({\n\t\t\t\tappBuildError: appBuildError,\n\t\t\t\tappDeploy: appDeploy,\n\t\t\t\tdokployRestart: dokployRestart,\n\t\t\t\tdatabaseBackup: databaseBackup,\n\t\t\t\tvolumeBackup: volumeBackup,\n\t\t\t\tserverUrl: data.serverUrl,\n\t\t\t\tappToken: data.appToken,\n\t\t\t\tpriority: data.priority,\n\t\t\t\tname: data.name,\n\t\t\t\tdockerCleanup: dockerCleanup,\n\t\t\t\tdecoration: data.decoration,\n\t\t\t\tnotificationId: notificationId || \"\",\n\t\t\t\tgotifyId: notification?.gotifyId || \"\",\n\t\t\t});\n\t\t} else if (data.type === \"ntfy\") {\n\t\t\tpromise = ntfyMutation.mutateAsync({\n\t\t\t\tappBuildError: appBuildError,\n\t\t\t\tappDeploy: appDeploy,\n\t\t\t\tdokployRestart: dokployRestart,\n\t\t\t\tdatabaseBackup: databaseBackup,\n\t\t\t\tvolumeBackup: volumeBackup,\n\t\t\t\tserverUrl: data.serverUrl,\n\t\t\t\taccessToken: data.accessToken || \"\",\n\t\t\t\ttopic: data.topic,\n\t\t\t\tpriority: data.priority,\n\t\t\t\tname: data.name,\n\t\t\t\tdockerCleanup: dockerCleanup,\n\t\t\t\tnotificationId: notificationId || \"\",\n\t\t\t\tntfyId: notification?.ntfyId || \"\",\n\t\t\t});\n\t\t} else if (data.type === \"lark\") {\n\t\t\tpromise = larkMutation.mutateAsync({\n\t\t\t\tappBuildError: appBuildError,\n\t\t\t\tappDeploy: appDeploy,\n\t\t\t\tdokployRestart: dokployRestart,\n\t\t\t\tdatabaseBackup: databaseBackup,\n\t\t\t\tvolumeBackup: volumeBackup,\n\t\t\t\twebhookUrl: data.webhookUrl,\n\t\t\t\tname: data.name,\n\t\t\t\tdockerCleanup: dockerCleanup,\n\t\t\t\tnotificationId: notificationId || \"\",\n\t\t\t\tlarkId: notification?.larkId || \"\",\n\t\t\t\tserverThreshold: serverThreshold,\n\t\t\t});\n\t\t} else if (data.type === \"teams\") {\n\t\t\tpromise = teamsMutation.mutateAsync({\n\t\t\t\tappBuildError: appBuildError,\n\t\t\t\tappDeploy: appDeploy,\n\t\t\t\tdokployRestart: dokployRestart,\n\t\t\t\tdatabaseBackup: databaseBackup,\n\t\t\t\tvolumeBackup: volumeBackup,\n\t\t\t\twebhookUrl: data.webhookUrl,\n\t\t\t\tname: data.name,\n\t\t\t\tdockerCleanup: dockerCleanup,\n\t\t\t\tnotificationId: notificationId || \"\",\n\t\t\t\tteamsId: notification?.teamsId || \"\",\n\t\t\t\tserverThreshold: serverThreshold,\n\t\t\t});\n\t\t} else if (data.type === \"custom\") {\n\t\t\t// Convert headers array to object\n\t\t\tconst headersRecord =\n\t\t\t\tdata.headers && data.headers.length > 0\n\t\t\t\t\t? data.headers.reduce(\n\t\t\t\t\t\t\t(acc, { key, value }) => {\n\t\t\t\t\t\t\t\tif (key.trim()) acc[key] = value;\n\t\t\t\t\t\t\t\treturn acc;\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{} as Record<string, string>,\n\t\t\t\t\t\t)\n\t\t\t\t\t: undefined;\n\n\t\t\tpromise = customMutation.mutateAsync({\n\t\t\t\tappBuildError: appBuildError,\n\t\t\t\tappDeploy: appDeploy,\n\t\t\t\tdokployRestart: dokployRestart,\n\t\t\t\tdatabaseBackup: databaseBackup,\n\t\t\t\tvolumeBackup: volumeBackup,\n\t\t\t\tendpoint: data.endpoint,\n\t\t\t\theaders: headersRecord,\n\t\t\t\tname: data.name,\n\t\t\t\tdockerCleanup: dockerCleanup,\n\t\t\t\tserverThreshold: serverThreshold,\n\t\t\t\tnotificationId: notificationId || \"\",\n\t\t\t\tcustomId: notification?.customId || \"\",\n\t\t\t});\n\t\t} else if (data.type === \"pushover\") {\n\t\t\tif (data.priority === 2 && (data.retry == null || data.expire == null)) {\n\t\t\t\ttoast.error(\"Retry and expire are required for emergency priority (2)\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tpromise = pushoverMutation.mutateAsync({\n\t\t\t\tappBuildError: appBuildError,\n\t\t\t\tappDeploy: appDeploy,\n\t\t\t\tdokployRestart: dokployRestart,\n\t\t\t\tdatabaseBackup: databaseBackup,\n\t\t\t\tvolumeBackup: volumeBackup,\n\t\t\t\tuserKey: data.userKey,\n\t\t\t\tapiToken: data.apiToken,\n\t\t\t\tpriority: data.priority,\n\t\t\t\tretry: data.priority === 2 ? data.retry : undefined,\n\t\t\t\texpire: data.priority === 2 ? data.expire : undefined,\n\t\t\t\tname: data.name,\n\t\t\t\tdockerCleanup: dockerCleanup,\n\t\t\t\tserverThreshold: serverThreshold,\n\t\t\t\tnotificationId: notificationId || \"\",\n\t\t\t\tpushoverId: notification?.pushoverId || \"\",\n\t\t\t});\n\t\t}\n\n\t\tif (promise) {\n\t\t\tawait promise\n\t\t\t\t.then(async () => {\n\t\t\t\t\ttoast.success(\n\t\t\t\t\t\tnotificationId ? \"Notification Updated\" : \"Notification Created\",\n\t\t\t\t\t);\n\t\t\t\t\tform.reset({\n\t\t\t\t\t\ttype: \"slack\",\n\t\t\t\t\t\twebhookUrl: \"\",\n\t\t\t\t\t});\n\t\t\t\t\tsetVisible(false);\n\t\t\t\t\tawait utils.notification.all.invalidate();\n\t\t\t\t\tif (notificationId) {\n\t\t\t\t\t\tawait utils.notification.one.invalidate({ notificationId });\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.catch(() => {\n\t\t\t\t\ttoast.error(\n\t\t\t\t\t\tnotificationId\n\t\t\t\t\t\t\t? \"Error updating a notification\"\n\t\t\t\t\t\t\t: \"Error creating a notification\",\n\t\t\t\t\t);\n\t\t\t\t});\n\t\t}\n\t};\n\treturn (\n\t\t<Dialog open={visible} onOpenChange={setVisible}>\n\t\t\t<DialogTrigger className=\"\" asChild>\n\t\t\t\t{notificationId ? (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\tclassName=\"group hover:bg-blue-500/10 \"\n\t\t\t\t\t>\n\t\t\t\t\t\t<PenBoxIcon className=\"size-3.5  text-primary group-hover:text-blue-500\" />\n\t\t\t\t\t</Button>\n\t\t\t\t) : (\n\t\t\t\t\t<Button className=\"cursor-pointer space-x-3\">\n\t\t\t\t\t\t<PlusIcon className=\"h-4 w-4\" />\n\t\t\t\t\t\tAdd Notification\n\t\t\t\t\t</Button>\n\t\t\t\t)}\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-3xl\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>\n\t\t\t\t\t\t{notificationId ? \"Update\" : \"Add\"} Notification\n\t\t\t\t\t</DialogTitle>\n\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\t{notificationId\n\t\t\t\t\t\t\t? \"Update your notification providers for multiple channels.\"\n\t\t\t\t\t\t\t: \"Create new notification providers for multiple channels.\"}\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tid=\"hook-form\"\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\tclassName=\"grid w-full gap-8 \"\n\t\t\t\t\t>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tdefaultValue={form.control._defaultValues.type}\n\t\t\t\t\t\t\tname=\"type\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem className=\"space-y-3\">\n\t\t\t\t\t\t\t\t\t<FormLabel className=\"text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\tSelect a provider\n\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<RadioGroup\n\t\t\t\t\t\t\t\t\t\t\tonValueChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\tdefaultValue={field.value}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"grid w-full grid-cols-1 sm:grid-cols-2 md:grid-cols-4 gap-4\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{Object.entries(notificationsMap).map(([key, value]) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={key}\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex w-full items-center space-x-3 space-y-0\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl className=\"w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<RadioGroupItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={key}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tid={key}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"peer sr-only\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Label\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtmlFor={key}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-24 flex flex-col gap-2 items-center justify-between rounded-md border-2 border-muted bg-popover p-4 hover:bg-accent hover:text-accent-foreground peer-data-[state=checked]:border-primary [&:has([data-state=checked])]:border-primary cursor-pointer\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{value.icon}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{value.label}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Label>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t</RadioGroup>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t{activeMutation[field.value].isError && (\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-4 rounded-lg bg-red-50 p-2 dark:bg-red-950\">\n\t\t\t\t\t\t\t\t\t\t\t<AlertTriangle className=\"text-red-600 dark:text-red-400\" />\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm text-red-600 dark:text-red-400\">\n\t\t\t\t\t\t\t\t\t\t\t\t{activeMutation[field.value].error?.message}\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t\t<FormLabel className=\"text-lg font-semibold leading-none tracking-tight\">\n\t\t\t\t\t\t\t\tFill the next fields.\n\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"name\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Name</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"Name\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t{type === \"slack\" && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"webhookUrl\"\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Webhook URL</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"channel\"\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Channel</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"Channel\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{type === \"telegram\" && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"botToken\"\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Bot Token</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"6660491268:AAFMGmajZOVewpMNZCgJr5H7cpXpoZPgvXw\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"chatId\"\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Chat ID</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"431231869\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"messageThreadId\"\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Message Thread ID</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"11\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional. Use it when you want to send notifications\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tto a specific topic in a group.\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{type === \"discord\" && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"webhookUrl\"\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Webhook URL</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"https://discord.com/api/webhooks/123456789/ABCDEFGHIJKLMNOPQRSTUVWXYZ\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"decoration\"\n\t\t\t\t\t\t\t\t\t\t\tdefaultValue={true}\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem className=\"flex items-center justify-between rounded-lg border p-3 shadow-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Decoration</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDecorate the notification with emojis.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{type === \"email\" && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex md:flex-row flex-col gap-2 w-full\">\n\t\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\t\tname=\"smtpServer\"\n\t\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem className=\"w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>SMTP Server</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"smtp.gmail.com\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\t\tname=\"smtpPort\"\n\t\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem className=\"w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>SMTP Port</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"587\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst value = e.target.value;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (value === \"\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(undefined);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst port = Number.parseInt(value);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (port > 0 && port < 65536) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(port);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value || \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex md:flex-row flex-col gap-2 w-full\">\n\t\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\t\tname=\"username\"\n\t\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem className=\"w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Username</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"username\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\t\tname=\"password\"\n\t\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem className=\"w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Password</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"password\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"******************\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"fromAddress\"\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>From Address</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"from@example.com\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2 pt-2\">\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>To Addresses</FormLabel>\n\n\t\t\t\t\t\t\t\t\t\t\t{fields.map((field, index) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={field.id}\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex flex-row gap-2 w-full\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tname={`toAddresses.${index}`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem className=\"w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"email@example.com\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-full\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tremove(index);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tRemove\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t{type === \"email\" &&\n\t\t\t\t\t\t\t\t\t\t\t\t\"toAddresses\" in form.formState.errors && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"text-sm font-medium text-destructive\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{form.formState?.errors?.toAddresses?.root?.message}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\tappend(\"\");\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\tAdd\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{type === \"resend\" && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"apiKey\"\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>API Key</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"password\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"re_********\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"fromAddress\"\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>From Address</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"from@example.com\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2 pt-2\">\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>To Addresses</FormLabel>\n\n\t\t\t\t\t\t\t\t\t\t\t{fields.map((field, index) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={field.id}\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex flex-row gap-2 w-full\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tname={`toAddresses.${index}`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem className=\"w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"email@example.com\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-full\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tremove(index);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tRemove\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t{type === \"resend\" &&\n\t\t\t\t\t\t\t\t\t\t\t\t\"toAddresses\" in form.formState.errors && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"text-sm font-medium text-destructive\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{form.formState?.errors?.toAddresses?.root?.message}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\tappend(\"\");\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\tAdd\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{type === \"gotify\" && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"serverUrl\"\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Server URL</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"https://gotify.example.com\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"appToken\"\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>App Token</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"AzxcvbnmKjhgfdsa...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"priority\"\n\t\t\t\t\t\t\t\t\t\t\tdefaultValue={5}\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem className=\"w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Priority</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"5\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst value = e.target.value;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (value) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst port = Number.parseInt(value);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (port > 0 && port < 10) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(port);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tMessage priority (1-10, default: 5)\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"decoration\"\n\t\t\t\t\t\t\t\t\t\t\tdefaultValue={true}\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem className=\"flex items-center justify-between rounded-lg border p-3 shadow-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Decoration</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDecorate the notification with emojis.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{type === \"ntfy\" && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"serverUrl\"\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Server URL</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"https://ntfy.sh\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"topic\"\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Topic</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"deployments\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"accessToken\"\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Access Token</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"AzxcvbnmKjhgfdsa...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value ?? \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOptional. Leave blank for public topics.\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"priority\"\n\t\t\t\t\t\t\t\t\t\t\tdefaultValue={3}\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem className=\"w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Priority</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"3\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst value = e.target.value;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (value) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst port = Number.parseInt(value);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (port > 0 && port <= 5) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(port);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tMessage priority (1-5, default: 3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{type === \"custom\" && (\n\t\t\t\t\t\t\t\t\t<div className=\"space-y-4\">\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"endpoint\"\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Webhook URL</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"https://api.example.com/webhook\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tThe URL where POST requests will be sent with\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnotification data.\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-3\">\n\t\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Headers</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\tOptional. Custom headers for your POST request (e.g.,\n\t\t\t\t\t\t\t\t\t\t\t\t\tAuthorization, Content-Type).\n\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t{headerFields.map((field, index) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={field.id}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-2 p-2 border rounded-md bg-muted/50\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tname={`headers.${index}.key` as never}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem className=\"flex-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"Key\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tname={`headers.${index}.value` as never}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem className=\"flex-[2]\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"Value\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => removeHeader(index)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-red-500 hover:text-red-700 hover:bg-red-50\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Trash2 className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => appendHeader({ key: \"\", value: \"\" })}\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-full\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<PlusIcon className=\"h-4 w-4 mr-2\" />\n\t\t\t\t\t\t\t\t\t\t\t\tAdd header\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{type === \"lark\" && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"webhookUrl\"\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Webhook URL</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"https://open.larksuite.com/open-apis/bot/v2/hook/xxxxxxxxxxxxxxxxxxxxxxxx\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{type === \"teams\" && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"webhookUrl\"\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Webhook URL</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"https://xxx.webhook.office.com/webhookb2/...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tIncoming Webhook URL from a Teams channel. Add an\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tIncoming Webhook in your channel settings to get the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tURL.\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{type === \"pushover\" && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"userKey\"\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>User Key</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"ub3de9kl2q...\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"apiToken\"\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>API Token</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"a3d9k2q7m4...\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\tname=\"priority\"\n\t\t\t\t\t\t\t\t\t\t\tdefaultValue={0}\n\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem className=\"w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Priority</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"0\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value ?? 0}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst value = e.target.value;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (value === \"\" || value === \"-\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst priority = Number.parseInt(value);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t!Number.isNaN(priority) &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpriority >= -2 &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpriority <= 2\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(priority);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmin={-2}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmax={2}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tMessage priority (-2 to 2, default: 0, emergency: 2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t{form.watch(\"priority\") === 2 && (\n\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"retry\"\n\t\t\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem className=\"w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Retry (seconds)</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"30\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value ?? \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst value = e.target.value;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (value === \"\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(undefined);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst retry = Number.parseInt(value);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!Number.isNaN(retry)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(retry);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmin={30}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tHow often (in seconds) to retry. Minimum 30\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tseconds.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"expire\"\n\t\t\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem className=\"w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Expire (seconds)</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"3600\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value ?? \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst value = e.target.value;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (value === \"\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(undefined);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst expire = Number.parseInt(value);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!Number.isNaN(expire)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(expire);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmin={1}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmax={10800}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tHow long to keep retrying (max 10800 seconds / 3\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thours).\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t\t<FormLabel className=\"text-lg font-semibold leading-none tracking-tight\">\n\t\t\t\t\t\t\t\tSelect the actions.\n\t\t\t\t\t\t\t</FormLabel>\n\n\t\t\t\t\t\t\t<div className=\"grid md:grid-cols-2 gap-4\">\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"appDeploy\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem className=\"flex flex-row items-center justify-between rounded-lg border p-3 shadow-sm gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"\">\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>App Deploy</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\tTrigger the action when a app is deployed.\n\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"appBuildError\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem className=\"flex flex-row items-center justify-between rounded-lg border p-3 shadow-sm gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>App Build Error</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\tTrigger the action when the build fails.\n\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"databaseBackup\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem className=\"flex flex-row items-center justify-between rounded-lg border p-3 shadow-sm gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Database Backup</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\tTrigger the action when a database backup is created.\n\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"volumeBackup\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem className=\"flex flex-row items-center justify-between rounded-lg border p-3 shadow-sm gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Volume Backup</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\tTrigger the action when a volume backup is created.\n\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"dockerCleanup\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem className=\"flex flex-row items-center justify-between rounded-lg border p-3 shadow-sm gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Docker Cleanup</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\tTrigger the action when the docker cleanup is\n\t\t\t\t\t\t\t\t\t\t\t\t\tperformed.\n\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t{!isCloud && (\n\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\tname=\"dokployRestart\"\n\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t<FormItem className=\"flex flex-row items-center justify-between rounded-lg border p-3 shadow-sm gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Dokploy Restart</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tTrigger the action when dokploy is restarted.\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{isCloud && (\n\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\tname=\"serverThreshold\"\n\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t<FormItem className=\"flex flex-row items-center justify-between rounded-lg border p-3 shadow-sm gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Server Threshold</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tTrigger the action when the server threshold is\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treached.\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</form>\n\n\t\t\t\t\t<DialogFooter className=\"flex flex-row gap-2 !justify-between w-full\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tisLoading={\n\t\t\t\t\t\t\t\tisLoadingSlack ||\n\t\t\t\t\t\t\t\tisLoadingTelegram ||\n\t\t\t\t\t\t\t\tisLoadingDiscord ||\n\t\t\t\t\t\t\t\tisLoadingEmail ||\n\t\t\t\t\t\t\t\tisLoadingResend ||\n\t\t\t\t\t\t\t\tisLoadingGotify ||\n\t\t\t\t\t\t\t\tisLoadingNtfy ||\n\t\t\t\t\t\t\t\tisLoadingLark ||\n\t\t\t\t\t\t\t\tisLoadingTeams ||\n\t\t\t\t\t\t\t\tisLoadingCustom ||\n\t\t\t\t\t\t\t\tisLoadingPushover\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\tconst isValid = await form.trigger();\n\t\t\t\t\t\t\t\tif (!isValid) return;\n\n\t\t\t\t\t\t\t\tconst data = form.getValues();\n\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tif (data.type === \"slack\") {\n\t\t\t\t\t\t\t\t\t\tawait testSlackConnection({\n\t\t\t\t\t\t\t\t\t\t\twebhookUrl: data.webhookUrl,\n\t\t\t\t\t\t\t\t\t\t\tchannel: data.channel,\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t} else if (data.type === \"telegram\") {\n\t\t\t\t\t\t\t\t\t\tawait testTelegramConnection({\n\t\t\t\t\t\t\t\t\t\t\tbotToken: data.botToken,\n\t\t\t\t\t\t\t\t\t\t\tchatId: data.chatId,\n\t\t\t\t\t\t\t\t\t\t\tmessageThreadId: data.messageThreadId || \"\",\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t} else if (data.type === \"discord\") {\n\t\t\t\t\t\t\t\t\t\tawait testDiscordConnection({\n\t\t\t\t\t\t\t\t\t\t\twebhookUrl: data.webhookUrl,\n\t\t\t\t\t\t\t\t\t\t\tdecoration: data.decoration,\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t} else if (data.type === \"email\") {\n\t\t\t\t\t\t\t\t\t\tawait testEmailConnection({\n\t\t\t\t\t\t\t\t\t\t\tsmtpServer: data.smtpServer,\n\t\t\t\t\t\t\t\t\t\t\tsmtpPort: data.smtpPort,\n\t\t\t\t\t\t\t\t\t\t\tusername: data.username,\n\t\t\t\t\t\t\t\t\t\t\tpassword: data.password,\n\t\t\t\t\t\t\t\t\t\t\tfromAddress: data.fromAddress,\n\t\t\t\t\t\t\t\t\t\t\ttoAddresses: data.toAddresses,\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t} else if (data.type === \"resend\") {\n\t\t\t\t\t\t\t\t\t\tawait testResendConnection({\n\t\t\t\t\t\t\t\t\t\t\tapiKey: data.apiKey,\n\t\t\t\t\t\t\t\t\t\t\tfromAddress: data.fromAddress,\n\t\t\t\t\t\t\t\t\t\t\ttoAddresses: data.toAddresses,\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t} else if (data.type === \"gotify\") {\n\t\t\t\t\t\t\t\t\t\tawait testGotifyConnection({\n\t\t\t\t\t\t\t\t\t\t\tserverUrl: data.serverUrl,\n\t\t\t\t\t\t\t\t\t\t\tappToken: data.appToken,\n\t\t\t\t\t\t\t\t\t\t\tpriority: data.priority ?? 0,\n\t\t\t\t\t\t\t\t\t\t\tdecoration: data.decoration,\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t} else if (data.type === \"ntfy\") {\n\t\t\t\t\t\t\t\t\t\tawait testNtfyConnection({\n\t\t\t\t\t\t\t\t\t\t\tserverUrl: data.serverUrl,\n\t\t\t\t\t\t\t\t\t\t\ttopic: data.topic,\n\t\t\t\t\t\t\t\t\t\t\taccessToken: data.accessToken || \"\",\n\t\t\t\t\t\t\t\t\t\t\tpriority: data.priority ?? 0,\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t} else if (data.type === \"lark\") {\n\t\t\t\t\t\t\t\t\t\tawait testLarkConnection({\n\t\t\t\t\t\t\t\t\t\t\twebhookUrl: data.webhookUrl,\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t} else if (data.type === \"teams\") {\n\t\t\t\t\t\t\t\t\t\tawait testTeamsConnection({\n\t\t\t\t\t\t\t\t\t\t\twebhookUrl: data.webhookUrl,\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t} else if (data.type === \"custom\") {\n\t\t\t\t\t\t\t\t\t\tconst headersRecord =\n\t\t\t\t\t\t\t\t\t\t\tdata.headers && data.headers.length > 0\n\t\t\t\t\t\t\t\t\t\t\t\t? data.headers.reduce(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t(acc, { key, value }) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (key.trim()) acc[key] = value;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn acc;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{} as Record<string, string>,\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\t\t\t\t\t\tawait testCustomConnection({\n\t\t\t\t\t\t\t\t\t\t\tendpoint: data.endpoint,\n\t\t\t\t\t\t\t\t\t\t\theaders: headersRecord,\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t} else if (data.type === \"pushover\") {\n\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\tdata.priority === 2 &&\n\t\t\t\t\t\t\t\t\t\t\t(data.retry == null || data.expire == null)\n\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t\t\t\t\t\t\"Retry and expire are required for emergency priority (2)\",\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tawait testPushoverConnection({\n\t\t\t\t\t\t\t\t\t\t\tuserKey: data.userKey,\n\t\t\t\t\t\t\t\t\t\t\tapiToken: data.apiToken,\n\t\t\t\t\t\t\t\t\t\t\tpriority: data.priority ?? 0,\n\t\t\t\t\t\t\t\t\t\t\tretry: data.priority === 2 ? data.retry : undefined,\n\t\t\t\t\t\t\t\t\t\t\texpire: data.priority === 2 ? data.expire : undefined,\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\ttoast.success(\"Connection Success\");\n\t\t\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\t\t\ttoast.error(\n\t\t\t\t\t\t\t\t\t\t`Error testing the provider: ${error instanceof Error ? error.message : \"Unknown error\"}`,\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tTest Notification\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tisLoading={form.formState.isSubmitting}\n\t\t\t\t\t\t\tform=\"hook-form\"\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{notificationId ? \"Update\" : \"Create\"}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</DialogFooter>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/notifications/show-notifications.tsx",
    "content": "import { Bell, Loader2, Mail, PenBoxIcon, Trash2 } from \"lucide-react\";\nimport { toast } from \"sonner\";\nimport {\n\tDiscordIcon,\n\tGotifyIcon,\n\tLarkIcon,\n\tNtfyIcon,\n\tResendIcon,\n\tSlackIcon,\n\tTeamsIcon,\n\tTelegramIcon,\n} from \"@/components/icons/notification-icons\";\nimport { DialogAction } from \"@/components/shared/dialog-action\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport { api } from \"@/utils/api\";\nimport { HandleNotifications } from \"./handle-notifications\";\n\nexport const ShowNotifications = () => {\n\tconst { data, isPending, refetch } = api.notification.all.useQuery();\n\tconst { mutateAsync, isPending: isRemoving } =\n\t\tapi.notification.remove.useMutation();\n\tconst { data: permissions } = api.user.getPermissions.useQuery();\n\n\treturn (\n\t\t<div className=\"w-full\">\n\t\t\t<Card className=\"h-full bg-sidebar  p-2.5 rounded-xl  max-w-5xl mx-auto\">\n\t\t\t\t<div className=\"rounded-xl bg-background shadow-md \">\n\t\t\t\t\t<CardHeader className=\"\">\n\t\t\t\t\t\t<CardTitle className=\"text-xl flex flex-row gap-2\">\n\t\t\t\t\t\t\t<Bell className=\"size-6 text-muted-foreground self-center\" />\n\t\t\t\t\t\t\tNotifications\n\t\t\t\t\t\t</CardTitle>\n\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\tAdd your providers to receive notifications, like Discord, Slack,\n\t\t\t\t\t\t\tTelegram, Teams, Email, Resend, Lark.\n\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<CardContent className=\"space-y-2 py-8 border-t\">\n\t\t\t\t\t\t{isPending ? (\n\t\t\t\t\t\t\t<div className=\"flex flex-row gap-2 items-center justify-center text-sm text-muted-foreground min-h-[25vh]\">\n\t\t\t\t\t\t\t\t<span>Loading...</span>\n\t\t\t\t\t\t\t\t<Loader2 className=\"animate-spin size-4\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{data?.length === 0 ? (\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col items-center gap-3  min-h-[25vh] justify-center\">\n\t\t\t\t\t\t\t\t\t\t<Bell />\n\t\t\t\t\t\t\t\t\t\t<span className=\"text-base text-muted-foreground text-center\">\n\t\t\t\t\t\t\t\t\t\t\tTo send notifications it is required to set at least 1\n\t\t\t\t\t\t\t\t\t\t\tprovider.\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t{permissions?.notification.create && (\n\t\t\t\t\t\t\t\t\t\t\t<HandleNotifications />\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-4 min-h-[25vh]\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-4 rounded-lg \">\n\t\t\t\t\t\t\t\t\t\t\t{data?.map((notification, _index) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={notification.notificationId}\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center justify-between bg-sidebar p-1 w-full rounded-lg\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center justify-between p-3.5 rounded-lg bg-background border  w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm flex flex-row items-center gap-4\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{notification.notificationType === \"slack\" && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex  items-center justify-center rounded-lg\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SlackIcon className=\"size-6\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{notification.notificationType === \"telegram\" && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex  items-center justify-center rounded-lg \">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TelegramIcon className=\"size-7 \" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{notification.notificationType === \"discord\" && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex  items-center justify-center rounded-lg\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DiscordIcon className=\"size-7 \" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{notification.notificationType === \"email\" && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex  items-center justify-center rounded-lg \">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Mail className=\"size-6 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{notification.notificationType === \"resend\" && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex  items-center justify-center rounded-lg \">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ResendIcon className=\"size-6 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{notification.notificationType === \"gotify\" && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex  items-center justify-center rounded-lg \">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<GotifyIcon className=\"size-6\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{notification.notificationType === \"ntfy\" && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex  items-center justify-center rounded-lg \">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<NtfyIcon className=\"size-6\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{notification.notificationType === \"custom\" && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex  items-center justify-center rounded-lg \">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<PenBoxIcon className=\"size-6 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{notification.notificationType === \"lark\" && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex  items-center justify-center rounded-lg\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<LarkIcon className=\"size-7 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{notification.notificationType === \"teams\" && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex  items-center justify-center rounded-lg\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TeamsIcon className=\"size-7 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{notification.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<HandleNotifications\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnotificationId={notification.notificationId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{permissions?.notification.delete && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"Delete Notification\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to delete this notification?\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"destructive\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait mutateAsync({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnotificationId:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnotification.notificationId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Notification deleted successfully\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Error deleting notification\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"group hover:bg-red-500/10 \"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisLoading={isRemoving}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Trash2 className=\"size-4 text-primary group-hover:text-red-500\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t{permissions?.notification.create && (\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-2 flex-wrap w-full justify-end mr-4\">\n\t\t\t\t\t\t\t\t\t\t\t\t<HandleNotifications />\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</CardContent>\n\t\t\t\t</div>\n\t\t\t</Card>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/profile/configure-2fa.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport copy from \"copy-to-clipboard\";\nimport {\n\tCopyIcon,\n\tDownloadIcon,\n\tKeyRound,\n\tRefreshCw,\n\tShieldOff,\n} from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport {\n\tAlertDialog,\n\tAlertDialogAction,\n\tAlertDialogCancel,\n\tAlertDialogContent,\n\tAlertDialogDescription,\n\tAlertDialogFooter,\n\tAlertDialogHeader,\n\tAlertDialogTitle,\n} from \"@/components/ui/alert-dialog\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { authClient } from \"@/lib/auth-client\";\nimport { api } from \"@/utils/api\";\nimport {\n\tBACKUP_CODES_PLACEHOLDER,\n\tbackupCodeTemplate,\n\tDATE_PLACEHOLDER,\n\tUSERNAME_PLACEHOLDER,\n} from \"./enable-2fa\";\n\nconst PasswordSchema = z.object({\n\tpassword: z.string().min(8, {\n\t\tmessage: \"Password is required\",\n\t}),\n});\n\ntype PasswordForm = z.infer<typeof PasswordSchema>;\ntype Step = \"password\" | \"actions\" | \"backup-codes\";\n\nexport const Configure2FA = () => {\n\tconst utils = api.useUtils();\n\tconst { data: currentUser } = api.user.get.useQuery();\n\tconst [isDialogOpen, setIsDialogOpen] = useState(false);\n\tconst [step, setStep] = useState<Step>(\"password\");\n\tconst [password, setPassword] = useState(\"\");\n\tconst [backupCodes, setBackupCodes] = useState<string[]>([]);\n\tconst [showDisableConfirm, setShowDisableConfirm] = useState(false);\n\tconst [isDisabling, setIsDisabling] = useState(false);\n\tconst [isRegenerating, setIsRegenerating] = useState(false);\n\n\tconst form = useForm<PasswordForm>({\n\t\tresolver: zodResolver(PasswordSchema),\n\t\tdefaultValues: {\n\t\t\tpassword: \"\",\n\t\t},\n\t});\n\n\tuseEffect(() => {\n\t\tif (!isDialogOpen) {\n\t\t\tsetStep(\"password\");\n\t\t\tsetPassword(\"\");\n\t\t\tsetBackupCodes([]);\n\t\t\tform.reset();\n\t\t}\n\t}, [isDialogOpen, form]);\n\n\tconst handlePasswordSubmit = async (formData: PasswordForm) => {\n\t\tsetIsRegenerating(true);\n\t\ttry {\n\t\t\t// Verify password by attempting to generate backup codes\n\t\t\t// This validates the password and checks if 2FA is enabled\n\t\t\tconst result = await authClient.twoFactor.generateBackupCodes({\n\t\t\t\tpassword: formData.password,\n\t\t\t});\n\n\t\t\tif (result.error) {\n\t\t\t\tform.setError(\"password\", { message: result.error.message });\n\t\t\t\ttoast.error(result.error.message);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If we get here, password is correct\n\t\t\tsetPassword(formData.password);\n\t\t\tsetStep(\"actions\");\n\t\t} catch (error) {\n\t\t\tform.setError(\"password\", {\n\t\t\t\tmessage: error instanceof Error ? error.message : \"Incorrect password\",\n\t\t\t});\n\t\t\ttoast.error(\"Incorrect password\");\n\t\t} finally {\n\t\t\tsetIsRegenerating(false);\n\t\t}\n\t};\n\n\tconst handleRegenerateBackupCodes = async () => {\n\t\tsetIsRegenerating(true);\n\t\ttry {\n\t\t\tconst result = await authClient.twoFactor.generateBackupCodes({\n\t\t\t\tpassword,\n\t\t\t});\n\n\t\t\tif (result.error) {\n\t\t\t\ttoast.error(result.error.message);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (result.data?.backupCodes) {\n\t\t\t\tsetBackupCodes(result.data.backupCodes);\n\t\t\t\tsetStep(\"backup-codes\");\n\t\t\t\ttoast.success(\"Backup codes regenerated successfully\");\n\t\t\t}\n\t\t} catch (error) {\n\t\t\ttoast.error(\n\t\t\t\terror instanceof Error\n\t\t\t\t\t? error.message\n\t\t\t\t\t: \"Failed to regenerate backup codes\",\n\t\t\t);\n\t\t} finally {\n\t\t\tsetIsRegenerating(false);\n\t\t}\n\t};\n\n\tconst handleDisable2FA = async () => {\n\t\tsetIsDisabling(true);\n\t\ttry {\n\t\t\tconst result = await authClient.twoFactor.disable({\n\t\t\t\tpassword,\n\t\t\t});\n\n\t\t\tif (result.error) {\n\t\t\t\ttoast.error(result.error.message);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\ttoast.success(\"2FA disabled successfully\");\n\t\t\tutils.user.get.invalidate();\n\t\t\tsetIsDialogOpen(false);\n\t\t\tsetShowDisableConfirm(false);\n\t\t} catch (error) {\n\t\t\ttoast.error(\"Failed to disable 2FA. Please try again.\");\n\t\t} finally {\n\t\t\tsetIsDisabling(false);\n\t\t}\n\t};\n\n\tconst handleCloseDialog = () => {\n\t\tif (step === \"backup-codes\") {\n\t\t\tsetStep(\"actions\");\n\t\t} else {\n\t\t\tsetIsDialogOpen(false);\n\t\t}\n\t};\n\n\tconst handleDownloadBackupCodes = () => {\n\t\tif (!backupCodes || backupCodes.length === 0) {\n\t\t\ttoast.error(\"No backup codes to download.\");\n\t\t\treturn;\n\t\t}\n\n\t\tconst backupCodesFormatted = backupCodes\n\t\t\t.map((code, index) => ` ${index + 1}. ${code}`)\n\t\t\t.join(\"\\n\");\n\n\t\tconst date = new Date();\n\t\tconst year = date.getFullYear();\n\t\tconst month = String(date.getMonth() + 1).padStart(2, \"0\");\n\t\tconst day = String(date.getDate()).padStart(2, \"0\");\n\t\tconst filename = `dokploy-2fa-backup-codes-${year}${month}${day}.txt`;\n\n\t\tconst backupCodesText = backupCodeTemplate\n\t\t\t.replace(USERNAME_PLACEHOLDER, currentUser?.user?.email || \"unknown\")\n\t\t\t.replace(DATE_PLACEHOLDER, date.toLocaleString())\n\t\t\t.replace(BACKUP_CODES_PLACEHOLDER, backupCodesFormatted);\n\n\t\tconst blob = new Blob([backupCodesText], { type: \"text/plain\" });\n\t\tconst url = URL.createObjectURL(blob);\n\t\tconst a = document.createElement(\"a\");\n\t\ta.href = url;\n\t\ta.download = filename;\n\t\tdocument.body.appendChild(a);\n\t\ta.click();\n\t\tdocument.body.removeChild(a);\n\t\tURL.revokeObjectURL(url);\n\t};\n\n\tconst handleCopyBackupCodes = () => {\n\t\tconst date = new Date();\n\n\t\tconst backupCodesFormatted = backupCodes\n\t\t\t.map((code, index) => ` ${index + 1}. ${code}`)\n\t\t\t.join(\"\\n\");\n\n\t\tconst backupCodesText = backupCodeTemplate\n\t\t\t.replace(USERNAME_PLACEHOLDER, currentUser?.user?.email || \"unknown\")\n\t\t\t.replace(DATE_PLACEHOLDER, date.toLocaleString())\n\t\t\t.replace(BACKUP_CODES_PLACEHOLDER, backupCodesFormatted);\n\n\t\tcopy(backupCodesText);\n\t\ttoast.success(\"Backup codes copied to clipboard\");\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<Dialog open={isDialogOpen} onOpenChange={setIsDialogOpen}>\n\t\t\t\t<DialogTrigger asChild>\n\t\t\t\t\t<Button variant=\"secondary\">\n\t\t\t\t\t\t<KeyRound className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t\tManage 2FA\n\t\t\t\t\t</Button>\n\t\t\t\t</DialogTrigger>\n\t\t\t\t<DialogContent className=\"sm:max-w-xl\">\n\t\t\t\t\t<DialogHeader>\n\t\t\t\t\t\t<DialogTitle>\n\t\t\t\t\t\t\t{step === \"password\" && \"Verify Your Identity\"}\n\t\t\t\t\t\t\t{step === \"actions\" && \"2FA Configuration\"}\n\t\t\t\t\t\t\t{step === \"backup-codes\" && \"New Backup Codes\"}\n\t\t\t\t\t\t</DialogTitle>\n\t\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\t\t{step === \"password\" &&\n\t\t\t\t\t\t\t\t\"Enter your password to manage your 2FA settings\"}\n\t\t\t\t\t\t\t{step === \"actions\" &&\n\t\t\t\t\t\t\t\t\"Choose an action to manage your two-factor authentication\"}\n\t\t\t\t\t\t\t{step === \"backup-codes\" &&\n\t\t\t\t\t\t\t\t\"Save these backup codes in a secure place\"}\n\t\t\t\t\t\t</DialogDescription>\n\t\t\t\t\t</DialogHeader>\n\n\t\t\t\t\t{step === \"password\" && (\n\t\t\t\t\t\t<Form {...form}>\n\t\t\t\t\t\t\t<form\n\t\t\t\t\t\t\t\tonSubmit={form.handleSubmit(handlePasswordSubmit)}\n\t\t\t\t\t\t\t\tclassName=\"space-y-4\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"password\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Password</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"password\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Enter your password\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\tEnter your password to continue\n\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<div className=\"flex justify-end gap-4\">\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\tonClick={() => setIsDialogOpen(false)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tCancel\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t<Button type=\"submit\" isLoading={isRegenerating}>\n\t\t\t\t\t\t\t\t\t\tContinue\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t</Form>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{step === \"actions\" && (\n\t\t\t\t\t\t<div className=\"space-y-4\">\n\t\t\t\t\t\t\t<div className=\"grid gap-3\">\n\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2 p-4 border rounded-lg hover:bg-muted/50 transition-colors\">\n\t\t\t\t\t\t\t\t\t<div className=\"flex items-start justify-between\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex-1\">\n\t\t\t\t\t\t\t\t\t\t\t<h4 className=\"font-medium flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t<RefreshCw className=\"size-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\tRegenerate Backup Codes\n\t\t\t\t\t\t\t\t\t\t\t</h4>\n\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground mt-1\">\n\t\t\t\t\t\t\t\t\t\t\t\tGenerate new backup codes to replace your existing ones.\n\t\t\t\t\t\t\t\t\t\t\t\tThis will invalidate all previous backup codes.\n\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tonClick={handleRegenerateBackupCodes}\n\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"w-full mt-2\"\n\t\t\t\t\t\t\t\t\t\tisLoading={isRegenerating}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<RefreshCw className=\"size-4 mr-2\" />\n\t\t\t\t\t\t\t\t\t\tRegenerate Backup Codes\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2 p-4 border border-destructive/50 rounded-lg hover:bg-destructive/5 transition-colors\">\n\t\t\t\t\t\t\t\t\t<div className=\"flex items-start justify-between\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex-1\">\n\t\t\t\t\t\t\t\t\t\t\t<h4 className=\"font-medium flex items-center gap-2 text-destructive\">\n\t\t\t\t\t\t\t\t\t\t\t\t<ShieldOff className=\"size-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\tDisable 2FA\n\t\t\t\t\t\t\t\t\t\t\t</h4>\n\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground mt-1\">\n\t\t\t\t\t\t\t\t\t\t\t\tCompletely disable two-factor authentication for your\n\t\t\t\t\t\t\t\t\t\t\t\taccount. This will make your account less secure.\n\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tonClick={() => setShowDisableConfirm(true)}\n\t\t\t\t\t\t\t\t\t\tvariant=\"destructive\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"w-full mt-2\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<ShieldOff className=\"size-4 mr-2\" />\n\t\t\t\t\t\t\t\t\t\tDisable 2FA\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div className=\"flex justify-end\">\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\tonClick={() => setIsDialogOpen(false)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tClose\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{step === \"backup-codes\" && (\n\t\t\t\t\t\t<div className=\"space-y-4\">\n\t\t\t\t\t\t\t<div className=\"w-full space-y-3 border rounded-lg p-4 bg-muted/50\">\n\t\t\t\t\t\t\t\t<div className=\"grid grid-cols-2 gap-2\">\n\t\t\t\t\t\t\t\t\t{backupCodes.map((code, index) => (\n\t\t\t\t\t\t\t\t\t\t<code\n\t\t\t\t\t\t\t\t\t\t\tkey={`${code}-${index}`}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"bg-background p-2 rounded text-sm font-mono text-center\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{code}\n\t\t\t\t\t\t\t\t\t\t</code>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\tSave these backup codes in a secure place. You can use them to\n\t\t\t\t\t\t\t\t\taccess your account if you lose access to your authenticator\n\t\t\t\t\t\t\t\t\tdevice. Each code can only be used once.\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div className=\"flex gap-2\">\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\tonClick={handleDownloadBackupCodes}\n\t\t\t\t\t\t\t\t\tclassName=\"flex-1\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<DownloadIcon className=\"size-4 mr-2\" />\n\t\t\t\t\t\t\t\t\tDownload\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\tonClick={handleCopyBackupCodes}\n\t\t\t\t\t\t\t\t\tclassName=\"flex-1\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<CopyIcon className=\"size-4 mr-2\" />\n\t\t\t\t\t\t\t\t\tCopy\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div className=\"flex justify-end gap-4\">\n\t\t\t\t\t\t\t\t<Button variant=\"outline\" onClick={handleCloseDialog}>\n\t\t\t\t\t\t\t\t\tBack to Actions\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t<Button onClick={() => setIsDialogOpen(false)}>Done</Button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</DialogContent>\n\t\t\t</Dialog>\n\n\t\t\t<AlertDialog\n\t\t\t\topen={showDisableConfirm}\n\t\t\t\tonOpenChange={setShowDisableConfirm}\n\t\t\t>\n\t\t\t\t<AlertDialogContent>\n\t\t\t\t\t<AlertDialogHeader>\n\t\t\t\t\t\t<AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>\n\t\t\t\t\t\t<AlertDialogDescription>\n\t\t\t\t\t\t\tThis will permanently disable Two-Factor Authentication for your\n\t\t\t\t\t\t\taccount. Your account will be less secure without 2FA enabled.\n\t\t\t\t\t\t</AlertDialogDescription>\n\t\t\t\t\t</AlertDialogHeader>\n\t\t\t\t\t<AlertDialogFooter>\n\t\t\t\t\t\t<AlertDialogCancel>Cancel</AlertDialogCancel>\n\t\t\t\t\t\t<AlertDialogAction\n\t\t\t\t\t\t\tonClick={handleDisable2FA}\n\t\t\t\t\t\t\tclassName=\"bg-destructive text-destructive-foreground hover:bg-destructive/90\"\n\t\t\t\t\t\t\tdisabled={isDisabling}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{isDisabling ? \"Disabling...\" : \"Disable 2FA\"}\n\t\t\t\t\t\t</AlertDialogAction>\n\t\t\t\t\t</AlertDialogFooter>\n\t\t\t\t</AlertDialogContent>\n\t\t\t</AlertDialog>\n\t\t</>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/profile/enable-2fa.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport copy from \"copy-to-clipboard\";\nimport { CopyIcon, DownloadIcon, Fingerprint, QrCode } from \"lucide-react\";\nimport QRCode from \"qrcode\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport {\n\tInputOTP,\n\tInputOTPGroup,\n\tInputOTPSlot,\n} from \"@/components/ui/input-otp\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { authClient } from \"@/lib/auth-client\";\nimport { api } from \"@/utils/api\";\n\nconst PasswordSchema = z.object({\n\tpassword: z.string().min(8, {\n\t\tmessage: \"Password is required\",\n\t}),\n\tissuer: z.string().optional(),\n});\n\nconst PinSchema = z.object({\n\tpin: z.string().min(6, {\n\t\tmessage: \"Pin is required\",\n\t}),\n});\n\ntype TwoFactorSetupData = {\n\tqrCodeUrl: string;\n\tsecret: string;\n\ttotpURI: string;\n};\n\ntype PasswordForm = z.infer<typeof PasswordSchema>;\ntype PinForm = z.infer<typeof PinSchema>;\n\nexport const USERNAME_PLACEHOLDER = \"%username%\";\nexport const DATE_PLACEHOLDER = \"%date%\";\nexport const BACKUP_CODES_PLACEHOLDER = \"%backupCodes%\";\n\nexport const backupCodeTemplate = `Dokploy - BACKUP VERIFICATION CODES\n\nPoints to note\n--------------\n# Each code can be used only once.\n# Do not share these codes with anyone.\n\nGenerated codes\n---------------\nUsername: ${USERNAME_PLACEHOLDER}\nGenerated on: ${DATE_PLACEHOLDER}\n\n\n${BACKUP_CODES_PLACEHOLDER}\n`;\n\nexport const Enable2FA = () => {\n\tconst utils = api.useUtils();\n\tconst [data, setData] = useState<TwoFactorSetupData | null>(null);\n\tconst [backupCodes, setBackupCodes] = useState<string[]>([]);\n\tconst [isDialogOpen, setIsDialogOpen] = useState(false);\n\tconst [step, setStep] = useState<\"password\" | \"verify\">(\"password\");\n\tconst [isPasswordLoading, setIsPasswordLoading] = useState(false);\n\tconst [otpValue, setOtpValue] = useState(\"\");\n\tconst { data: currentUser } = api.user.get.useQuery();\n\n\tconst handleVerifySubmit = async (e: React.FormEvent) => {\n\t\te.preventDefault();\n\t\ttry {\n\t\t\tconst result = await authClient.twoFactor.verifyTotp({\n\t\t\t\tcode: otpValue,\n\t\t\t});\n\n\t\t\tif (result.error) {\n\t\t\t\tif (result.error.code === \"INVALID_TWO_FACTOR_AUTHENTICATION\") {\n\t\t\t\t\ttoast.error(\"Invalid verification code\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthrow result.error;\n\t\t\t}\n\n\t\t\tif (!result.data) {\n\t\t\t\tthrow new Error(\"No response received from server\");\n\t\t\t}\n\n\t\t\ttoast.success(\"2FA configured successfully\");\n\t\t\tutils.user.get.invalidate();\n\t\t\tsetIsDialogOpen(false);\n\t\t} catch (error) {\n\t\t\tif (error instanceof Error) {\n\t\t\t\tconst errorMessage =\n\t\t\t\t\terror.message === \"Failed to fetch\"\n\t\t\t\t\t\t? \"Connection error. Please check your internet connection.\"\n\t\t\t\t\t\t: error.message;\n\n\t\t\t\ttoast.error(errorMessage);\n\t\t\t} else {\n\t\t\t\ttoast.error(\"Error verifying 2FA code\", {\n\t\t\t\t\tdescription: error instanceof Error ? error.message : \"Unknown error\",\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t};\n\n\tconst passwordForm = useForm<PasswordForm>({\n\t\tresolver: zodResolver(PasswordSchema),\n\t\tdefaultValues: {\n\t\t\tpassword: \"\",\n\t\t},\n\t});\n\n\tconst pinForm = useForm<PinForm>({\n\t\tresolver: zodResolver(PinSchema),\n\t\tdefaultValues: {\n\t\t\tpin: \"\",\n\t\t},\n\t});\n\n\tuseEffect(() => {\n\t\tif (!isDialogOpen) {\n\t\t\tsetStep(\"password\");\n\t\t\tsetData(null);\n\t\t\tsetBackupCodes([]);\n\t\t\tsetOtpValue(\"\");\n\t\t\tpasswordForm.reset({\n\t\t\t\tpassword: \"\",\n\t\t\t\tissuer: \"\",\n\t\t\t});\n\t\t}\n\t}, [isDialogOpen, passwordForm]);\n\n\tuseEffect(() => {\n\t\tif (step === \"verify\") {\n\t\t\tsetOtpValue(\"\");\n\t\t}\n\t}, [step]);\n\n\tconst handlePasswordSubmit = async (formData: PasswordForm) => {\n\t\tsetIsPasswordLoading(true);\n\t\ttry {\n\t\t\tconst { data: enableData, error } = await authClient.twoFactor.enable({\n\t\t\t\tpassword: formData.password,\n\t\t\t\tissuer: formData.issuer,\n\t\t\t});\n\n\t\t\tif (!enableData) {\n\t\t\t\tthrow new Error(error?.message || \"Error enabling 2FA\");\n\t\t\t}\n\n\t\t\tif (enableData.backupCodes) {\n\t\t\t\tsetBackupCodes(enableData.backupCodes);\n\t\t\t}\n\n\t\t\tif (enableData.totpURI) {\n\t\t\t\tconst qrCodeUrl = await QRCode.toDataURL(enableData.totpURI);\n\n\t\t\t\tsetData({\n\t\t\t\t\tqrCodeUrl,\n\t\t\t\t\tsecret: enableData.totpURI.split(\"secret=\")[1]?.split(\"&\")[0] || \"\",\n\t\t\t\t\ttotpURI: enableData.totpURI,\n\t\t\t\t});\n\n\t\t\t\tsetStep(\"verify\");\n\t\t\t\ttoast.success(\"Scan the QR code with your authenticator app\");\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"No TOTP URI received from server\");\n\t\t\t}\n\t\t} catch (error) {\n\t\t\ttoast.error(\n\t\t\t\terror instanceof Error ? error.message : \"Error setting up 2FA\",\n\t\t\t);\n\t\t\tpasswordForm.setError(\"password\", {\n\t\t\t\tmessage:\n\t\t\t\t\terror instanceof Error ? error.message : \"Error setting up 2FA\",\n\t\t\t});\n\t\t} finally {\n\t\t\tsetIsPasswordLoading(false);\n\t\t}\n\t};\n\n\tconst handleDownloadBackupCodes = () => {\n\t\tif (!backupCodes || backupCodes.length === 0) {\n\t\t\ttoast.error(\"No backup codes to download.\");\n\t\t\treturn;\n\t\t}\n\n\t\tconst backupCodesFormatted = backupCodes\n\t\t\t.map((code, index) => ` ${index + 1}. ${code}`)\n\t\t\t.join(\"\\n\");\n\n\t\tconst date = new Date();\n\t\tconst year = date.getFullYear();\n\t\tconst month = String(date.getMonth() + 1).padStart(2, \"0\");\n\t\tconst day = String(date.getDate()).padStart(2, \"0\");\n\t\tconst filename = `dokploy-2fa-backup-codes-${year}${month}${day}.txt`;\n\n\t\tconst backupCodesText = backupCodeTemplate\n\t\t\t.replace(USERNAME_PLACEHOLDER, currentUser?.user?.email || \"unknown\")\n\t\t\t.replace(DATE_PLACEHOLDER, date.toLocaleString())\n\t\t\t.replace(BACKUP_CODES_PLACEHOLDER, backupCodesFormatted);\n\n\t\tconst blob = new Blob([backupCodesText], { type: \"text/plain\" });\n\t\tconst url = URL.createObjectURL(blob);\n\t\tconst a = document.createElement(\"a\");\n\t\ta.href = url;\n\t\ta.download = filename;\n\t\tdocument.body.appendChild(a);\n\t\ta.click();\n\t\tdocument.body.removeChild(a);\n\t\tURL.revokeObjectURL(url);\n\t};\n\n\tconst handleCopyBackupCodes = () => {\n\t\tconst date = new Date();\n\n\t\tconst backupCodesFormatted = backupCodes\n\t\t\t.map((code, index) => ` ${index + 1}. ${code}`)\n\t\t\t.join(\"\\n\");\n\n\t\tconst backupCodesText = backupCodeTemplate\n\t\t\t.replace(USERNAME_PLACEHOLDER, currentUser?.user?.email || \"unknown\")\n\t\t\t.replace(DATE_PLACEHOLDER, date.toLocaleString())\n\t\t\t.replace(BACKUP_CODES_PLACEHOLDER, backupCodesFormatted);\n\n\t\tcopy(backupCodesText);\n\t\ttoast.success(\"Backup codes copied to clipboard\");\n\t};\n\n\treturn (\n\t\t<Dialog open={isDialogOpen} onOpenChange={setIsDialogOpen}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t<Button variant=\"ghost\">\n\t\t\t\t\t<Fingerprint className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\tEnable 2FA\n\t\t\t\t</Button>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-xl\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>2FA Setup</DialogTitle>\n\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\t{step === \"password\"\n\t\t\t\t\t\t\t? \"Enter your password to begin 2FA setup\"\n\t\t\t\t\t\t\t: \"Scan the QR code and verify with your authenticator app\"}\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\n\t\t\t\t{step === \"password\" ? (\n\t\t\t\t\t<Form {...passwordForm}>\n\t\t\t\t\t\t<form\n\t\t\t\t\t\t\tid=\"password-form\"\n\t\t\t\t\t\t\tonSubmit={passwordForm.handleSubmit(handlePasswordSubmit)}\n\t\t\t\t\t\t\tclassName=\"space-y-4\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={passwordForm.control}\n\t\t\t\t\t\t\t\tname=\"password\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Password</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\ttype=\"password\"\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Enter your password\"\n\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\tEnter your password to enable 2FA\n\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={passwordForm.control}\n\t\t\t\t\t\t\t\tname=\"issuer\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Issuer</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Enter your issuer\"\n\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\tUse a custom issuer to identify the service you're\n\t\t\t\t\t\t\t\t\t\t\tauthenticating with.\n\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t\tclassName=\"w-full\"\n\t\t\t\t\t\t\t\tisLoading={isPasswordLoading}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tContinue\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</form>\n\t\t\t\t\t</Form>\n\t\t\t\t) : (\n\t\t\t\t\t<Form {...pinForm}>\n\t\t\t\t\t\t<form onSubmit={handleVerifySubmit} className=\"space-y-6\">\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-6 justify-center items-center\">\n\t\t\t\t\t\t\t\t{data?.qrCodeUrl ? (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col items-center gap-4 p-6 border rounded-lg\">\n\t\t\t\t\t\t\t\t\t\t\t<QrCode className=\"size-5 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm font-medium\">\n\t\t\t\t\t\t\t\t\t\t\t\tScan this QR code with your authenticator app\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t{/** biome-ignore lint/performance/noImgElement: This is a valid use case for an img element */}\n\t\t\t\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\t\t\t\tsrc={data.qrCodeUrl}\n\t\t\t\t\t\t\t\t\t\t\t\talt=\"2FA QR Code\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"rounded-lg w-48 h-48\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2 text-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\tCan't scan the QR code?\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-xs font-mono bg-muted p-2 rounded\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{data.secret}\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t{backupCodes && backupCodes.length > 0 && (\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"w-full space-y-3 border rounded-lg p-4\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center justify-between\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<h4 className=\"font-medium\">Backup Codes</h4>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Tooltip delayDuration={0}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={handleCopyBackupCodes}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CopyIcon className=\"size-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>Copy</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Tooltip delayDuration={0}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={handleDownloadBackupCodes}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DownloadIcon className=\"size-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>Download</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"grid grid-cols-2 gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{backupCodes.map((code, index) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<code\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={`${code}-${index}`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"bg-muted p-2 rounded text-sm font-mono\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{code}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</code>\n\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\tSave these backup codes in a secure place. You can use\n\t\t\t\t\t\t\t\t\t\t\t\t\tthem to access your account if you lose access to your\n\t\t\t\t\t\t\t\t\t\t\t\t\tauthenticator device.\n\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<div className=\"flex items-center justify-center w-full h-48 bg-muted rounded-lg\">\n\t\t\t\t\t\t\t\t\t\t<QrCode className=\"size-8 text-muted-foreground animate-pulse\" />\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div className=\"flex flex-col justify-center items-center\">\n\t\t\t\t\t\t\t\t<FormLabel>Verification Code</FormLabel>\n\t\t\t\t\t\t\t\t<InputOTP\n\t\t\t\t\t\t\t\t\tmaxLength={6}\n\t\t\t\t\t\t\t\t\tvalue={otpValue}\n\t\t\t\t\t\t\t\t\tonChange={setOtpValue}\n\t\t\t\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<InputOTPGroup>\n\t\t\t\t\t\t\t\t\t\t<InputOTPSlot index={0} />\n\t\t\t\t\t\t\t\t\t\t<InputOTPSlot index={1} />\n\t\t\t\t\t\t\t\t\t\t<InputOTPSlot index={2} />\n\t\t\t\t\t\t\t\t\t\t<InputOTPSlot index={3} />\n\t\t\t\t\t\t\t\t\t\t<InputOTPSlot index={4} />\n\t\t\t\t\t\t\t\t\t\t<InputOTPSlot index={5} />\n\t\t\t\t\t\t\t\t\t</InputOTPGroup>\n\t\t\t\t\t\t\t\t</InputOTP>\n\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\tEnter the 6-digit code from your authenticator app\n\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t\tclassName=\"w-full\"\n\t\t\t\t\t\t\t\tisLoading={isPasswordLoading}\n\t\t\t\t\t\t\t\tdisabled={otpValue.length !== 6}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tEnable 2FA\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</form>\n\t\t\t\t\t</Form>\n\t\t\t\t)}\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/profile/profile-form.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { Loader2, Palette, User } from \"lucide-react\";\nimport { useEffect, useMemo, useRef, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Avatar, AvatarFallback } from \"@/components/ui/avatar\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { RadioGroup, RadioGroupItem } from \"@/components/ui/radio-group\";\nimport { Switch } from \"@/components/ui/switch\";\nimport { getAvatarType, isSolidColorAvatar } from \"@/lib/avatar-utils\";\nimport { generateSHA256Hash, getFallbackAvatarInitials } from \"@/lib/utils\";\nimport { api } from \"@/utils/api\";\nimport { Configure2FA } from \"./configure-2fa\";\nimport { Enable2FA } from \"./enable-2fa\";\n\nconst profileSchema = z.object({\n\temail: z\n\t\t.string()\n\t\t.email(\"Please enter a valid email address\")\n\t\t.min(1, \"Email is required\"),\n\tpassword: z.string().nullable(),\n\tcurrentPassword: z.string().nullable(),\n\timage: z.string().optional(),\n\tfirstName: z.string().optional(),\n\tlastName: z.string().optional(),\n\tallowImpersonation: z.boolean().optional().default(false),\n});\n\ntype Profile = z.infer<typeof profileSchema>;\n\nconst randomImages = [\n\t\"/avatars/avatar-1.png\",\n\t\"/avatars/avatar-2.png\",\n\t\"/avatars/avatar-3.png\",\n\t\"/avatars/avatar-4.png\",\n\t\"/avatars/avatar-5.png\",\n\t\"/avatars/avatar-6.png\",\n\t\"/avatars/avatar-7.png\",\n\t\"/avatars/avatar-8.png\",\n\t\"/avatars/avatar-9.png\",\n\t\"/avatars/avatar-10.png\",\n\t\"/avatars/avatar-11.png\",\n\t\"/avatars/avatar-12.png\",\n];\n\nexport const ProfileForm = () => {\n\tconst { data, refetch, isPending } = api.user.get.useQuery();\n\tconst { data: isCloud } = api.settings.isCloud.useQuery();\n\n\tconst {\n\t\tmutateAsync,\n\t\tisPending: isUpdating,\n\t\tisError,\n\t\terror,\n\t} = api.user.update.useMutation();\n\tconst [gravatarHash, setGravatarHash] = useState<string | null>(null);\n\tconst colorInputRef = useRef<HTMLInputElement>(null);\n\n\tconst availableAvatars = useMemo(() => {\n\t\tif (gravatarHash === null) return randomImages;\n\t\treturn randomImages.concat([\n\t\t\t`https://www.gravatar.com/avatar/${gravatarHash}`,\n\t\t]);\n\t}, [gravatarHash]);\n\n\tconst form = useForm({\n\t\tdefaultValues: {\n\t\t\temail: data?.user?.email || \"\",\n\t\t\tpassword: \"\",\n\t\t\timage: data?.user?.image || \"\",\n\t\t\tcurrentPassword: \"\",\n\t\t\tallowImpersonation: data?.user?.allowImpersonation || false,\n\t\t\tfirstName: data?.user?.firstName || \"\",\n\t\t\tlastName: data?.user?.lastName || \"\",\n\t\t},\n\t\tresolver: zodResolver(profileSchema),\n\t});\n\n\tuseEffect(() => {\n\t\tif (data) {\n\t\t\tform.reset(\n\t\t\t\t{\n\t\t\t\t\temail: data?.user?.email || \"\",\n\t\t\t\t\tpassword: form.getValues(\"password\") || \"\",\n\t\t\t\t\timage: data?.user?.image || \"\",\n\t\t\t\t\tcurrentPassword: form.getValues(\"currentPassword\") || \"\",\n\t\t\t\t\tallowImpersonation: data?.user?.allowImpersonation,\n\t\t\t\t\tfirstName: data?.user?.firstName || \"\",\n\t\t\t\t\tlastName: data?.user?.lastName || \"\",\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tkeepValues: true,\n\t\t\t\t},\n\t\t\t);\n\t\t\tform.setValue(\"allowImpersonation\", data?.user?.allowImpersonation);\n\n\t\t\tif (data.user.email) {\n\t\t\t\tgenerateSHA256Hash(data.user.email).then((hash) => {\n\t\t\t\t\tsetGravatarHash(hash);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}, [form, data]);\n\n\tconst onSubmit = async (values: Profile) => {\n\t\ttry {\n\t\t\tawait mutateAsync({\n\t\t\t\temail: values.email.toLowerCase(),\n\t\t\t\tpassword: values.password || undefined,\n\t\t\t\timage: values.image,\n\t\t\t\tcurrentPassword: values.currentPassword || undefined,\n\t\t\t\tallowImpersonation: values.allowImpersonation,\n\t\t\t\tfirstName: values.firstName || undefined,\n\t\t\t\tlastName: values.lastName || undefined,\n\t\t\t});\n\t\t\tawait refetch();\n\t\t\ttoast.success(\"Profile Updated\");\n\t\t\tform.reset({\n\t\t\t\temail: values.email,\n\t\t\t\tpassword: \"\",\n\t\t\t\timage: values.image,\n\t\t\t\tcurrentPassword: \"\",\n\t\t\t\tfirstName: values.firstName || \"\",\n\t\t\t\tlastName: values.lastName || \"\",\n\t\t\t});\n\t\t} catch (error) {\n\t\t\ttoast.error(\"Error updating the profile\");\n\t\t}\n\t};\n\n\treturn (\n\t\t<div className=\"w-full\">\n\t\t\t<Card className=\"h-full bg-sidebar  p-2.5 rounded-xl  max-w-5xl mx-auto\">\n\t\t\t\t<div className=\"rounded-xl bg-background shadow-md \">\n\t\t\t\t\t<CardHeader className=\"flex flex-row gap-2 flex-wrap justify-between items-center\">\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<CardTitle className=\"text-xl flex flex-row gap-2\">\n\t\t\t\t\t\t\t\t<User className=\"size-6 text-muted-foreground self-center\" />\n\t\t\t\t\t\t\t\tAccount\n\t\t\t\t\t\t\t</CardTitle>\n\t\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\t\tChange the details of your profile here.\n\t\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t{!data?.user.twoFactorEnabled ? <Enable2FA /> : <Configure2FA />}\n\t\t\t\t\t</CardHeader>\n\n\t\t\t\t\t<CardContent className=\"space-y-2 py-8 border-t\">\n\t\t\t\t\t\t{isError && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\t\t\t\t\t\t{isPending ? (\n\t\t\t\t\t\t\t<div className=\"flex flex-row gap-2 items-center justify-center text-sm text-muted-foreground min-h-[35vh]\">\n\t\t\t\t\t\t\t\t<span>Loading...</span>\n\t\t\t\t\t\t\t\t<Loader2 className=\"animate-spin size-4\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<Form {...form}>\n\t\t\t\t\t\t\t\t\t<form\n\t\t\t\t\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\t\t\t\t\tclassName=\"grid gap-4\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-4\">\n\t\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\t\tname=\"firstName\"\n\t\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>First Name</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"John\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\t\tname=\"lastName\"\n\t\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Last Name</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"Doe\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\t\tname=\"email\"\n\t\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Email</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"Email\" {...field} />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\t\tname=\"currentPassword\"\n\t\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Current Password</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"password\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Current Password\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value || \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\t\tname=\"password\"\n\t\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Password</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"password\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Password\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value || \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\t\tname=\"image\"\n\t\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Avatar</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<RadioGroup\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonValueChange={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(e);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdefaultValue={getAvatarType(field.value)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={getAvatarType(field.value)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex flex-row flex-wrap gap-2 max-xl:justify-center\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem key=\"no-avatar\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel className=\"[&:has([data-state=checked])>.default-avatar]:border-primary [&:has([data-state=checked])>.default-avatar]:border-1 [&:has([data-state=checked])>.default-avatar]:p-px cursor-pointer\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<RadioGroupItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"sr-only\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Avatar className=\"default-avatar h-12 w-12 rounded-full border hover:p-px hover:border-primary transition-transform\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<AvatarFallback className=\"rounded-lg\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{getFallbackAvatarInitials(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t`${data?.user?.firstName} ${data?.user?.lastName}`.trim(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</AvatarFallback>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Avatar>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem key=\"custom-upload\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel className=\"[&:has([data-state=checked])>.upload-avatar]:border-primary [&:has([data-state=checked])>.upload-avatar]:border-1 [&:has([data-state=checked])>.upload-avatar]:p-px cursor-pointer\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<RadioGroupItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"upload\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"sr-only\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"upload-avatar h-12 w-12 rounded-full border border-dashed border-muted-foreground hover:border-primary transition-colors flex items-center justify-center bg-muted/50 hover:bg-muted overflow-hidden\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdocument\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getElementById(\"avatar-upload\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t?.click()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{field.value?.startsWith(\"data:\") ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// biome-ignore lint/performance/noImgElement: this is an justified use of img element\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsrc={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\talt=\"Custom avatar\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-full w-full object-cover rounded-full\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-5 w-5 text-muted-foreground\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstrokeWidth={2}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\td=\"M12 4v16m8-8H4\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tid=\"avatar-upload\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"file\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\taccept=\"image/*\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"hidden\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={async (e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst file = e.target.files?.[0];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (file) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// max file size 2mb\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (file.size > 2 * 1024 * 1024) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Image size must be less than 2MB\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst reader = new FileReader();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treader.onload = (event) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst result = event.target\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t?.result as string;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(result);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treader.readAsDataURL(file);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem key=\"color-avatar\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel className=\"[&:has([data-state=checked])>.color-avatar]:border-primary [&:has([data-state=checked])>.color-avatar]:border-1 [&:has([data-state=checked])>.color-avatar]:p-px cursor-pointer relative\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<RadioGroupItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"color\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"sr-only\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"color-avatar h-12 w-12 rounded-full border hover:p-px hover:border-primary transition-colors flex items-center justify-center overflow-hidden cursor-pointer\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbackgroundColor: isSolidColorAvatar(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.value,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? field.value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolorInputRef.current?.click()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{!isSolidColorAvatar(field.value) && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Palette className=\"h-5 w-5 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tref={colorInputRef}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"color\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"absolute opacity-0 pointer-events-none w-12 h-12 top-0 left-0\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{availableAvatars.map((image) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem key={image}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel className=\"[&:has([data-state=checked])>img]:border-primary [&:has([data-state=checked])>img]:border-1 [&:has([data-state=checked])>img]:p-px cursor-pointer\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<RadioGroupItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={image}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"sr-only\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{/* biome-ignore lint/performance/noImgElement: this is an justified use of img element */}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={image}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsrc={image}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\talt=\"avatar\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-12 w-12 rounded-full border hover:p-px hover:border-primary transition-transform\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</RadioGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t{isCloud && (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"allowImpersonation\"\n\t\t\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem className=\"flex flex-row items-center justify-between p-3 mt-4 border rounded-lg shadow-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Allow Impersonation</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tEnable this option to allow Dokploy Cloud\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tadministrators to temporarily access your\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\taccount for troubleshooting and support\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpurposes. This helps them quickly identify and\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tresolve any issues you may encounter.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center justify-end gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t<Button type=\"submit\" isLoading={isUpdating}>\n\t\t\t\t\t\t\t\t\t\t\t\tSave\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t\t</Form>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</CardContent>\n\t\t\t\t</div>\n\t\t\t</Card>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/servers/actions/show-dokploy-actions.tsx",
    "content": "import { toast } from \"sonner\";\nimport { UpdateServerIp } from \"@/components/dashboard/settings/web-server/update-server-ip\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDropdownMenu,\n\tDropdownMenuContent,\n\tDropdownMenuGroup,\n\tDropdownMenuItem,\n\tDropdownMenuLabel,\n\tDropdownMenuSeparator,\n\tDropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\nimport { api } from \"@/utils/api\";\nimport { ShowModalLogs } from \"../../web-server/show-modal-logs\";\nimport { TerminalModal } from \"../../web-server/terminal-modal\";\nimport { GPUSupportModal } from \"../gpu-support-modal\";\n\nexport const ShowDokployActions = () => {\n\tconst { mutateAsync: reloadServer, isPending } =\n\t\tapi.settings.reloadServer.useMutation();\n\n\tconst { mutateAsync: cleanRedis } = api.settings.cleanRedis.useMutation();\n\tconst { mutateAsync: reloadRedis } = api.settings.reloadRedis.useMutation();\n\tconst { mutateAsync: cleanAllDeploymentQueue } =\n\t\tapi.settings.cleanAllDeploymentQueue.useMutation();\n\n\treturn (\n\t\t<DropdownMenu>\n\t\t\t<DropdownMenuTrigger asChild disabled={isPending}>\n\t\t\t\t<Button isLoading={isPending} variant=\"outline\">\n\t\t\t\t\tServer\n\t\t\t\t</Button>\n\t\t\t</DropdownMenuTrigger>\n\t\t\t<DropdownMenuContent className=\"w-56\" align=\"start\">\n\t\t\t\t<DropdownMenuLabel>Actions</DropdownMenuLabel>\n\t\t\t\t<DropdownMenuSeparator />\n\t\t\t\t<DropdownMenuGroup>\n\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\tawait reloadServer()\n\t\t\t\t\t\t\t\t.then(async () => {\n\t\t\t\t\t\t\t\t\ttoast.success(\"Server Reloaded\");\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\ttoast.success(\"Server Reloaded\");\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tclassName=\"cursor-pointer\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span>Reload</span>\n\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t<TerminalModal serverId=\"local\">\n\t\t\t\t\t\t<span>Terminal</span>\n\t\t\t\t\t</TerminalModal>\n\t\t\t\t\t<ShowModalLogs appName=\"dokploy\">\n\t\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\t\tclassName=\"cursor-pointer\"\n\t\t\t\t\t\t\tonSelect={(e) => e.preventDefault()}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tView Logs\n\t\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t</ShowModalLogs>\n\t\t\t\t\t<GPUSupportModal />\n\t\t\t\t\t<UpdateServerIp>\n\t\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\t\tclassName=\"cursor-pointer\"\n\t\t\t\t\t\t\tonSelect={(e) => e.preventDefault()}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tUpdate Server IP\n\t\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t</UpdateServerIp>\n\n\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\tclassName=\"cursor-pointer\"\n\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\tawait cleanRedis()\n\t\t\t\t\t\t\t\t.then(async () => {\n\t\t\t\t\t\t\t\t\ttoast.success(\"Redis cleaned\");\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\ttoast.error(\"Error cleaning Redis\");\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tClean Redis\n\t\t\t\t\t</DropdownMenuItem>\n\n\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\tclassName=\"cursor-pointer\"\n\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\tawait cleanAllDeploymentQueue()\n\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\ttoast.success(\"Deployment queue cleaned\");\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\ttoast.error(\"Error cleaning deployment queue\");\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tClean all deployment queue\n\t\t\t\t\t</DropdownMenuItem>\n\n\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\tclassName=\"cursor-pointer\"\n\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\tawait reloadRedis()\n\t\t\t\t\t\t\t\t.then(async () => {\n\t\t\t\t\t\t\t\t\ttoast.success(\"Redis reloaded\");\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\ttoast.error(\"Error reloading Redis\");\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tReload Redis\n\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t</DropdownMenuGroup>\n\t\t\t</DropdownMenuContent>\n\t\t</DropdownMenu>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/servers/actions/show-server-actions.tsx",
    "content": "import { Activity } from \"lucide-react\";\nimport { useState } from \"react\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport { DropdownMenuItem } from \"@/components/ui/dropdown-menu\";\nimport { ShowStorageActions } from \"./show-storage-actions\";\nimport { ShowTraefikActions } from \"./show-traefik-actions\";\nimport { ToggleDockerCleanup } from \"./toggle-docker-cleanup\";\n\ninterface Props {\n\tserverId: string;\n\tasButton?: boolean;\n}\n\nexport const ShowServerActions = ({ serverId, asButton = false }: Props) => {\n\tconst [isOpen, setIsOpen] = useState(false);\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t{asButton ? (\n\t\t\t\t<DialogTrigger asChild>\n\t\t\t\t\t<Button variant=\"outline\" size=\"icon\" className=\"h-9 w-9\">\n\t\t\t\t\t\t<Activity className=\"h-4 w-4\" />\n\t\t\t\t\t</Button>\n\t\t\t\t</DialogTrigger>\n\t\t\t) : (\n\t\t\t\t<DropdownMenuItem\n\t\t\t\t\tclassName=\"w-full cursor-pointer\"\n\t\t\t\t\tonSelect={(e) => {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\tsetIsOpen(true);\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\tView Actions\n\t\t\t\t</DropdownMenuItem>\n\t\t\t)}\n\t\t\t<DialogContent className=\"sm:max-w-xl\">\n\t\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t\t<DialogTitle className=\"text-xl\">Web server settings</DialogTitle>\n\t\t\t\t\t<DialogDescription>Reload or clean the web server.</DialogDescription>\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"grid grid-cols-2 w-full gap-4\">\n\t\t\t\t\t<ShowTraefikActions serverId={serverId} />\n\t\t\t\t\t<ShowStorageActions serverId={serverId} />\n\t\t\t\t\t<ToggleDockerCleanup serverId={serverId} />\n\t\t\t\t</div>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/servers/actions/show-storage-actions.tsx",
    "content": "import { toast } from \"sonner\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDropdownMenu,\n\tDropdownMenuContent,\n\tDropdownMenuGroup,\n\tDropdownMenuItem,\n\tDropdownMenuLabel,\n\tDropdownMenuSeparator,\n\tDropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\nimport { api } from \"@/utils/api\";\n\ninterface Props {\n\tserverId?: string;\n}\nexport const ShowStorageActions = ({ serverId }: Props) => {\n\tconst { mutateAsync: cleanAll, isPending: cleanAllIsLoading } =\n\t\tapi.settings.cleanAll.useMutation();\n\n\tconst {\n\t\tmutateAsync: cleanDockerBuilder,\n\t\tisPending: cleanDockerBuilderIsPending,\n\t} = api.settings.cleanDockerBuilder.useMutation();\n\n\tconst { mutateAsync: cleanMonitoring } =\n\t\tapi.settings.cleanMonitoring.useMutation();\n\tconst {\n\t\tmutateAsync: cleanUnusedImages,\n\t\tisPending: cleanUnusedImagesIsPending,\n\t} = api.settings.cleanUnusedImages.useMutation();\n\n\tconst {\n\t\tmutateAsync: cleanUnusedVolumes,\n\t\tisPending: cleanUnusedVolumesIsPending,\n\t} = api.settings.cleanUnusedVolumes.useMutation();\n\n\tconst {\n\t\tmutateAsync: cleanStoppedContainers,\n\t\tisPending: cleanStoppedContainersIsPending,\n\t} = api.settings.cleanStoppedContainers.useMutation();\n\n\tconst { mutateAsync: cleanPatchRepos, isPending: cleanPatchReposIsLoading } =\n\t\tapi.patch.cleanPatchRepos.useMutation();\n\n\treturn (\n\t\t<DropdownMenu>\n\t\t\t<DropdownMenuTrigger\n\t\t\t\tasChild\n\t\t\t\tdisabled={\n\t\t\t\t\tcleanAllIsLoading ||\n\t\t\t\t\tcleanDockerBuilderIsPending ||\n\t\t\t\t\tcleanUnusedImagesIsPending ||\n\t\t\t\t\tcleanUnusedVolumesIsPending ||\n\t\t\t\t\tcleanStoppedContainersIsPending ||\n\t\t\t\t\tcleanPatchReposIsLoading\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t<Button\n\t\t\t\t\tisLoading={\n\t\t\t\t\t\tcleanAllIsLoading ||\n\t\t\t\t\t\tcleanDockerBuilderIsPending ||\n\t\t\t\t\t\tcleanUnusedImagesIsPending ||\n\t\t\t\t\t\tcleanUnusedVolumesIsPending ||\n\t\t\t\t\t\tcleanStoppedContainersIsPending ||\n\t\t\t\t\t\tcleanPatchReposIsLoading\n\t\t\t\t\t}\n\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t>\n\t\t\t\t\tSpace\n\t\t\t\t</Button>\n\t\t\t</DropdownMenuTrigger>\n\t\t\t<DropdownMenuContent className=\"w-64\" align=\"start\">\n\t\t\t\t<DropdownMenuLabel>Actions</DropdownMenuLabel>\n\t\t\t\t<DropdownMenuSeparator />\n\t\t\t\t<DropdownMenuGroup>\n\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\tclassName=\"w-full cursor-pointer\"\n\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\tawait cleanUnusedImages({\n\t\t\t\t\t\t\t\tserverId: serverId,\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.then(async () => {\n\t\t\t\t\t\t\t\t\ttoast.success(\"Cleaned images\");\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\ttoast.error(\"Error cleaning images\");\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<span>Clean unused images</span>\n\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\tclassName=\"w-full cursor-pointer\"\n\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\tawait cleanUnusedVolumes({\n\t\t\t\t\t\t\t\tserverId: serverId,\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.then(async () => {\n\t\t\t\t\t\t\t\t\ttoast.success(\"Cleaned volumes\");\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\ttoast.error(\"Error cleaning volumes\");\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<span>Clean unused volumes</span>\n\t\t\t\t\t</DropdownMenuItem>\n\n\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\tclassName=\"w-full cursor-pointer\"\n\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\tawait cleanStoppedContainers({\n\t\t\t\t\t\t\t\tserverId: serverId,\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.then(async () => {\n\t\t\t\t\t\t\t\t\ttoast.success(\"Stopped containers cleaned\");\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\ttoast.error(\"Error cleaning stopped containers\");\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<span>Clean stopped containers</span>\n\t\t\t\t\t</DropdownMenuItem>\n\n\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\tclassName=\"w-full cursor-pointer\"\n\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\tawait cleanPatchRepos({\n\t\t\t\t\t\t\t\tserverId: serverId,\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.then(async () => {\n\t\t\t\t\t\t\t\t\ttoast.success(\"Cleaned Patch Caches\");\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\ttoast.error(\"Error cleaning Patch Caches\");\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<span>Clean Patch Caches</span>\n\t\t\t\t\t</DropdownMenuItem>\n\n\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\tclassName=\"w-full cursor-pointer\"\n\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\tawait cleanDockerBuilder({\n\t\t\t\t\t\t\t\tserverId: serverId,\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.then(async () => {\n\t\t\t\t\t\t\t\t\ttoast.success(\"Cleaned Docker Builder\");\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\ttoast.error(\"Error cleaning Docker Builder\");\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<span>Clean Docker Builder & System</span>\n\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t{!serverId && (\n\t\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\t\tclassName=\"w-full cursor-pointer\"\n\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\tawait cleanMonitoring()\n\t\t\t\t\t\t\t\t\t.then(async () => {\n\t\t\t\t\t\t\t\t\t\ttoast.success(\"Cleaned Monitoring\");\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error cleaning Monitoring\");\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span>Clean Monitoring</span>\n\t\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t)}\n\n\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\tclassName=\"w-full cursor-pointer\"\n\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\tawait cleanAll({\n\t\t\t\t\t\t\t\tserverId: serverId,\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.then(async () => {\n\t\t\t\t\t\t\t\t\ttoast.success(\"Cleaning in progress... Please wait\");\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\ttoast.error(\"Error cleaning all\");\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<span>Clean all</span>\n\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t</DropdownMenuGroup>\n\t\t\t</DropdownMenuContent>\n\t\t</DropdownMenu>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/servers/actions/show-traefik-actions.tsx",
    "content": "import { toast } from \"sonner\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { DialogAction } from \"@/components/shared/dialog-action\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDropdownMenu,\n\tDropdownMenuContent,\n\tDropdownMenuGroup,\n\tDropdownMenuItem,\n\tDropdownMenuLabel,\n\tDropdownMenuSeparator,\n\tDropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\nimport { useHealthCheckAfterMutation } from \"@/hooks/use-health-check-after-mutation\";\nimport { api } from \"@/utils/api\";\nimport { EditTraefikEnv } from \"../../web-server/edit-traefik-env\";\nimport { ManageTraefikPorts } from \"../../web-server/manage-traefik-ports\";\nimport { ShowModalLogs } from \"../../web-server/show-modal-logs\";\n\ninterface Props {\n\tserverId?: string;\n}\nexport const ShowTraefikActions = ({ serverId }: Props) => {\n\tconst { mutateAsync: reloadTraefik, isPending: reloadTraefikIsLoading } =\n\t\tapi.settings.reloadTraefik.useMutation();\n\n\tconst { mutateAsync: toggleDashboard, isPending: toggleDashboardIsLoading } =\n\t\tapi.settings.toggleDashboard.useMutation();\n\n\tconst { data: haveTraefikDashboardPortEnabled, refetch: refetchDashboard } =\n\t\tapi.settings.haveTraefikDashboardPortEnabled.useQuery({\n\t\t\tserverId,\n\t\t});\n\n\tconst {\n\t\texecute: executeWithHealthCheck,\n\t\tisExecuting: isHealthCheckExecuting,\n\t} = useHealthCheckAfterMutation({\n\t\tinitialDelay: 5000,\n\t\tpollInterval: 4000,\n\t\tsuccessMessage: \"Traefik dashboard updated successfully\",\n\t\tonSuccess: () => {\n\t\t\trefetchDashboard();\n\t\t},\n\t});\n\n\tconst {\n\t\texecute: executeReloadWithHealthCheck,\n\t\tisExecuting: isReloadHealthCheckExecuting,\n\t} = useHealthCheckAfterMutation({\n\t\tinitialDelay: 5000,\n\t\tpollInterval: 4000,\n\t\tsuccessMessage: \"Traefik Reloaded\",\n\t});\n\n\treturn (\n\t\t<DropdownMenu>\n\t\t\t<DropdownMenuTrigger\n\t\t\t\tasChild\n\t\t\t\tdisabled={\n\t\t\t\t\treloadTraefikIsLoading ||\n\t\t\t\t\ttoggleDashboardIsLoading ||\n\t\t\t\t\tisHealthCheckExecuting ||\n\t\t\t\t\tisReloadHealthCheckExecuting\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t<Button\n\t\t\t\t\tisLoading={\n\t\t\t\t\t\treloadTraefikIsLoading ||\n\t\t\t\t\t\ttoggleDashboardIsLoading ||\n\t\t\t\t\t\tisHealthCheckExecuting ||\n\t\t\t\t\t\tisReloadHealthCheckExecuting\n\t\t\t\t\t}\n\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t>\n\t\t\t\t\tTraefik\n\t\t\t\t</Button>\n\t\t\t</DropdownMenuTrigger>\n\t\t\t<DropdownMenuContent className=\"w-56\" align=\"start\">\n\t\t\t\t<DropdownMenuLabel>Actions</DropdownMenuLabel>\n\t\t\t\t<DropdownMenuSeparator />\n\t\t\t\t<DropdownMenuGroup>\n\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tawait executeReloadWithHealthCheck(() =>\n\t\t\t\t\t\t\t\t\treloadTraefik({ serverId }),\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\t\tconst errorMessage =\n\t\t\t\t\t\t\t\t\t(error as Error)?.message ||\n\t\t\t\t\t\t\t\t\t\"Failed to reload Traefik. Please try again.\";\n\t\t\t\t\t\t\t\ttoast.error(errorMessage);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tclassName=\"cursor-pointer\"\n\t\t\t\t\t\tdisabled={isReloadHealthCheckExecuting}\n\t\t\t\t\t>\n\t\t\t\t\t\t<span>Reload</span>\n\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t<ShowModalLogs\n\t\t\t\t\t\tappName=\"dokploy-traefik\"\n\t\t\t\t\t\tserverId={serverId}\n\t\t\t\t\t\ttype=\"standalone\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\t\tonSelect={(e) => e.preventDefault()}\n\t\t\t\t\t\t\tclassName=\"cursor-pointer\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tView Logs\n\t\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t</ShowModalLogs>\n\t\t\t\t\t<EditTraefikEnv serverId={serverId}>\n\t\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\t\tonSelect={(e) => e.preventDefault()}\n\t\t\t\t\t\t\tclassName=\"cursor-pointer\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span>Modify Environment</span>\n\t\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t</EditTraefikEnv>\n\n\t\t\t\t\t<DialogAction\n\t\t\t\t\t\ttitle={\n\t\t\t\t\t\t\thaveTraefikDashboardPortEnabled\n\t\t\t\t\t\t\t\t? \"Disable Traefik Dashboard\"\n\t\t\t\t\t\t\t\t: \"Enable Traefik Dashboard\"\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t<div className=\"space-y-4\">\n\t\t\t\t\t\t\t\t<AlertBlock type=\"warning\">\n\t\t\t\t\t\t\t\t\tThe Traefik container will be recreated from scratch. This\n\t\t\t\t\t\t\t\t\tmeans the container will be deleted and created again, which\n\t\t\t\t\t\t\t\t\tmay cause downtime in your applications.\n\t\t\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\tAre you sure you want to{\" \"}\n\t\t\t\t\t\t\t\t\t{haveTraefikDashboardPortEnabled ? \"disable\" : \"enable\"} the\n\t\t\t\t\t\t\t\t\tTraefik dashboard?\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tawait executeWithHealthCheck(() =>\n\t\t\t\t\t\t\t\t\ttoggleDashboard({\n\t\t\t\t\t\t\t\t\t\tenableDashboard: !haveTraefikDashboardPortEnabled,\n\t\t\t\t\t\t\t\t\t\tserverId: serverId,\n\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\t\tconst errorMessage =\n\t\t\t\t\t\t\t\t\t(error as Error)?.message ||\n\t\t\t\t\t\t\t\t\t\"Failed to toggle dashboard. Please check if port 8080 is available.\";\n\t\t\t\t\t\t\t\ttoast.error(errorMessage);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tdisabled={toggleDashboardIsLoading || isHealthCheckExecuting}\n\t\t\t\t\t\ttype=\"default\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\t\tonSelect={(e) => e.preventDefault()}\n\t\t\t\t\t\t\tclassName=\"w-full cursor-pointer space-x-3\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t{haveTraefikDashboardPortEnabled ? \"Disable\" : \"Enable\"}{\" \"}\n\t\t\t\t\t\t\t\tDashboard\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t</DialogAction>\n\t\t\t\t\t<ManageTraefikPorts serverId={serverId}>\n\t\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\t\tonSelect={(e) => e.preventDefault()}\n\t\t\t\t\t\t\tclassName=\"cursor-pointer\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span>Additional Port Mappings</span>\n\t\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t</ManageTraefikPorts>\n\t\t\t\t</DropdownMenuGroup>\n\t\t\t</DropdownMenuContent>\n\t\t</DropdownMenu>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/servers/actions/toggle-docker-cleanup.tsx",
    "content": "import { toast } from \"sonner\";\nimport { Label } from \"@/components/ui/label\";\nimport { Switch } from \"@/components/ui/switch\";\nimport { api } from \"@/utils/api\";\n\ninterface Props {\n\tserverId?: string;\n}\nexport const ToggleDockerCleanup = ({ serverId }: Props) => {\n\tconst { data, refetch } = api.settings.getWebServerSettings.useQuery(\n\t\tundefined,\n\t\t{\n\t\t\tenabled: !serverId,\n\t\t},\n\t);\n\n\tconst { data: server, refetch: refetchServer } = api.server.one.useQuery(\n\t\t{\n\t\t\tserverId: serverId || \"\",\n\t\t},\n\t\t{\n\t\t\tenabled: !!serverId,\n\t\t},\n\t);\n\n\tconst enabled = serverId\n\t\t? server?.enableDockerCleanup\n\t\t: data?.enableDockerCleanup;\n\n\tconst { mutateAsync } = api.settings.updateDockerCleanup.useMutation();\n\n\tconst handleToggle = async (checked: boolean) => {\n\t\ttry {\n\t\t\tawait mutateAsync({\n\t\t\t\tenableDockerCleanup: checked,\n\t\t\t\t...(serverId && { serverId }),\n\t\t\t} as {\n\t\t\t\tenableDockerCleanup: boolean;\n\t\t\t\tserverId?: string;\n\t\t\t});\n\t\t\tif (serverId) {\n\t\t\t\tawait refetchServer();\n\t\t\t} else {\n\t\t\t\tawait refetch();\n\t\t\t}\n\t\t\ttoast.success(\"Docker Cleanup updated\");\n\t\t} catch {\n\t\t\ttoast.error(\"Docker Cleanup Error\");\n\t\t}\n\t};\n\n\treturn (\n\t\t<div className=\"flex items-center gap-4\">\n\t\t\t<Switch checked={!!enabled} onCheckedChange={handleToggle} />\n\t\t\t<Label className=\"text-primary\">Daily Docker Cleanup</Label>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/servers/edit-script.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { FileTerminal } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { CodeEditor } from \"@/components/shared/code-editor\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { api } from \"@/utils/api\";\n\ninterface Props {\n\tserverId: string;\n}\n\nconst schema = z.object({\n\tcommand: z.string().min(1, {\n\t\tmessage: \"Command is required\",\n\t}),\n});\n\ntype Schema = z.infer<typeof schema>;\n\nexport const EditScript = ({ serverId }: Props) => {\n\tconst [isOpen, setIsOpen] = useState(false);\n\tconst { data: server } = api.server.one.useQuery(\n\t\t{\n\t\t\tserverId,\n\t\t},\n\t\t{\n\t\t\tenabled: !!serverId,\n\t\t},\n\t);\n\n\tconst { mutateAsync, isPending } = api.server.update.useMutation();\n\n\tconst { data: defaultCommand } = api.server.getDefaultCommand.useQuery(\n\t\t{\n\t\t\tserverId,\n\t\t},\n\t\t{\n\t\t\tenabled: !!serverId,\n\t\t},\n\t);\n\n\tconst form = useForm<Schema>({\n\t\tdefaultValues: {\n\t\t\tcommand: \"\",\n\t\t},\n\t\tresolver: zodResolver(schema),\n\t});\n\n\tuseEffect(() => {\n\t\tif (server) {\n\t\t\tform.reset({\n\t\t\t\tcommand: server.command || defaultCommand,\n\t\t\t});\n\t\t}\n\t}, [server, defaultCommand]);\n\n\tconst onSubmit = async (formData: Schema) => {\n\t\tif (server) {\n\t\t\tawait mutateAsync({\n\t\t\t\t...server,\n\t\t\t\tcommand: formData.command || \"\",\n\t\t\t\tserverId,\n\t\t\t})\n\t\t\t\t.then((_data) => {\n\t\t\t\t\ttoast.success(\"Script modified successfully\");\n\t\t\t\t})\n\t\t\t\t.catch(() => {\n\t\t\t\t\ttoast.error(\"Error modifying the script\");\n\t\t\t\t});\n\t\t}\n\t};\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t<Button variant=\"outline\">\n\t\t\t\t\tModify Script\n\t\t\t\t\t<FileTerminal className=\"size-4 text-muted-foreground\" />\n\t\t\t\t</Button>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-5xl overflow-x-hidden\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Modify Script</DialogTitle>\n\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\tModify the script which install everything necessary to deploy\n\t\t\t\t\t\tapplications on your server,\n\t\t\t\t\t</DialogDescription>\n\n\t\t\t\t\t<AlertBlock type=\"warning\">\n\t\t\t\t\t\tWe recommend not modifying this script unless you know what you are\n\t\t\t\t\t\tdoing.\n\t\t\t\t\t</AlertBlock>\n\t\t\t\t</DialogHeader>\n\t\t\t\t<div className=\"grid gap-4\">\n\t\t\t\t\t<Form {...form}>\n\t\t\t\t\t\t<form\n\t\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\t\tid=\"hook-form-delete-application\"\n\t\t\t\t\t\t\tclassName=\"grid w-full gap-4\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"command\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Command</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl className=\"max-h-[75vh] max-w-[60rem] overflow-y-scroll overflow-x-hidden\">\n\t\t\t\t\t\t\t\t\t\t\t<CodeEditor\n\t\t\t\t\t\t\t\t\t\t\t\tlanguage=\"shell\"\n\t\t\t\t\t\t\t\t\t\t\t\twrapperClassName=\"font-mono\"\n\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder={`\nset -e\necho \"Hello world\"\n`}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</form>\n\t\t\t\t\t</Form>\n\t\t\t\t</div>\n\t\t\t\t<DialogFooter className=\"flex justify-between w-full\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tform.reset({\n\t\t\t\t\t\t\t\tcommand: defaultCommand || \"\",\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tReset\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tisLoading={isPending}\n\t\t\t\t\t\tform=\"hook-form-delete-application\"\n\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t>\n\t\t\t\t\t\tSave\n\t\t\t\t\t</Button>\n\t\t\t\t</DialogFooter>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/servers/gpu-support-modal.tsx",
    "content": "import { useState } from \"react\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport { DropdownMenuItem } from \"@/components/ui/dropdown-menu\";\nimport { GPUSupport } from \"./gpu-support\";\n\nexport const GPUSupportModal = () => {\n\tconst [isOpen, setIsOpen] = useState(false);\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t<DropdownMenuItem\n\t\t\t\t\tclassName=\"w-full cursor-pointer\"\n\t\t\t\t\tonSelect={(e) => e.preventDefault()}\n\t\t\t\t>\n\t\t\t\t\t<span>GPU Setup</span>\n\t\t\t\t</DropdownMenuItem>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-4xl\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle className=\"flex items-center gap-2\">\n\t\t\t\t\t\tDokploy Server GPU Setup\n\t\t\t\t\t</DialogTitle>\n\t\t\t\t</DialogHeader>\n\n\t\t\t\t<GPUSupport serverId=\"\" />\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/servers/gpu-support.tsx",
    "content": "import { CheckCircle2, Cpu, Loader2, RefreshCw, XCircle } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { toast } from \"sonner\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { DialogAction } from \"@/components/shared/dialog-action\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport { api } from \"@/utils/api\";\n\ninterface GPUSupportProps {\n\tserverId?: string;\n}\n\nexport function GPUSupport({ serverId }: GPUSupportProps) {\n\tconst [isLoading, setIsLoading] = useState(false);\n\tconst [isRefreshing, setIsRefreshing] = useState(false);\n\tconst utils = api.useContext();\n\n\tconst {\n\t\tdata: gpuStatus,\n\t\tisLoading: isChecking,\n\t\trefetch,\n\t} = api.settings.checkGPUStatus.useQuery(\n\t\t{ serverId },\n\t\t{\n\t\t\tenabled: serverId !== undefined,\n\t\t},\n\t);\n\n\tconst setupGPU = api.settings.setupGPU.useMutation({\n\t\tonMutate: () => {\n\t\t\tsetIsLoading(true);\n\t\t},\n\t\tonSuccess: async () => {\n\t\t\ttoast.success(\"GPU support enabled successfully\");\n\t\t\tsetIsLoading(false);\n\t\t\tawait utils.settings.checkGPUStatus.invalidate({ serverId });\n\t\t},\n\t\tonError: (error) => {\n\t\t\ttoast.error(\n\t\t\t\terror.message ||\n\t\t\t\t\t\"Failed to enable GPU support. Please check server logs.\",\n\t\t\t);\n\t\t\tsetIsLoading(false);\n\t\t},\n\t});\n\n\tconst handleRefresh = async () => {\n\t\tsetIsRefreshing(true);\n\t\ttry {\n\t\t\tawait utils.settings.checkGPUStatus.invalidate({ serverId });\n\t\t\tawait refetch();\n\t\t} catch {\n\t\t\ttoast.error(\"Failed to refresh GPU status\");\n\t\t} finally {\n\t\t\tsetIsRefreshing(false);\n\t\t}\n\t};\n\tuseEffect(() => {\n\t\thandleRefresh();\n\t}, []);\n\n\tconst handleEnableGPU = async () => {\n\t\tif (serverId === undefined) {\n\t\t\ttoast.error(\"No server selected\");\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tawait setupGPU.mutateAsync({ serverId });\n\t\t} catch {\n\t\t\t// Error handling is done in mutation's onError\n\t\t}\n\t};\n\n\treturn (\n\t\t<CardContent className=\"p-0\">\n\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t<Card className=\"bg-background\">\n\t\t\t\t\t<CardHeader className=\"flex flex-row items-center justify-between flex-wrap gap-2\">\n\t\t\t\t\t\t<div className=\"flex flex-row gap-2 justify-between w-full items-end max-sm:flex-col\">\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t<Cpu className=\"size-5\" />\n\t\t\t\t\t\t\t\t\t<CardTitle className=\"text-xl\">GPU Configuration</CardTitle>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\t\t\tConfigure and monitor GPU support\n\t\t\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\ttitle=\"Enable GPU Support?\"\n\t\t\t\t\t\t\t\t\tdescription=\"This will enable GPU support for Docker Swarm on this server. Make sure you have the required hardware and drivers installed.\"\n\t\t\t\t\t\t\t\t\tonClick={handleEnableGPU}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tisLoading={isLoading}\n\t\t\t\t\t\t\t\t\t\tdisabled={isLoading || serverId === undefined || isChecking}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{isLoading\n\t\t\t\t\t\t\t\t\t\t\t? \"Loading...\"\n\t\t\t\t\t\t\t\t\t\t\t: gpuStatus?.swarmEnabled\n\t\t\t\t\t\t\t\t\t\t\t\t? \"Reconfigure GPU\"\n\t\t\t\t\t\t\t\t\t\t\t\t: \"Enable GPU\"}\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\tonClick={handleRefresh}\n\t\t\t\t\t\t\t\t\tdisabled={isChecking || isRefreshing}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<RefreshCw\n\t\t\t\t\t\t\t\t\t\tclassName={`h-5 w-5 ${isChecking || isRefreshing ? \"animate-spin\" : \"\"}`}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</CardHeader>\n\n\t\t\t\t\t<CardContent className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t<AlertBlock type=\"info\">\n\t\t\t\t\t\t\t<div className=\"font-medium mb-2\">System Requirements:</div>\n\t\t\t\t\t\t\t<ul className=\"list-disc list-inside text-sm space-y-1\">\n\t\t\t\t\t\t\t\t<li>NVIDIA GPU hardware must be physically installed</li>\n\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\tNVIDIA drivers must be installed and running (check with\n\t\t\t\t\t\t\t\t\tnvidia-smi)\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\tNVIDIA Container Runtime must be installed\n\t\t\t\t\t\t\t\t\t(nvidia-container-runtime)\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t<li>User must have sudo/administrative privileges</li>\n\t\t\t\t\t\t\t\t<li>System must support CUDA for GPU acceleration</li>\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t</AlertBlock>\n\n\t\t\t\t\t\t{isChecking ? (\n\t\t\t\t\t\t\t<div className=\"flex items-center justify-center text-muted-foreground py-4\">\n\t\t\t\t\t\t\t\t<Loader2 className=\"mr-2 h-4 w-4 animate-spin\" />\n\t\t\t\t\t\t\t\t<span>Checking GPU status...</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<div className=\"grid gap-4\">\n\t\t\t\t\t\t\t\t{/* Prerequisites Section */}\n\t\t\t\t\t\t\t\t<div className=\"border rounded-lg p-4\">\n\t\t\t\t\t\t\t\t\t<h3 className=\"text-lg font-semibold mb-1\">Prerequisites</h3>\n\t\t\t\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground mb-4\">\n\t\t\t\t\t\t\t\t\t\tShows all software checks and available hardware\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t<div className=\"grid gap-2.5\">\n\t\t\t\t\t\t\t\t\t\t<StatusRow\n\t\t\t\t\t\t\t\t\t\t\tlabel=\"NVIDIA Driver\"\n\t\t\t\t\t\t\t\t\t\t\tisEnabled={gpuStatus?.driverInstalled}\n\t\t\t\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\t\t\t\tgpuStatus?.driverVersion\n\t\t\t\t\t\t\t\t\t\t\t\t\t? `Installed (v${gpuStatus.driverVersion})`\n\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Not Installed\"\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<StatusRow\n\t\t\t\t\t\t\t\t\t\t\tlabel=\"GPU Model\"\n\t\t\t\t\t\t\t\t\t\t\tvalue={gpuStatus?.gpuModel || \"Not Detected\"}\n\t\t\t\t\t\t\t\t\t\t\tshowIcon={false}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<StatusRow\n\t\t\t\t\t\t\t\t\t\t\tlabel=\"GPU Memory\"\n\t\t\t\t\t\t\t\t\t\t\tvalue={gpuStatus?.memoryInfo || \"Not Available\"}\n\t\t\t\t\t\t\t\t\t\t\tshowIcon={false}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<StatusRow\n\t\t\t\t\t\t\t\t\t\t\tlabel=\"Available GPUs\"\n\t\t\t\t\t\t\t\t\t\t\tvalue={gpuStatus?.availableGPUs || 0}\n\t\t\t\t\t\t\t\t\t\t\tshowIcon={false}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<StatusRow\n\t\t\t\t\t\t\t\t\t\t\tlabel=\"CUDA Support\"\n\t\t\t\t\t\t\t\t\t\t\tisEnabled={gpuStatus?.cudaSupport}\n\t\t\t\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\t\t\t\tgpuStatus?.cudaVersion\n\t\t\t\t\t\t\t\t\t\t\t\t\t? `Available (v${gpuStatus.cudaVersion})`\n\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Not Available\"\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<StatusRow\n\t\t\t\t\t\t\t\t\t\t\tlabel=\"NVIDIA Container Runtime\"\n\t\t\t\t\t\t\t\t\t\t\tisEnabled={gpuStatus?.runtimeInstalled}\n\t\t\t\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\t\t\t\tgpuStatus?.runtimeInstalled\n\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Installed\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Not Installed\"\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t{/* Configuration Status */}\n\t\t\t\t\t\t\t\t<div className=\"border rounded-lg p-4\">\n\t\t\t\t\t\t\t\t\t<h3 className=\"text-lg font-semibold mb-1\">\n\t\t\t\t\t\t\t\t\t\tDocker Swarm GPU Status\n\t\t\t\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground mb-4\">\n\t\t\t\t\t\t\t\t\t\tShows the configuration state that changes with the Enable\n\t\t\t\t\t\t\t\t\t\tGPU\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t<div className=\"grid gap-2.5\">\n\t\t\t\t\t\t\t\t\t\t<StatusRow\n\t\t\t\t\t\t\t\t\t\t\tlabel=\"Runtime Configuration\"\n\t\t\t\t\t\t\t\t\t\t\tisEnabled={gpuStatus?.runtimeConfigured}\n\t\t\t\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\t\t\t\tgpuStatus?.runtimeConfigured\n\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Default Runtime\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Not Default Runtime\"\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<StatusRow\n\t\t\t\t\t\t\t\t\t\t\tlabel=\"Swarm GPU Support\"\n\t\t\t\t\t\t\t\t\t\t\tisEnabled={gpuStatus?.swarmEnabled}\n\t\t\t\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\t\t\t\tgpuStatus?.swarmEnabled\n\t\t\t\t\t\t\t\t\t\t\t\t\t? `Enabled (${gpuStatus.gpuResources} GPU${gpuStatus.gpuResources !== 1 ? \"s\" : \"\"})`\n\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Not Enabled\"\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</CardContent>\n\t\t\t\t</Card>\n\t\t\t</div>\n\t\t</CardContent>\n\t);\n}\n\ninterface StatusRowProps {\n\tlabel: string;\n\tisEnabled?: boolean;\n\tdescription?: string;\n\tvalue?: string | number;\n\tshowIcon?: boolean;\n}\n\nexport function StatusRow({\n\tlabel,\n\tisEnabled,\n\tdescription,\n\tvalue,\n\tshowIcon = true,\n}: StatusRowProps) {\n\treturn (\n\t\t<div className=\"flex items-center justify-between\">\n\t\t\t<span className=\"text-sm\">{label}</span>\n\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t{showIcon ? (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<span\n\t\t\t\t\t\t\tclassName={`text-sm ${isEnabled ? \"text-green-500\" : \"text-red-500\"}`}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{description || (isEnabled ? \"Installed\" : \"Not Installed\")}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t{isEnabled ? (\n\t\t\t\t\t\t\t<CheckCircle2 className=\"size-4 text-green-500\" />\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<XCircle className=\"size-4 text-red-500\" />\n\t\t\t\t\t\t)}\n\t\t\t\t\t</>\n\t\t\t\t) : (\n\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">{value}</span>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/servers/handle-servers.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { Pencil, PlusIcon } from \"lucide-react\";\nimport Link from \"next/link\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport { DropdownMenuItem } from \"@/components/ui/dropdown-menu\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectGroup,\n\tSelectItem,\n\tSelectLabel,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { Textarea } from \"@/components/ui/textarea\";\nimport { api } from \"@/utils/api\";\n\nconst Schema = z.object({\n\tname: z.string().min(1, {\n\t\tmessage: \"Name is required\",\n\t}),\n\tdescription: z.string().optional(),\n\tipAddress: z.string().min(1, {\n\t\tmessage: \"IP Address is required\",\n\t}),\n\tport: z.number().optional(),\n\tusername: z.string().optional(),\n\tsshKeyId: z.string().min(1, {\n\t\tmessage: \"SSH Key is required\",\n\t}),\n\tserverType: z.enum([\"deploy\", \"build\"]).default(\"deploy\"),\n});\n\ntype Schema = z.infer<typeof Schema>;\n\ninterface Props {\n\tserverId?: string;\n\tasButton?: boolean;\n}\n\nexport const HandleServers = ({ serverId, asButton = false }: Props) => {\n\tconst utils = api.useUtils();\n\tconst [isOpen, setIsOpen] = useState(false);\n\tconst { data: canCreateMoreServers, refetch } =\n\t\tapi.stripe.canCreateMoreServers.useQuery();\n\n\tconst { data, refetch: refetchServer } = api.server.one.useQuery(\n\t\t{\n\t\t\tserverId: serverId || \"\",\n\t\t},\n\t\t{\n\t\t\tenabled: !!serverId,\n\t\t},\n\t);\n\n\tconst { data: sshKeys } = api.sshKey.all.useQuery();\n\tconst { mutateAsync, error, isPending, isError } = serverId\n\t\t? api.server.update.useMutation()\n\t\t: api.server.create.useMutation();\n\tconst form = useForm({\n\t\tdefaultValues: {\n\t\t\tdescription: \"\",\n\t\t\tname: \"\",\n\t\t\tipAddress: \"\",\n\t\t\tport: 22,\n\t\t\tusername: \"root\",\n\t\t\tsshKeyId: \"\",\n\t\t\tserverType: \"deploy\",\n\t\t},\n\t\tresolver: zodResolver(Schema),\n\t});\n\n\tuseEffect(() => {\n\t\tform.reset({\n\t\t\tdescription: data?.description || \"\",\n\t\t\tname: data?.name || \"\",\n\t\t\tipAddress: data?.ipAddress || \"\",\n\t\t\tport: data?.port || 22,\n\t\t\tusername: data?.username || \"root\",\n\t\t\tsshKeyId: data?.sshKeyId || \"\",\n\t\t\tserverType: data?.serverType || \"deploy\",\n\t\t});\n\t}, [form, form.reset, form.formState.isSubmitSuccessful, data]);\n\n\tuseEffect(() => {\n\t\trefetch();\n\t}, [isOpen]);\n\n\tconst onSubmit = async (data: Schema) => {\n\t\tawait mutateAsync({\n\t\t\tname: data.name,\n\t\t\tdescription: data.description || \"\",\n\t\t\tipAddress: data.ipAddress?.trim() || \"\",\n\t\t\tport: data.port || 22,\n\t\t\tusername: data.username || \"root\",\n\t\t\tsshKeyId: data.sshKeyId || \"\",\n\t\t\tserverType: data.serverType || \"deploy\",\n\t\t\tserverId: serverId || \"\",\n\t\t})\n\t\t\t.then(async (_data) => {\n\t\t\t\tawait utils.server.all.invalidate();\n\t\t\t\trefetchServer();\n\t\t\t\ttoast.success(serverId ? \"Server Updated\" : \"Server Created\");\n\t\t\t\tsetIsOpen(false);\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\n\t\t\t\t\tserverId ? \"Error updating a server\" : \"Error creating a server\",\n\t\t\t\t);\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t{serverId ? (\n\t\t\t\tasButton ? (\n\t\t\t\t\t<DialogTrigger asChild>\n\t\t\t\t\t\t<Button variant=\"outline\" size=\"icon\" className=\"h-9 w-9\">\n\t\t\t\t\t\t\t<Pencil className=\"h-4 w-4\" />\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</DialogTrigger>\n\t\t\t\t) : (\n\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\tclassName=\"w-full cursor-pointer \"\n\t\t\t\t\t\tonSelect={(e) => {\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\tsetIsOpen(true);\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tEdit Server\n\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t)\n\t\t\t) : (\n\t\t\t\t<DialogTrigger asChild>\n\t\t\t\t\t<Button className=\"cursor-pointer space-x-3\">\n\t\t\t\t\t\t<PlusIcon className=\"h-4 w-4\" />\n\t\t\t\t\t\tCreate Server\n\t\t\t\t\t</Button>\n\t\t\t\t</DialogTrigger>\n\t\t\t)}\n\t\t\t<DialogContent className=\"sm:max-w-3xl \">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>{serverId ? \"Edit\" : \"Create\"} Server</DialogTitle>\n\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\t{serverId ? \"Edit\" : \"Create\"} a server to deploy your applications\n\t\t\t\t\t\tremotely.\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t<div>\n\t\t\t\t\t<p className=\"text-primary text-sm font-medium\">\n\t\t\t\t\t\tYou may need to purchase or rent a Virtual Private Server (VPS) to\n\t\t\t\t\t\tproceed. We recommend using one of these heavily tested providers:\n\t\t\t\t\t</p>\n\t\t\t\t\t<ul className=\"list-inside list-disc pl-4 text-sm text-muted-foreground mt-4\">\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\thref=\"https://www.hostinger.com/vps-hosting?REFERRALCODE=1SIUMAURICI97\"\n\t\t\t\t\t\t\t\tclassName=\"text-link underline\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tHostinger - Get 20% Discount\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\thref=\" https://app.americancloud.com/register?ref=dokploy\"\n\t\t\t\t\t\t\t\tclassName=\"text-link underline\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tAmerican Cloud - Get $20 Credits\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\thref=\"https://m.do.co/c/db24efd43f35\"\n\t\t\t\t\t\t\t\tclassName=\"text-link underline\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tDigitalOcean - Get $200 Credits\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\thref=\"https://hetzner.cloud/?ref=vou4fhxJ1W2D\"\n\t\t\t\t\t\t\t\tclassName=\"text-link underline\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tHetzner - Get €20 Credits\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\thref=\"https://www.vultr.com/?ref=9679828\"\n\t\t\t\t\t\t\t\tclassName=\"text-link underline\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tVultr\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\thref=\"https://www.linode.com/es/pricing/#compute-shared\"\n\t\t\t\t\t\t\t\tclassName=\"text-link underline\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tLinode\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t\t<AlertBlock className=\"mt-4 px-4\">\n\t\t\t\t\t\tYou are free to use whatever provider, but we recommend to use one\n\t\t\t\t\t\tof the above, to avoid issues.\n\t\t\t\t\t</AlertBlock>\n\t\t\t\t</div>\n\t\t\t\t{!canCreateMoreServers && (\n\t\t\t\t\t<AlertBlock type=\"warning\" className=\"mt-4\">\n\t\t\t\t\t\tYou cannot create more servers,{\" \"}\n\t\t\t\t\t\t<Link href=\"/dashboard/settings/billing\" className=\"text-primary\">\n\t\t\t\t\t\t\tPlease upgrade your plan\n\t\t\t\t\t\t</Link>\n\t\t\t\t\t</AlertBlock>\n\t\t\t\t)}\n\t\t\t\t{isError && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tid=\"hook-form-add-server\"\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\tclassName=\"grid w-full gap-4\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"flex flex-col gap-4 \">\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"name\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Name</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"Hostinger Server\" {...field} />\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"description\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Description</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Textarea\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"This server is for databases...\"\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"resize-none\"\n\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"serverType\"\n\t\t\t\t\t\t\trender={({ field }) => {\n\t\t\t\t\t\t\t\tconst serverTypeValue = form.watch(\"serverType\");\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Server Type</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\t\tonValueChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\tdefaultValue={field.value}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a server type\" />\n\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"deploy\">Deploy Server</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"build\">Build Server</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectLabel>Server Type</SelectLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectGroup>\n\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t{serverTypeValue === \"deploy\" && (\n\t\t\t\t\t\t\t\t\t\t\t<AlertBlock type=\"info\" className=\"mt-2\">\n\t\t\t\t\t\t\t\t\t\t\t\tDeploy servers are used to run your applications,\n\t\t\t\t\t\t\t\t\t\t\t\tdatabases, and services. They handle the deployment and\n\t\t\t\t\t\t\t\t\t\t\t\texecution of your projects.\n\t\t\t\t\t\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t{serverTypeValue === \"build\" && (\n\t\t\t\t\t\t\t\t\t\t\t<AlertBlock type=\"info\" className=\"mt-2\">\n\t\t\t\t\t\t\t\t\t\t\t\tBuild servers are dedicated to building your\n\t\t\t\t\t\t\t\t\t\t\t\tapplications. They handle the compilation and build\n\t\t\t\t\t\t\t\t\t\t\t\tprocess, offloading this work from your deployment\n\t\t\t\t\t\t\t\t\t\t\t\tservers. Build servers won't appear in deployment\n\t\t\t\t\t\t\t\t\t\t\t\toptions.\n\t\t\t\t\t\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"sshKeyId\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Select a SSH Key</FormLabel>\n\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\tonValueChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\tdefaultValue={field.value}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a SSH Key\" />\n\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t<SelectGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t{sshKeys?.map((sshKey) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={sshKey.sshKeyId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={sshKey.sshKeyId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{sshKey.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\tRegistries ({sshKeys?.length})\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectLabel>\n\t\t\t\t\t\t\t\t\t\t\t</SelectGroup>\n\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<div className=\"grid grid-cols-2 gap-4\">\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"ipAddress\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>IP Address</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"192.168.1.100\" {...field} />\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"port\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Port</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"22\"\n\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst value = e.target.value;\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (value === \"\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst number = Number.parseInt(value, 10);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!Number.isNaN(number)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(number);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"username\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Username</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"root\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</form>\n\n\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tisLoading={isPending}\n\t\t\t\t\t\t\tdisabled={!canCreateMoreServers && !serverId}\n\t\t\t\t\t\t\tform=\"hook-form-add-server\"\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{serverId ? \"Update\" : \"Create\"}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</DialogFooter>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/servers/security-audit.tsx",
    "content": "import { Loader2, LockKeyhole, RefreshCw } from \"lucide-react\";\nimport { useState } from \"react\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport { api } from \"@/utils/api\";\nimport { StatusRow } from \"./gpu-support\";\n\ninterface Props {\n\tserverId: string;\n}\n\nexport const SecurityAudit = ({ serverId }: Props) => {\n\tconst [isRefreshing, setIsRefreshing] = useState(false);\n\tconst { data, refetch, error, isPending, isError } =\n\t\tapi.server.security.useQuery(\n\t\t\t{ serverId },\n\t\t\t{\n\t\t\t\tenabled: !!serverId,\n\t\t\t},\n\t\t);\n\n\treturn (\n\t\t<CardContent className=\"p-0\">\n\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t<Card className=\"bg-background\">\n\t\t\t\t\t<CardHeader className=\"flex flex-row items-center justify-between flex-wrap gap-2\">\n\t\t\t\t\t\t<div className=\"flex flex-row gap-2 justify-between w-full  max-sm:flex-col\">\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t<LockKeyhole className=\"size-5\" />\n\t\t\t\t\t\t\t\t\t<CardTitle className=\"text-xl\">\n\t\t\t\t\t\t\t\t\t\tSetup Security Suggestions\n\t\t\t\t\t\t\t\t\t</CardTitle>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\t\t\tCheck the security suggestions\n\t\t\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tisLoading={isRefreshing}\n\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\tsetIsRefreshing(true);\n\t\t\t\t\t\t\t\t\tawait refetch();\n\t\t\t\t\t\t\t\t\tsetIsRefreshing(false);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<RefreshCw className=\"size-4\" />\n\t\t\t\t\t\t\t\tRefresh\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"flex items-center gap-2 w-full\">\n\t\t\t\t\t\t\t{isError && (\n\t\t\t\t\t\t\t\t<AlertBlock type=\"error\" className=\"w-full\">\n\t\t\t\t\t\t\t\t\t{error.message}\n\t\t\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</CardHeader>\n\n\t\t\t\t\t<CardContent className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t<AlertBlock type=\"info\" className=\"w-full\">\n\t\t\t\t\t\t\tUbuntu/Debian OS support is currently supported (Experimental)\n\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t\t{isPending ? (\n\t\t\t\t\t\t\t<div className=\"flex items-center justify-center text-muted-foreground py-4\">\n\t\t\t\t\t\t\t\t<Loader2 className=\"mr-2 h-4 w-4 animate-spin\" />\n\t\t\t\t\t\t\t\t<span>Checking Server configuration</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<div className=\"grid w-full gap-4\">\n\t\t\t\t\t\t\t\t<div className=\"border rounded-lg p-4\">\n\t\t\t\t\t\t\t\t\t<h3 className=\"text-lg font-semibold mb-1\">UFW</h3>\n\t\t\t\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground mb-4\">\n\t\t\t\t\t\t\t\t\t\tUFW (Uncomplicated Firewall) is a simple firewall that can\n\t\t\t\t\t\t\t\t\t\tbe used to block incoming and outgoing traffic from your\n\t\t\t\t\t\t\t\t\t\tserver.\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t<div className=\"grid gap-2.5\">\n\t\t\t\t\t\t\t\t\t\t<StatusRow\n\t\t\t\t\t\t\t\t\t\t\tlabel=\"UFW Installed\"\n\t\t\t\t\t\t\t\t\t\t\tisEnabled={data?.ufw?.installed}\n\t\t\t\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\t\t\t\tdata?.ufw?.installed\n\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Installed (Recommended)\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Not Installed (UFW should be installed for security)\"\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<StatusRow\n\t\t\t\t\t\t\t\t\t\t\tlabel=\"Status\"\n\t\t\t\t\t\t\t\t\t\t\tisEnabled={data?.ufw?.active}\n\t\t\t\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\t\t\t\tdata?.ufw?.active\n\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Active (Recommended)\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Not Active (UFW should be enabled for security)\"\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<StatusRow\n\t\t\t\t\t\t\t\t\t\t\tlabel=\"Default Incoming\"\n\t\t\t\t\t\t\t\t\t\t\tisEnabled={data?.ufw?.defaultIncoming === \"deny\"}\n\t\t\t\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\t\t\t\tdata?.ufw?.defaultIncoming === \"deny\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Default: Deny (Recommended)\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t: `Default: ${data?.ufw?.defaultIncoming} (Should be set to 'deny' for security)`\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t<div className=\"border rounded-lg p-4\">\n\t\t\t\t\t\t\t\t\t<h3 className=\"text-lg font-semibold mb-1\">SSH</h3>\n\t\t\t\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground mb-4\">\n\t\t\t\t\t\t\t\t\t\tSSH (Secure Shell) is a protocol that allows you to securely\n\t\t\t\t\t\t\t\t\t\tconnect to a server and execute commands on it.\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t<div className=\"grid gap-2.5\">\n\t\t\t\t\t\t\t\t\t\t<StatusRow\n\t\t\t\t\t\t\t\t\t\t\tlabel=\"Enabled\"\n\t\t\t\t\t\t\t\t\t\t\tisEnabled={data?.ssh?.enabled}\n\t\t\t\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\t\t\t\tdata?.ssh?.enabled\n\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Enabled\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Not Enabled (SSH should be enabled)\"\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<StatusRow\n\t\t\t\t\t\t\t\t\t\t\tlabel=\"Key Auth\"\n\t\t\t\t\t\t\t\t\t\t\tisEnabled={data?.ssh?.keyAuth}\n\t\t\t\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\t\t\t\tdata?.ssh?.keyAuth\n\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Enabled (Recommended)\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Not Enabled (Key Authentication should be enabled)\"\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<StatusRow\n\t\t\t\t\t\t\t\t\t\t\tlabel=\"Password Auth\"\n\t\t\t\t\t\t\t\t\t\t\tisEnabled={data?.ssh?.passwordAuth === \"no\"}\n\t\t\t\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\t\t\t\tdata?.ssh?.passwordAuth === \"no\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Disabled (Recommended)\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Enabled (Password Authentication should be disabled)\"\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<StatusRow\n\t\t\t\t\t\t\t\t\t\t\tlabel=\"Use PAM\"\n\t\t\t\t\t\t\t\t\t\t\tisEnabled={data?.ssh?.usePam === \"no\"}\n\t\t\t\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\t\t\t\tdata?.ssh?.usePam === \"no\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Disabled (Recommended for key-based auth)\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Enabled (Should be disabled when using key-based auth)\"\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t<div className=\"border rounded-lg p-4\">\n\t\t\t\t\t\t\t\t\t<h3 className=\"text-lg font-semibold mb-1\">Fail2Ban</h3>\n\t\t\t\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground mb-4\">\n\t\t\t\t\t\t\t\t\t\tFail2Ban (Fail2Ban) is a service that can be used to prevent\n\t\t\t\t\t\t\t\t\t\tbrute force attacks on your server.\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t<div className=\"grid gap-2.5\">\n\t\t\t\t\t\t\t\t\t\t<StatusRow\n\t\t\t\t\t\t\t\t\t\t\tlabel=\"Installed\"\n\t\t\t\t\t\t\t\t\t\t\tisEnabled={data?.fail2ban?.installed}\n\t\t\t\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\t\t\t\tdata?.fail2ban?.installed\n\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Installed (Recommended)\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Not Installed (Fail2Ban should be installed for protection against brute force attacks)\"\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t\t\t<StatusRow\n\t\t\t\t\t\t\t\t\t\t\tlabel=\"Enabled\"\n\t\t\t\t\t\t\t\t\t\t\tisEnabled={data?.fail2ban?.enabled}\n\t\t\t\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\t\t\t\tdata?.fail2ban?.enabled\n\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Enabled (Recommended)\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Not Enabled (Fail2Ban service should be enabled)\"\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<StatusRow\n\t\t\t\t\t\t\t\t\t\t\tlabel=\"Active\"\n\t\t\t\t\t\t\t\t\t\t\tisEnabled={data?.fail2ban?.active}\n\t\t\t\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\t\t\t\tdata?.fail2ban?.active\n\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Active (Recommended)\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Not Active (Fail2Ban service should be running)\"\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t\t\t<StatusRow\n\t\t\t\t\t\t\t\t\t\t\tlabel=\"SSH Protection\"\n\t\t\t\t\t\t\t\t\t\t\tisEnabled={data?.fail2ban?.sshEnabled === \"true\"}\n\t\t\t\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\t\t\t\tdata?.fail2ban?.sshEnabled === \"true\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Enabled (Recommended)\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Not Enabled (SSH protection should be enabled to prevent brute force attacks)\"\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t\t\t<StatusRow\n\t\t\t\t\t\t\t\t\t\t\tlabel=\"SSH Mode\"\n\t\t\t\t\t\t\t\t\t\t\tisEnabled={data?.fail2ban?.sshMode === \"aggressive\"}\n\t\t\t\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\t\t\t\tdata?.fail2ban?.sshMode === \"aggressive\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Aggressive Mode (Recommended)\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t: `Mode: ${data?.fail2ban?.sshMode || \"Not Set\"} (Aggressive mode recommended for better protection)`\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</CardContent>\n\t\t\t\t</Card>\n\t\t\t</div>\n\t\t</CardContent>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/servers/setup-monitoring.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { Eye, EyeOff, LayoutDashboardIcon, RefreshCw } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\tCommand,\n\tCommandEmpty,\n\tCommandGroup,\n\tCommandInput,\n\tCommandItem,\n} from \"@/components/ui/command\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input, NumberInput } from \"@/components/ui/input\";\nimport {\n\tPopover,\n\tPopoverContent,\n\tPopoverTrigger,\n} from \"@/components/ui/popover\";\nimport { api } from \"@/utils/api\";\nimport { useUrl } from \"@/utils/hooks/use-url\";\nimport { extractServices } from \"../users/add-permissions\";\n\ninterface Props {\n\tserverId?: string;\n}\n\nconst Schema = z.object({\n\tmetricsConfig: z.object({\n\t\tserver: z.object({\n\t\t\trefreshRate: z.number().min(2, {\n\t\t\t\tmessage: \"Server Refresh Rate is required\",\n\t\t\t}),\n\t\t\tport: z.number().min(1, {\n\t\t\t\tmessage: \"Port is required\",\n\t\t\t}),\n\t\t\ttoken: z.string(),\n\t\t\turlCallback: z.string(),\n\t\t\tretentionDays: z.number().min(1, {\n\t\t\t\tmessage: \"Retention days must be at least 1\",\n\t\t\t}),\n\t\t\tthresholds: z.object({\n\t\t\t\tcpu: z.number().min(0),\n\t\t\t\tmemory: z.number().min(0),\n\t\t\t}),\n\t\t\tcronJob: z.string().min(1, {\n\t\t\t\tmessage: \"Cron Job is required\",\n\t\t\t}),\n\t\t}),\n\t\tcontainers: z.object({\n\t\t\trefreshRate: z.number().min(2, {\n\t\t\t\tmessage: \"Container Refresh Rate is required\",\n\t\t\t}),\n\t\t\tservices: z.object({\n\t\t\t\tinclude: z.array(z.string()).optional(),\n\t\t\t\texclude: z.array(z.string()).optional(),\n\t\t\t}),\n\t\t}),\n\t}),\n});\n\ntype Schema = z.infer<typeof Schema>;\n\nexport const SetupMonitoring = ({ serverId }: Props) => {\n\tconst { data: serverData } = serverId\n\t\t? api.server.one.useQuery(\n\t\t\t\t{\n\t\t\t\t\tserverId: serverId || \"\",\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tenabled: !!serverId,\n\t\t\t\t},\n\t\t\t)\n\t\t: { data: null };\n\n\tconst { data: webServerSettings } =\n\t\tapi.settings.getWebServerSettings.useQuery(undefined, {\n\t\t\tenabled: !serverId,\n\t\t});\n\n\tconst data = serverId ? serverData : webServerSettings;\n\n\tconst url = useUrl();\n\n\tconst { data: projects } = api.project.allForPermissions.useQuery();\n\n\tconst extractServicesFromProjects = () => {\n\t\tif (!projects) return [];\n\n\t\tconst allServices = projects.flatMap((project) => {\n\t\t\tconst services = project.environments.flatMap((env) =>\n\t\t\t\textractServices(env),\n\t\t\t);\n\t\t\treturn serverId\n\t\t\t\t? services\n\t\t\t\t\t\t.filter((service) => service.serverId === serverId)\n\t\t\t\t\t\t.map((service) => service.appName)\n\t\t\t\t: services.map((service) => service.appName);\n\t\t});\n\n\t\treturn [...new Set(allServices)];\n\t};\n\n\tconst services = extractServicesFromProjects();\n\n\tconst form = useForm<Schema>({\n\t\tresolver: zodResolver(Schema),\n\t\tdefaultValues: {\n\t\t\tmetricsConfig: {\n\t\t\t\tserver: {\n\t\t\t\t\trefreshRate: 20,\n\t\t\t\t\tport: 4500,\n\t\t\t\t\ttoken: \"\",\n\t\t\t\t\turlCallback: `${url}/api/trpc/notification.receiveNotification`,\n\t\t\t\t\tretentionDays: 7,\n\t\t\t\t\tthresholds: {\n\t\t\t\t\t\tcpu: 0,\n\t\t\t\t\t\tmemory: 0,\n\t\t\t\t\t},\n\t\t\t\t\tcronJob: \"\",\n\t\t\t\t},\n\t\t\t\tcontainers: {\n\t\t\t\t\trefreshRate: 20,\n\t\t\t\t\tservices: {\n\t\t\t\t\t\tinclude: [],\n\t\t\t\t\t\texclude: [],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t});\n\n\tuseEffect(() => {\n\t\tif (data) {\n\t\t\tform.reset({\n\t\t\t\tmetricsConfig: {\n\t\t\t\t\tserver: {\n\t\t\t\t\t\trefreshRate: data?.metricsConfig?.server?.refreshRate,\n\t\t\t\t\t\tport: data?.metricsConfig?.server?.port,\n\t\t\t\t\t\ttoken: data?.metricsConfig?.server?.token || generateToken(),\n\t\t\t\t\t\turlCallback:\n\t\t\t\t\t\t\tdata?.metricsConfig?.server?.urlCallback ||\n\t\t\t\t\t\t\t`${url}/api/trpc/notification.receiveNotification`,\n\t\t\t\t\t\tretentionDays: data?.metricsConfig?.server?.retentionDays || 5,\n\t\t\t\t\t\tthresholds: {\n\t\t\t\t\t\t\tcpu: data?.metricsConfig?.server?.thresholds?.cpu,\n\t\t\t\t\t\t\tmemory: data?.metricsConfig?.server?.thresholds?.memory,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tcronJob: data?.metricsConfig?.server?.cronJob || \"0 0 * * *\",\n\t\t\t\t\t},\n\t\t\t\t\tcontainers: {\n\t\t\t\t\t\trefreshRate: data?.metricsConfig?.containers?.refreshRate,\n\t\t\t\t\t\tservices: {\n\t\t\t\t\t\t\tinclude: data?.metricsConfig?.containers?.services?.include,\n\t\t\t\t\t\t\texclude: data?.metricsConfig?.containers?.services?.exclude,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t});\n\t\t}\n\t}, [data, url]);\n\n\tconst [search, setSearch] = useState(\"\");\n\tconst [searchExclude, setSearchExclude] = useState(\"\");\n\tconst [showToken, setShowToken] = useState(false);\n\n\tconst availableServices = services?.filter(\n\t\t(service) =>\n\t\t\t!form\n\t\t\t\t.watch(\"metricsConfig.containers.services.include\")\n\t\t\t\t?.some((s) => s === service) &&\n\t\t\t!form\n\t\t\t\t.watch(\"metricsConfig.containers.services.exclude\")\n\t\t\t\t?.includes(service) &&\n\t\t\tservice.toLowerCase().includes(search.toLowerCase()),\n\t);\n\n\tconst availableServicesToExclude = [\n\t\t...(services?.filter(\n\t\t\t(service) =>\n\t\t\t\t!form\n\t\t\t\t\t.watch(\"metricsConfig.containers.services.exclude\")\n\t\t\t\t\t?.includes(service) &&\n\t\t\t\t!form\n\t\t\t\t\t.watch(\"metricsConfig.containers.services.include\")\n\t\t\t\t\t?.some((s) => s === service) &&\n\t\t\t\tservice.toLowerCase().includes(searchExclude.toLowerCase()),\n\t\t) ?? []),\n\t\t...(!form.watch(\"metricsConfig.containers.services.exclude\")?.includes(\"*\")\n\t\t\t? [\"*\"]\n\t\t\t: []),\n\t];\n\n\tconst { mutateAsync } = serverId\n\t\t? api.server.setupMonitoring.useMutation()\n\t\t: api.admin.setupMonitoring.useMutation();\n\n\tconst generateToken = () => {\n\t\tconst array = new Uint8Array(64);\n\t\tcrypto.getRandomValues(array);\n\t\treturn Array.from(array, (byte) => byte.toString(16).padStart(2, \"0\")).join(\n\t\t\t\"\",\n\t\t);\n\t};\n\n\tconst onSubmit = async (values: Schema) => {\n\t\tawait mutateAsync({\n\t\t\tserverId: serverId || \"\",\n\t\t\tmetricsConfig: values.metricsConfig,\n\t\t})\n\t\t\t.then(() => {\n\t\t\t\ttoast.success(\"Server updated successfully\");\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error updating the server\");\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<CardHeader className=\"\">\n\t\t\t\t<CardTitle className=\"text-xl flex flex-row gap-2\">\n\t\t\t\t\t<LayoutDashboardIcon className=\"size-6 text-muted-foreground self-center\" />\n\t\t\t\t\tMonitoring\n\t\t\t\t</CardTitle>\n\t\t\t\t<CardDescription>\n\t\t\t\t\tMonitor your servers and containers in realtime with notifications\n\t\t\t\t\twhen they reach their thresholds.\n\t\t\t\t</CardDescription>\n\t\t\t</CardHeader>\n\t\t\t<CardContent className=\"space-y-6 py-6 border-t\">\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\tclassName=\"flex w-full flex-col gap-4\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<AlertBlock>\n\t\t\t\t\t\t\tUsing a lower refresh rate will make your CPU and memory usage\n\t\t\t\t\t\t\thigher, we recommend 30-60 seconds\n\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"metricsConfig.server.refreshRate\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem className=\"flex flex-col justify-center max-sm:items-center\">\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Server Refresh Rate</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<NumberInput placeholder=\"10\" {...field} />\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\tPlease set the refresh rate for the server in seconds\n\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"metricsConfig.containers.refreshRate\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem className=\"flex flex-col justify-center max-sm:items-center\">\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Container Refresh Rate</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<NumberInput placeholder=\"10\" {...field} />\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\tPlease set the refresh rate for the containers in seconds\n\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"metricsConfig.server.cronJob\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Cron Job</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input {...field} placeholder=\"0 0 * * *\" />\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\tCron job for cleaning up metrics\n\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"metricsConfig.server.retentionDays\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Server Retention Days</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<NumberInput {...field} />\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\tNumber of days to retain server metrics data\n\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"metricsConfig.server.port\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem className=\"flex flex-col justify-center max-sm:items-center\">\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Port</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<NumberInput placeholder=\"4500\" {...field} />\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\tPlease set the port for the metrics server\n\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"metricsConfig.containers.services.include\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Include Services</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Popover>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<PopoverTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button variant=\"outline\">Add Service</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</PopoverTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<PopoverContent\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-[300px] p-0\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\talign=\"start\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Command>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandInput\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Search service...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={search}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonValueChange={setSearch}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{availableServices?.length === 0 ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"p-4 text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tNo services available.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandEmpty>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tNo service found.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandEmpty>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{availableServices?.map((service) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={service}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={service}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange([\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t...(field.value ?? []),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tservice,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetSearch(\"\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{service}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Command>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</PopoverContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Popover>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-wrap gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{field.value?.map((service) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={service}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-2\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{service}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-4 w-4 p-0\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.value?.filter((s) => s !== service),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t×\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tServices to monitor.\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"metricsConfig.containers.services.exclude\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Exclude Services</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Popover>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<PopoverTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button variant=\"outline\">Add Service</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</PopoverTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<PopoverContent\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-[300px] p-0\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\talign=\"start\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Command>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandInput\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Search service...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={searchExclude}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonValueChange={setSearchExclude}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{availableServicesToExclude?.length === 0 ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"p-4 text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tNo services available.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandEmpty>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tNo service found.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandEmpty>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{availableServicesToExclude.map(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(service) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={service}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={service}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange([\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t...(field.value ?? []),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tservice,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetSearchExclude(\"\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{service}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Command>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</PopoverContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Popover>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-wrap gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{field.value?.map((service, index) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={service}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-2\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{service}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-4 w-4 p-0\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.value?.filter((_, i) => i !== index),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t×\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tServices to exclude from monitoring\n\t\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"metricsConfig.server.thresholds.cpu\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>CPU Threshold (%)</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<NumberInput {...field} />\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\tAlert when CPU usage exceeds this percentage\n\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"metricsConfig.server.thresholds.memory\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Memory Threshold (%)</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<NumberInput {...field} />\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\tAlert when memory usage exceeds this percentage\n\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"metricsConfig.server.token\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Metrics Token</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"relative flex-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype={showToken ? \"text\" : \"password\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Enter your metrics token\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"absolute right-0 top-1/2 -translate-y-1/2\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => setShowToken(!showToken)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitle={showToken ? \"Hide token\" : \"Show token\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{showToken ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<EyeOff className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Eye className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst newToken = generateToken();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"metricsConfig.server.token\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnewToken,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Token generated successfully\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"Generate new token\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<RefreshCw className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\tToken for authenticating metrics requests\n\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"metricsConfig.server.urlCallback\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Metrics Callback URL</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"https://your-callback-url.com\"\n\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\tURL where metrics will be sent\n\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"flex items-center justify-end gap-2\">\n\t\t\t\t\t\t\t<Button type=\"submit\" isLoading={form.formState.isSubmitting}>\n\t\t\t\t\t\t\t\tSave changes\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</form>\n\t\t\t\t</Form>\n\t\t\t</CardContent>\n\t\t</>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/servers/setup-server.tsx",
    "content": "import copy from \"copy-to-clipboard\";\nimport { CopyIcon, ExternalLinkIcon, ServerIcon, Settings } from \"lucide-react\";\nimport Link from \"next/link\";\nimport { useState } from \"react\";\nimport { toast } from \"sonner\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { CodeEditor } from \"@/components/shared/code-editor\";\nimport { DialogAction } from \"@/components/shared/dialog-action\";\nimport { DrawerLogs } from \"@/components/shared/drawer-logs\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport { Tabs, TabsContent, TabsList, TabsTrigger } from \"@/components/ui/tabs\";\nimport { cn } from \"@/lib/utils\";\nimport { api } from \"@/utils/api\";\nimport { ShowDeployment } from \"../../application/deployments/show-deployment\";\nimport { type LogLine, parseLogs } from \"../../docker/logs/utils\";\nimport { EditScript } from \"./edit-script\";\nimport { GPUSupport } from \"./gpu-support\";\nimport { SecurityAudit } from \"./security-audit\";\nimport { SetupMonitoring } from \"./setup-monitoring\";\nimport { ValidateServer } from \"./validate-server\";\n\ninterface Props {\n\tserverId: string;\n\tasButton?: boolean;\n}\n\nexport const SetupServer = ({ serverId, asButton = false }: Props) => {\n\tconst [isOpen, setIsOpen] = useState(false);\n\tconst { data: server } = api.server.one.useQuery(\n\t\t{\n\t\t\tserverId,\n\t\t},\n\t\t{\n\t\t\tenabled: !!serverId,\n\t\t},\n\t);\n\n\tconst [activeLog, setActiveLog] = useState<string | null>(null);\n\tconst { data: isCloud } = api.settings.isCloud.useQuery();\n\tconst isBuildServer = server?.serverType === \"build\";\n\tconst [isDrawerOpen, setIsDrawerOpen] = useState(false);\n\tconst [filteredLogs, setFilteredLogs] = useState<LogLine[]>([]);\n\tconst [isDeploying, setIsDeploying] = useState(false);\n\tapi.server.setupWithLogs.useSubscription(\n\t\t{\n\t\t\tserverId: serverId,\n\t\t},\n\t\t{\n\t\t\tenabled: isDeploying,\n\t\t\tonData(log) {\n\t\t\t\tif (!isDrawerOpen) {\n\t\t\t\t\tsetIsDrawerOpen(true);\n\t\t\t\t}\n\n\t\t\t\tif (log === \"Deployment completed successfully!\") {\n\t\t\t\t\tsetIsDeploying(false);\n\t\t\t\t}\n\t\t\t\tconst parsedLogs = parseLogs(log);\n\t\t\t\tsetFilteredLogs((prev) => [...prev, ...parsedLogs]);\n\t\t\t},\n\t\t\tonError(error) {\n\t\t\t\tconsole.error(\"Deployment logs error:\", error);\n\t\t\t\tsetIsDeploying(false);\n\t\t\t},\n\t\t},\n\t);\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t{asButton ? (\n\t\t\t\t<DialogTrigger asChild>\n\t\t\t\t\t<Button variant=\"outline\" size=\"icon\" className=\"h-9 w-9\">\n\t\t\t\t\t\t<Settings className=\"h-4 w-4\" />\n\t\t\t\t\t</Button>\n\t\t\t\t</DialogTrigger>\n\t\t\t) : (\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"w-full cursor-pointer \"\n\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\tsetIsOpen(true);\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\tSetup Server <Settings className=\"size-4\" />\n\t\t\t\t</Button>\n\t\t\t)}\n\t\t\t<DialogContent className=\"sm:max-w-4xl  \">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<div className=\"flex flex-col gap-1.5\">\n\t\t\t\t\t\t<DialogTitle className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t<ServerIcon className=\"size-5\" /> Setup Server\n\t\t\t\t\t\t</DialogTitle>\n\t\t\t\t\t\t<p className=\"text-muted-foreground text-sm\">\n\t\t\t\t\t\t\tTo setup a server, please click on the button below.\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t</DialogHeader>\n\t\t\t\t{!server?.sshKeyId ? (\n\t\t\t\t\t<div className=\"flex flex-col gap-2 text-sm text-muted-foreground pt-3\">\n\t\t\t\t\t\t<AlertBlock type=\"warning\">\n\t\t\t\t\t\t\tPlease add a SSH Key to your server before setting up the server.\n\t\t\t\t\t\t\tyou can assign a SSH Key to your server in Edit Server.\n\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<div id=\"hook-form-add-gitlab\" className=\"grid w-full gap-4\">\n\t\t\t\t\t\t<AlertBlock type=\"warning\">\n\t\t\t\t\t\t\tUsing a root user is required to ensure everything works as\n\t\t\t\t\t\t\texpected.\n\t\t\t\t\t\t</AlertBlock>\n\n\t\t\t\t\t\t<Tabs defaultValue=\"ssh-keys\">\n\t\t\t\t\t\t\t<TabsList\n\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\"grid  w-[700px]\",\n\t\t\t\t\t\t\t\t\tisBuildServer\n\t\t\t\t\t\t\t\t\t\t? \"grid-cols-3\"\n\t\t\t\t\t\t\t\t\t\t: isCloud\n\t\t\t\t\t\t\t\t\t\t\t? \"grid-cols-6\"\n\t\t\t\t\t\t\t\t\t\t\t: \"grid-cols-5\",\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<TabsTrigger value=\"ssh-keys\">SSH Keys</TabsTrigger>\n\t\t\t\t\t\t\t\t<TabsTrigger value=\"deployments\">Deployments</TabsTrigger>\n\t\t\t\t\t\t\t\t<TabsTrigger value=\"validate\">Validate</TabsTrigger>\n\n\t\t\t\t\t\t\t\t{!isBuildServer && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<TabsTrigger value=\"audit\">Security</TabsTrigger>\n\t\t\t\t\t\t\t\t\t\t{isCloud && (\n\t\t\t\t\t\t\t\t\t\t\t<TabsTrigger value=\"monitoring\">Monitoring</TabsTrigger>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t<TabsTrigger value=\"gpu-setup\">GPU Setup</TabsTrigger>\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</TabsList>\n\t\t\t\t\t\t\t<TabsContent\n\t\t\t\t\t\t\t\tvalue=\"ssh-keys\"\n\t\t\t\t\t\t\t\tclassName=\"outline-none ring-0 focus-visible:ring-0 focus-visible:ring-offset-0\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2 text-sm text-muted-foreground pt-3\">\n\t\t\t\t\t\t\t\t\t<p className=\"text-primary text-base font-semibold\">\n\t\t\t\t\t\t\t\t\t\tYou have two options to add SSH Keys to your server:\n\t\t\t\t\t\t\t\t\t</p>\n\n\t\t\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t\t\t1. Add the public SSH Key when you create a server in your\n\t\t\t\t\t\t\t\t\t\t\tpreffered provider (Hostinger, Digital Ocean, Hetzner,\n\t\t\t\t\t\t\t\t\t\t\tetc){\" \"}\n\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t<li>2. Add The SSH Key to Server Manually</li>\n\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-4 w-full overflow-auto\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex relative flex-col gap-2 overflow-y-auto\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"text-sm text-primary flex flex-row gap-2 items-center\">\n\t\t\t\t\t\t\t\t\t\t\t\tCopy Public Key ({server?.sshKey?.name})\n\t\t\t\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"right-2 top-8\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcopy(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tserver?.sshKey?.publicKey || \"Generate a SSH Key\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"SSH Copied to clipboard\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CopyIcon className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2 w-full mt-2 border rounded-lg p-4\">\n\t\t\t\t\t\t\t\t\t\t<span className=\"text-base font-semibold text-primary\">\n\t\t\t\t\t\t\t\t\t\t\tAutomatic process\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\thref=\"https://docs.dokploy.com/docs/core/remote-servers/instructions#requirements\"\n\t\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-primary flex flex-row gap-2\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\tView Tutorial <ExternalLinkIcon className=\"size-4\" />\n\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2 w-full border rounded-lg p-4\">\n\t\t\t\t\t\t\t\t\t\t<span className=\"text-base font-semibold text-primary\">\n\t\t\t\t\t\t\t\t\t\t\tManual process\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t\t\t\t\t<li className=\"items-center flex gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t1. Login to your server{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-primary bg-secondary p-1 rounded-lg\">\n\t\t\t\t\t\t\t\t\t\t\t\t\tssh {server?.username}@{server?.ipAddress}\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcopy(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t`ssh ${server?.username}@${server?.ipAddress}`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Copied to clipboard\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CopyIcon className=\"size-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t\t\t\t2. When you are logged in run the following command\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex  relative flex-col gap-4 w-full mt-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CodeEditor\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlineWrapping\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlanguage=\"properties\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={`echo \"${server?.sshKey?.publicKey}\" >> ~/.ssh/authorized_keys`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treadOnly\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"font-mono opacity-60\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"absolute right-2 top-2\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcopy(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t`echo \"${server?.sshKey?.publicKey}\" >> ~/.ssh/authorized_keys`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Copied to clipboard\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CopyIcon className=\"size-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t\t<li className=\"mt-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t3. You're done, you can test the connection by entering\n\t\t\t\t\t\t\t\t\t\t\t\tto the terminal or by setting up the server tab.\n\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2 w-full border rounded-lg p-4\">\n\t\t\t\t\t\t\t\t\t\t<span className=\"text-base font-semibold text-primary\">\n\t\t\t\t\t\t\t\t\t\t\tSupported Distros:\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\tWe strongly recommend to use the following distros to\n\t\t\t\t\t\t\t\t\t\t\tensure the best experience:\n\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t\t\t\t\t<li>1. Ubuntu 24.04 LTS</li>\n\t\t\t\t\t\t\t\t\t\t\t<li>2. Ubuntu 23.10 LTS </li>\n\t\t\t\t\t\t\t\t\t\t\t<li>3. Ubuntu 22.04 LTS</li>\n\t\t\t\t\t\t\t\t\t\t\t<li>4. Ubuntu 20.04 LTS</li>\n\t\t\t\t\t\t\t\t\t\t\t<li>5. Ubuntu 18.04 LTS</li>\n\t\t\t\t\t\t\t\t\t\t\t<li>6. Debian 12</li>\n\t\t\t\t\t\t\t\t\t\t\t<li>7. Debian 11</li>\n\t\t\t\t\t\t\t\t\t\t\t<li>8. Debian 10</li>\n\t\t\t\t\t\t\t\t\t\t\t<li>9. Fedora 40</li>\n\t\t\t\t\t\t\t\t\t\t\t<li>10. Centos 9</li>\n\t\t\t\t\t\t\t\t\t\t\t<li>11. Centos 8</li>\n\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</TabsContent>\n\t\t\t\t\t\t\t<TabsContent value=\"deployments\">\n\t\t\t\t\t\t\t\t<CardContent className=\"p-0\">\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t\t\t\t\t<Card className=\"bg-background\">\n\t\t\t\t\t\t\t\t\t\t\t<CardHeader className=\"flex flex-row items-center justify-between flex-wrap gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-2 justify-between w-full max-sm:flex-col\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CardTitle className=\"text-xl\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSetup Server\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CardTitle>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tTo setup a server, please click on the button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbelow.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t\t\t\t\t\t<CardContent className=\"flex flex-col gap-4 min-h-[25vh] items-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-4 items-center h-full max-w-xl mx-auto min-h-[25vh] justify-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground text-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tWhen your server is ready, you can click on the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbutton below, to directly run the script we use for\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetup the server or directly modify the script\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<EditScript serverId={server?.serverId || \"\"} />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitle={\"Setup Server?\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"default\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdescription=\"This will setup the server and all associated data\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetIsDeploying(true);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button>Setup Server</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t\t\t<ShowDeployment\n\t\t\t\t\t\t\t\t\t\t\t\t\topen={activeLog !== null}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClose={() => setActiveLog(null)}\n\t\t\t\t\t\t\t\t\t\t\t\t\tlogPath={activeLog}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t\t\t\t\t\t</Card>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t\t\t</TabsContent>\n\t\t\t\t\t\t\t<TabsContent\n\t\t\t\t\t\t\t\tvalue=\"validate\"\n\t\t\t\t\t\t\t\tclassName=\"outline-none ring-0 focus-visible:ring-0 focus-visible:ring-offset-0\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2 text-sm text-muted-foreground pt-3\">\n\t\t\t\t\t\t\t\t\t<ValidateServer serverId={serverId} />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</TabsContent>\n\t\t\t\t\t\t\t{!isBuildServer && (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<TabsContent\n\t\t\t\t\t\t\t\t\t\tvalue=\"audit\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"outline-none ring-0 focus-visible:ring-0 focus-visible:ring-offset-0\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2 text-sm text-muted-foreground pt-3\">\n\t\t\t\t\t\t\t\t\t\t\t<SecurityAudit serverId={serverId} />\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</TabsContent>\n\t\t\t\t\t\t\t\t\t<TabsContent\n\t\t\t\t\t\t\t\t\t\tvalue=\"monitoring\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"outline-none ring-0 focus-visible:ring-0 focus-visible:ring-offset-0\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2 text-sm pt-3\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"rounded-xl bg-background shadow-md border\">\n\t\t\t\t\t\t\t\t\t\t\t\t<SetupMonitoring serverId={serverId} />\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</TabsContent>\n\t\t\t\t\t\t\t\t\t<TabsContent\n\t\t\t\t\t\t\t\t\t\tvalue=\"gpu-setup\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"outline-none ring-0 focus-visible:ring-0 focus-visible:ring-offset-0\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2 text-sm text-muted-foreground pt-3\">\n\t\t\t\t\t\t\t\t\t\t\t<GPUSupport serverId={serverId} />\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</TabsContent>\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</Tabs>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</DialogContent>\n\t\t\t<DrawerLogs\n\t\t\t\tisOpen={isDrawerOpen}\n\t\t\t\tonClose={() => {\n\t\t\t\t\tsetIsDrawerOpen(false);\n\t\t\t\t\tsetFilteredLogs([]);\n\t\t\t\t\tsetIsDeploying(false);\n\t\t\t\t}}\n\t\t\t\tfilteredLogs={filteredLogs}\n\t\t\t/>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/servers/show-docker-containers-modal.tsx",
    "content": "import { useState } from \"react\";\nimport { Dialog, DialogContent, DialogTrigger } from \"@/components/ui/dialog\";\nimport { DropdownMenuItem } from \"@/components/ui/dropdown-menu\";\nimport { ShowContainers } from \"../../docker/show/show-containers\";\n\ninterface Props {\n\tserverId: string;\n}\n\nexport const ShowDockerContainersModal = ({ serverId }: Props) => {\n\tconst [isOpen, setIsOpen] = useState(false);\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t<DropdownMenuItem\n\t\t\t\t\tclassName=\"w-full cursor-pointer \"\n\t\t\t\t\tonSelect={(e) => e.preventDefault()}\n\t\t\t\t>\n\t\t\t\t\tShow Docker Containers\n\t\t\t\t</DropdownMenuItem>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-7xl  \">\n\t\t\t\t<div className=\"grid w-full gap-1\">\n\t\t\t\t\t<ShowContainers serverId={serverId} />\n\t\t\t\t</div>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/servers/show-monitoring-modal.tsx",
    "content": "import { useState } from \"react\";\nimport { Dialog, DialogContent, DialogTrigger } from \"@/components/ui/dialog\";\nimport { DropdownMenuItem } from \"@/components/ui/dropdown-menu\";\nimport { ShowPaidMonitoring } from \"../../monitoring/paid/servers/show-paid-monitoring\";\n\ninterface Props {\n\turl: string;\n\ttoken: string;\n}\n\nexport const ShowMonitoringModal = ({ url, token }: Props) => {\n\tconst [isOpen, setIsOpen] = useState(false);\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t<DropdownMenuItem\n\t\t\t\t\tclassName=\"w-full cursor-pointer \"\n\t\t\t\t\tonSelect={(e) => e.preventDefault()}\n\t\t\t\t>\n\t\t\t\t\tShow Monitoring\n\t\t\t\t</DropdownMenuItem>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-7xl  \">\n\t\t\t\t<div className=\"flex gap-4 py-4 w-full\">\n\t\t\t\t\t<ShowPaidMonitoring BASE_URL={url} token={token} />\n\t\t\t\t</div>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/servers/show-schedules-modal.tsx",
    "content": "import { useState } from \"react\";\nimport { ShowSchedules } from \"@/components/dashboard/application/schedules/show-schedules\";\nimport { Dialog, DialogContent, DialogTrigger } from \"@/components/ui/dialog\";\nimport { DropdownMenuItem } from \"@/components/ui/dropdown-menu\";\n\ninterface Props {\n\tserverId: string;\n}\n\nexport const ShowSchedulesModal = ({ serverId }: Props) => {\n\tconst [isOpen, setIsOpen] = useState(false);\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t<DropdownMenuItem\n\t\t\t\t\tclassName=\"w-full cursor-pointer \"\n\t\t\t\t\tonSelect={(e) => e.preventDefault()}\n\t\t\t\t>\n\t\t\t\t\tShow Schedules\n\t\t\t\t</DropdownMenuItem>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-5xl  \">\n\t\t\t\t<ShowSchedules id={serverId} scheduleType=\"server\" />\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/servers/show-servers.tsx",
    "content": "import { format } from \"date-fns\";\nimport {\n\tClock,\n\tKey,\n\tKeyIcon,\n\tLoader2,\n\tMoreHorizontal,\n\tNetwork,\n\tServerIcon,\n\tTerminal,\n\tTrash2,\n\tUser,\n} from \"lucide-react\";\nimport Link from \"next/link\";\nimport { useRouter } from \"next/router\";\nimport { toast } from \"sonner\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { DialogAction } from \"@/components/shared/dialog-action\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\tDropdownMenu,\n\tDropdownMenuContent,\n\tDropdownMenuLabel,\n\tDropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { api } from \"@/utils/api\";\nimport { ShowNodesModal } from \"../cluster/nodes/show-nodes-modal\";\nimport { TerminalModal } from \"../web-server/terminal-modal\";\nimport { ShowServerActions } from \"./actions/show-server-actions\";\nimport { HandleServers } from \"./handle-servers\";\nimport { SetupServer } from \"./setup-server\";\nimport { ShowDockerContainersModal } from \"./show-docker-containers-modal\";\nimport { ShowMonitoringModal } from \"./show-monitoring-modal\";\nimport { ShowSchedulesModal } from \"./show-schedules-modal\";\nimport { ShowSwarmOverviewModal } from \"./show-swarm-overview-modal\";\nimport { ShowTraefikFileSystemModal } from \"./show-traefik-file-system-modal\";\nimport { WelcomeSuscription } from \"./welcome-stripe/welcome-suscription\";\n\nexport const ShowServers = () => {\n\tconst router = useRouter();\n\tconst query = router.query;\n\tconst { data, refetch, isPending } = api.server.all.useQuery();\n\tconst { mutateAsync } = api.server.remove.useMutation();\n\tconst { data: sshKeys } = api.sshKey.all.useQuery();\n\tconst { data: isCloud } = api.settings.isCloud.useQuery();\n\tconst { data: canCreateMoreServers } =\n\t\tapi.stripe.canCreateMoreServers.useQuery();\n\tconst { data: permissions } = api.user.getPermissions.useQuery();\n\n\treturn (\n\t\t<div className=\"w-full\">\n\t\t\t{query?.success && isCloud && <WelcomeSuscription />}\n\t\t\t<Card className=\"h-full  p-2.5 rounded-xl  max-w-5xl mx-auto\">\n\t\t\t\t<div className=\"rounded-xl bg-background shadow-md \">\n\t\t\t\t\t<CardHeader className=\"\">\n\t\t\t\t\t\t<CardTitle className=\"text-xl flex flex-row gap-2\">\n\t\t\t\t\t\t\t<ServerIcon className=\"size-6 text-muted-foreground self-center\" />\n\t\t\t\t\t\t\tServers\n\t\t\t\t\t\t</CardTitle>\n\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\tAdd servers to deploy your applications remotely.\n\t\t\t\t\t\t</CardDescription>\n\n\t\t\t\t\t\t{isCloud && (\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclassName=\"bg-gradient-to-r cursor-pointer from-blue-600 via-green-500 to-indigo-400 inline-block text-transparent bg-clip-text text-sm\"\n\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\trouter.push(\"/dashboard/settings/servers?success=true\");\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tReset Onboarding\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<CardContent className=\"space-y-2 py-8 border-t\">\n\t\t\t\t\t\t{isPending ? (\n\t\t\t\t\t\t\t<div className=\"flex flex-row gap-2 items-center justify-center text-sm text-muted-foreground min-h-[25vh]\">\n\t\t\t\t\t\t\t\t<span>Loading...</span>\n\t\t\t\t\t\t\t\t<Loader2 className=\"animate-spin size-4\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{sshKeys?.length === 0 && data?.length === 0 ? (\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col items-center gap-3 min-h-[25vh] justify-center\">\n\t\t\t\t\t\t\t\t\t\t<KeyIcon className=\"size-8\" />\n\t\t\t\t\t\t\t\t\t\t<span className=\"text-base text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\tNo SSH Keys found. Add a SSH Key to start adding servers.{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\thref=\"/dashboard/settings/ssh-keys\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-primary\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\tAdd SSH Key\n\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t{data?.length === 0 ? (\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col items-center gap-3  min-h-[25vh] justify-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t<ServerIcon className=\"size-8 self-center text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-base text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\tStart adding servers to deploy your applications\n\t\t\t\t\t\t\t\t\t\t\t\t\tremotely.\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t{permissions?.server.create && <HandleServers />}\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-4 min-h-[25vh]\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{data?.map((server) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst canDelete = server.totalSum === 0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst isActive = server.serverStatus === \"active\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst isBuildServer = server.serverType === \"build\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Card\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={server.serverId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"relative hover:shadow-lg transition-shadow flex flex-col bg-transparent\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CardHeader className=\"pb-3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-start justify-between\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ServerIcon className=\"size-5 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CardTitle className=\"text-lg\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{server.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CardTitle>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{isActive &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tserver.sshKeyId &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t!isBuildServer && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DropdownMenu>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DropdownMenuTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-8 w-8 p-0\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"sr-only\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMore options\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<MoreHorizontal className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DropdownMenuTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DropdownMenuContent align=\"end\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DropdownMenuLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAdvanced\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DropdownMenuLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ShowTraefikFileSystemModal\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tserverId={server.serverId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ShowDockerContainersModal\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tserverId={server.serverId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{isCloud && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ShowMonitoringModal\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\turl={`http://${server.ipAddress}:${server?.metricsConfig?.server?.port}/metrics`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoken={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tserver?.metricsConfig?.server\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t?.token\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ShowSwarmOverviewModal\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tserverId={server.serverId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ShowNodesModal\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tserverId={server.serverId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ShowSchedulesModal\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tserverId={server.serverId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DropdownMenuContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DropdownMenu>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex gap-2 mt-2 flex-wrap\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{isCloud && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{server.serverStatus === \"active\" ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Badge variant=\"default\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{server.serverStatus}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Tooltip delayDuration={0}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"inline-block\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"destructive\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"cursor-help\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{server.serverStatus}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"max-w-xs\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tside=\"bottom\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tThis server is deactivated due\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tto lack of payment. Please pay\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tyour invoice to reactivate it.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tIf you think this is an error,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplease contact support.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisBuildServer\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"default\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{server.serverType}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CardContent className=\"space-y-3 flex-1 flex flex-col\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2 text-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Network className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tIP:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Badge variant=\"outline\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{server.ipAddress}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tPort:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-medium\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{server.port}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2 text-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<User className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tUser:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-medium\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{server.username}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2 text-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Key className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSSH Key:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-medium\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{server.sshKeyId ? \"Yes\" : \"No\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2 text-sm pt-2 border-t\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Clock className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-xs text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCreated{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{format(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew Date(server.createdAt),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"PPp\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{/* Compact Actions */}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{isActive && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center  gap-2 pt-3 border-t mt-auto flex-wrap\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2 w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SetupServer\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tserverId={server.serverId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"max-w-xs\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tside=\"bottom\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"font-semibold\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSetup Server\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-xs text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tConfigure and initialize your\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tserver with Docker, Traefik, and\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tother essential services\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{server.sshKeyId && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TerminalModal\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tserverId={server.serverId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tasButton={true}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-9 w-9\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Terminal className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TerminalModal>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>Terminal</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<HandleServers\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tserverId={server.serverId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tasButton={true}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>Edit Server</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{server.sshKeyId && !isBuildServer && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ShowServerActions\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tserverId={server.serverId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tasButton={true}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>Web Server Actions</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex-1\" />\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{permissions?.server.delete && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisabled={!canDelete}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitle={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcanDelete\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Delete Server\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Server has active services\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcanDelete ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"This will delete the server and all associated data\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tYou can not delete this\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tserver because it has\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tactive services.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<AlertBlock type=\"warning\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tYou have active\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tservices associated\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twith this server,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplease delete them\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfirst.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait mutateAsync({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tserverId: server.serverId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t`Server ${server.name} deleted successfully`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.catch((err) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\terr.message,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={`h-9 w-9 ${canDelete ? \"text-destructive hover:text-destructive hover:bg-destructive/10\" : \"text-muted-foreground hover:bg-muted\"}`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Trash2 className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{canDelete\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Delete Server\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Cannot delete - has active services\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Card>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t\t\t{permissions?.server.create && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-2 flex-wrap w-full justify-end mt-4\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{data && data?.length > 0 && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<HandleServers />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</CardContent>\n\t\t\t\t</div>\n\t\t\t</Card>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/servers/show-swarm-overview-modal.tsx",
    "content": "import { useState } from \"react\";\nimport { Dialog, DialogContent, DialogTrigger } from \"@/components/ui/dialog\";\nimport { DropdownMenuItem } from \"@/components/ui/dropdown-menu\";\nimport SwarmMonitorCard from \"../../swarm/monitoring-card\";\n\ninterface Props {\n\tserverId: string;\n}\n\nexport const ShowSwarmOverviewModal = ({ serverId }: Props) => {\n\tconst [isOpen, setIsOpen] = useState(false);\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t<DropdownMenuItem\n\t\t\t\t\tclassName=\"w-full cursor-pointer \"\n\t\t\t\t\tonSelect={(e) => e.preventDefault()}\n\t\t\t\t>\n\t\t\t\t\tShow Swarm Overview\n\t\t\t\t</DropdownMenuItem>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-7xl  \">\n\t\t\t\t<div className=\"grid w-full gap-1\">\n\t\t\t\t\t<SwarmMonitorCard serverId={serverId} />\n\t\t\t\t</div>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/servers/show-traefik-file-system-modal.tsx",
    "content": "import { useState } from \"react\";\nimport { Dialog, DialogContent, DialogTrigger } from \"@/components/ui/dialog\";\nimport { DropdownMenuItem } from \"@/components/ui/dropdown-menu\";\nimport { ShowTraefikSystem } from \"../../file-system/show-traefik-system\";\n\ninterface Props {\n\tserverId: string;\n}\n\nexport const ShowTraefikFileSystemModal = ({ serverId }: Props) => {\n\tconst [isOpen, setIsOpen] = useState(false);\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t<DropdownMenuItem\n\t\t\t\t\tclassName=\"w-full cursor-pointer \"\n\t\t\t\t\tonSelect={(e) => e.preventDefault()}\n\t\t\t\t>\n\t\t\t\t\tShow Traefik File System\n\t\t\t\t</DropdownMenuItem>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-7xl  \">\n\t\t\t\t<ShowTraefikSystem serverId={serverId} />\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/servers/validate-server.tsx",
    "content": "import { Loader2, PcCase, RefreshCw } from \"lucide-react\";\nimport { useState } from \"react\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport { api } from \"@/utils/api\";\nimport { StatusRow } from \"./gpu-support\";\n\ninterface Props {\n\tserverId: string;\n}\n\nexport const ValidateServer = ({ serverId }: Props) => {\n\tconst [isRefreshing, setIsRefreshing] = useState(false);\n\tconst { data, refetch, error, isPending, isError } =\n\t\tapi.server.validate.useQuery(\n\t\t\t{ serverId },\n\t\t\t{\n\t\t\t\tenabled: !!serverId,\n\t\t\t},\n\t\t);\n\tconst { data: server } = api.server.one.useQuery(\n\t\t{ serverId },\n\t\t{\n\t\t\tenabled: !!serverId,\n\t\t},\n\t);\n\tconst isBuildServer = server?.serverType === \"build\";\n\tconst _utils = api.useUtils();\n\treturn (\n\t\t<CardContent className=\"p-0\">\n\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t<Card className=\"bg-background\">\n\t\t\t\t\t<CardHeader className=\"flex flex-row items-center justify-between flex-wrap gap-2\">\n\t\t\t\t\t\t<div className=\"flex flex-row gap-2 justify-between w-full  max-sm:flex-col\">\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t<PcCase className=\"size-5\" />\n\t\t\t\t\t\t\t\t\t<CardTitle className=\"text-xl\">Setup Validation</CardTitle>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\t\t\tCheck if your server is ready for deployment\n\t\t\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tisLoading={isRefreshing}\n\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\tsetIsRefreshing(true);\n\t\t\t\t\t\t\t\t\tawait refetch();\n\t\t\t\t\t\t\t\t\tsetIsRefreshing(false);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<RefreshCw className=\"size-4\" />\n\t\t\t\t\t\t\t\tRefresh\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"flex items-center gap-2 w-full\">\n\t\t\t\t\t\t\t{isError && (\n\t\t\t\t\t\t\t\t<AlertBlock type=\"error\" className=\"w-full\">\n\t\t\t\t\t\t\t\t\t{error.message}\n\t\t\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</CardHeader>\n\n\t\t\t\t\t<CardContent className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t{isPending ? (\n\t\t\t\t\t\t\t<div className=\"flex items-center justify-center text-muted-foreground py-4\">\n\t\t\t\t\t\t\t\t<Loader2 className=\"mr-2 h-4 w-4 animate-spin\" />\n\t\t\t\t\t\t\t\t<span>Checking Server configuration</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<div className=\"grid w-full gap-4\">\n\t\t\t\t\t\t\t\t<div className=\"border rounded-lg p-4\">\n\t\t\t\t\t\t\t\t\t<h3 className=\"text-lg font-semibold mb-1\">Status</h3>\n\t\t\t\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground mb-4\">\n\t\t\t\t\t\t\t\t\t\t{isBuildServer\n\t\t\t\t\t\t\t\t\t\t\t? \"Shows the build server configuration status\"\n\t\t\t\t\t\t\t\t\t\t\t: \"Shows the server configuration status\"}\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t<div className=\"grid gap-2.5\">\n\t\t\t\t\t\t\t\t\t\t<StatusRow\n\t\t\t\t\t\t\t\t\t\t\tlabel=\"Docker Installed\"\n\t\t\t\t\t\t\t\t\t\t\tisEnabled={data?.docker?.enabled}\n\t\t\t\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\t\t\t\tdata?.docker?.enabled\n\t\t\t\t\t\t\t\t\t\t\t\t\t? `Installed: ${data?.docker?.version}`\n\t\t\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t{!isBuildServer && (\n\t\t\t\t\t\t\t\t\t\t\t<StatusRow\n\t\t\t\t\t\t\t\t\t\t\t\tlabel=\"RClone Installed\"\n\t\t\t\t\t\t\t\t\t\t\t\tisEnabled={data?.rclone?.enabled}\n\t\t\t\t\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\t\t\t\t\tdata?.rclone?.enabled\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? `Installed: ${data?.rclone?.version}`\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t<StatusRow\n\t\t\t\t\t\t\t\t\t\t\tlabel=\"Nixpacks Installed\"\n\t\t\t\t\t\t\t\t\t\t\tisEnabled={data?.nixpacks?.enabled}\n\t\t\t\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\t\t\t\tdata?.nixpacks?.enabled\n\t\t\t\t\t\t\t\t\t\t\t\t\t? `Installed: ${data?.nixpacks?.version}`\n\t\t\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<StatusRow\n\t\t\t\t\t\t\t\t\t\t\tlabel=\"Buildpacks Installed\"\n\t\t\t\t\t\t\t\t\t\t\tisEnabled={data?.buildpacks?.enabled}\n\t\t\t\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\t\t\t\tdata?.buildpacks?.enabled\n\t\t\t\t\t\t\t\t\t\t\t\t\t? `Installed: ${data?.buildpacks?.version}`\n\t\t\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<StatusRow\n\t\t\t\t\t\t\t\t\t\t\tlabel=\"Railpack Installed\"\n\t\t\t\t\t\t\t\t\t\t\tisEnabled={data?.railpack?.enabled}\n\t\t\t\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\t\t\t\tdata?.railpack?.enabled\n\t\t\t\t\t\t\t\t\t\t\t\t\t? `Installed: ${data?.railpack?.version}`\n\t\t\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t{!isBuildServer && (\n\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t<StatusRow\n\t\t\t\t\t\t\t\t\t\t\t\t\tlabel=\"Docker Swarm Initialized\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tisEnabled={data?.isSwarmInstalled}\n\t\t\t\t\t\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdata?.isSwarmInstalled\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Initialized\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Not Initialized\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t<StatusRow\n\t\t\t\t\t\t\t\t\t\t\t\t\tlabel=\"Dokploy Network Created\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tisEnabled={data?.isDokployNetworkInstalled}\n\t\t\t\t\t\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdata?.isDokployNetworkInstalled\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Created\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Not Created\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t<StatusRow\n\t\t\t\t\t\t\t\t\t\t\tlabel=\"Main Directory Created\"\n\t\t\t\t\t\t\t\t\t\t\tisEnabled={data?.isMainDirectoryInstalled}\n\t\t\t\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\t\t\t\tdata?.isMainDirectoryInstalled\n\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Created\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Not Created\"\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</CardContent>\n\t\t\t\t</Card>\n\t\t\t</div>\n\t\t</CardContent>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/servers/welcome-stripe/create-server.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport Link from \"next/link\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport { Card, CardContent } from \"@/components/ui/card\";\nimport { DialogFooter } from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectGroup,\n\tSelectItem,\n\tSelectLabel,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { Textarea } from \"@/components/ui/textarea\";\nimport { api } from \"@/utils/api\";\n\nconst Schema = z.object({\n\tname: z.string().min(1, {\n\t\tmessage: \"Name is required\",\n\t}),\n\tdescription: z.string().optional(),\n\tipAddress: z.string().min(1, {\n\t\tmessage: \"IP Address is required\",\n\t}),\n\tport: z.number().optional(),\n\tusername: z.string().optional(),\n\tsshKeyId: z.string().min(1, {\n\t\tmessage: \"SSH Key is required\",\n\t}),\n});\n\ntype Schema = z.infer<typeof Schema>;\n\ninterface Props {\n\tstepper: any;\n}\n\nexport const CreateServer = ({ stepper }: Props) => {\n\tconst { data: sshKeys } = api.sshKey.all.useQuery();\n\tconst [isOpen, _setIsOpen] = useState(false);\n\tconst { data: canCreateMoreServers, refetch } =\n\t\tapi.stripe.canCreateMoreServers.useQuery();\n\tconst { mutateAsync } = api.server.create.useMutation();\n\tconst cloudSSHKey = sshKeys?.find(\n\t\t(sshKey) => sshKey.name === \"dokploy-cloud-ssh-key\",\n\t);\n\n\tconst form = useForm<Schema>({\n\t\tdefaultValues: {\n\t\t\tdescription: \"Dokploy Cloud Server\",\n\t\t\tname: \"My First Server\",\n\t\t\tipAddress: \"\",\n\t\t\tport: 22,\n\t\t\tusername: \"root\",\n\t\t\tsshKeyId: cloudSSHKey?.sshKeyId || \"\",\n\t\t},\n\t\tresolver: zodResolver(Schema),\n\t});\n\n\tuseEffect(() => {\n\t\tform.reset({\n\t\t\tdescription: \"Dokploy Cloud Server\",\n\t\t\tname: \"My First Server\",\n\t\t\tipAddress: \"\",\n\t\t\tport: 22,\n\t\t\tusername: \"root\",\n\t\t\tsshKeyId: cloudSSHKey?.sshKeyId || \"\",\n\t\t});\n\t}, [form, form.reset, form.formState.isSubmitSuccessful, sshKeys]);\n\n\tuseEffect(() => {\n\t\trefetch();\n\t}, [isOpen]);\n\n\tconst onSubmit = async (data: Schema) => {\n\t\tawait mutateAsync({\n\t\t\tname: data.name,\n\t\t\tdescription: data.description || \"\",\n\t\t\tipAddress: data.ipAddress?.trim() || \"\",\n\t\t\tport: data.port || 22,\n\t\t\tusername: data.username || \"root\",\n\t\t\tsshKeyId: data.sshKeyId || \"\",\n\t\t\tserverType: \"deploy\",\n\t\t})\n\t\t\t.then(async (_data) => {\n\t\t\t\ttoast.success(\"Server Created\");\n\t\t\t\tstepper.next();\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error creating a server\");\n\t\t\t});\n\t};\n\treturn (\n\t\t<Card className=\"bg-background flex flex-col gap-4\">\n\t\t\t<div className=\"flex flex-col gap-2 pt-5 px-4\">\n\t\t\t\t{!canCreateMoreServers && (\n\t\t\t\t\t<AlertBlock type=\"warning\" className=\"mt-2\">\n\t\t\t\t\t\tYou cannot create more servers,{\" \"}\n\t\t\t\t\t\t<Link href=\"/dashboard/settings/billing\" className=\"text-primary\">\n\t\t\t\t\t\t\tPlease upgrade your plan\n\t\t\t\t\t\t</Link>\n\t\t\t\t\t</AlertBlock>\n\t\t\t\t)}\n\t\t\t</div>\n\n\t\t\t<CardContent className=\"flex flex-col\">\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tid=\"hook-form-add-server\"\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\tclassName=\"grid w-full gap-4\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"flex flex-col gap-4 \">\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"name\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Name</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"Hostinger Server\" {...field} />\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"description\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Description</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Textarea\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"This server is for databases...\"\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"resize-none\"\n\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"sshKeyId\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Select a SSH Key</FormLabel>\n\t\t\t\t\t\t\t\t\t{!cloudSSHKey && (\n\t\t\t\t\t\t\t\t\t\t<AlertBlock>\n\t\t\t\t\t\t\t\t\t\t\tLooks like you didn't have the SSH Key yet, you can create\n\t\t\t\t\t\t\t\t\t\t\tone{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\thref=\"/dashboard/settings/ssh-keys\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-primary\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\there\n\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\tonValueChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\tdefaultValue={field.value}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a SSH Key\" />\n\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t<SelectGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t{sshKeys?.map((sshKey) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={sshKey.sshKeyId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={sshKey.sshKeyId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{sshKey.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\tRegistries ({sshKeys?.length})\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectLabel>\n\t\t\t\t\t\t\t\t\t\t\t</SelectGroup>\n\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<div className=\"grid grid-cols-2 gap-4\">\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"ipAddress\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>IP Address</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"192.168.1.100\" {...field} />\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"port\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Port</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"22\"\n\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst value = e.target.value;\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (value === \"\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst number = Number.parseInt(value, 10);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!Number.isNaN(number)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(number);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"username\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Username</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"root\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</form>\n\n\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tisLoading={form.formState.isSubmitting}\n\t\t\t\t\t\t\tdisabled={!canCreateMoreServers}\n\t\t\t\t\t\t\tform=\"hook-form-add-server\"\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tCreate\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</DialogFooter>\n\t\t\t\t</Form>\n\t\t\t</CardContent>\n\t\t</Card>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/servers/welcome-stripe/create-ssh-key.tsx",
    "content": "import copy from \"copy-to-clipboard\";\nimport { CopyIcon, ExternalLinkIcon, Loader2 } from \"lucide-react\";\nimport Link from \"next/link\";\nimport { useEffect, useRef, useState } from \"react\";\nimport { toast } from \"sonner\";\nimport { CodeEditor } from \"@/components/shared/code-editor\";\nimport { Card, CardContent } from \"@/components/ui/card\";\nimport { Label } from \"@/components/ui/label\";\nimport { RadioGroup, RadioGroupItem } from \"@/components/ui/radio-group\";\nimport { api } from \"@/utils/api\";\n\nexport const CreateSSHKey = () => {\n\tconst { data, refetch } = api.sshKey.all.useQuery();\n\tconst generateMutation = api.sshKey.generate.useMutation();\n\tconst { mutateAsync, isPending } = api.sshKey.create.useMutation();\n\tconst hasCreatedKey = useRef(false);\n\tconst [selectedOption, setSelectedOption] = useState<\"manual\" | \"provider\">(\n\t\t\"manual\",\n\t);\n\n\tconst cloudSSHKey = data?.find(\n\t\t(sshKey) => sshKey.name === \"dokploy-cloud-ssh-key\",\n\t);\n\n\tuseEffect(() => {\n\t\tconst createKey = async () => {\n\t\t\tif (!data || cloudSSHKey || hasCreatedKey.current || isPending) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\thasCreatedKey.current = true;\n\n\t\t\ttry {\n\t\t\t\tconst keys = await generateMutation.mutateAsync({\n\t\t\t\t\ttype: \"rsa\",\n\t\t\t\t});\n\t\t\t\tawait mutateAsync({\n\t\t\t\t\tname: \"dokploy-cloud-ssh-key\",\n\t\t\t\t\tdescription: \"Used on Dokploy Cloud\",\n\t\t\t\t\tprivateKey: keys.privateKey,\n\t\t\t\t\tpublicKey: keys.publicKey,\n\t\t\t\t\torganizationId: \"\",\n\t\t\t\t});\n\t\t\t\tawait refetch();\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(\"Error creating SSH key:\", error);\n\t\t\t\thasCreatedKey.current = false;\n\t\t\t}\n\t\t};\n\n\t\tcreateKey();\n\t}, [data]);\n\n\treturn (\n\t\t<Card className=\"h-full bg-transparent\">\n\t\t\t<CardContent>\n\t\t\t\t<div className=\"grid w-full gap-4 pt-4\">\n\t\t\t\t\t{isPending || !cloudSSHKey ? (\n\t\t\t\t\t\t<div className=\"min-h-[25vh] justify-center flex items-center gap-4\">\n\t\t\t\t\t\t\t<Loader2\n\t\t\t\t\t\t\t\tclassName=\"animate-spin text-muted-foreground\"\n\t\t\t\t\t\t\t\tsize={32}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-4 text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t<p className=\"text-primary text-base font-semibold\">\n\t\t\t\t\t\t\t\t\tChoose how to add SSH Keys to your server:\n\t\t\t\t\t\t\t\t</p>\n\n\t\t\t\t\t\t\t\t{/* Radio button options */}\n\t\t\t\t\t\t\t\t<div className=\"grid gap-2\">\n\t\t\t\t\t\t\t\t\t<RadioGroup\n\t\t\t\t\t\t\t\t\t\tvalue={selectedOption}\n\t\t\t\t\t\t\t\t\t\tonValueChange={(value) => {\n\t\t\t\t\t\t\t\t\t\t\tsetSelectedOption(value as \"manual\" | \"provider\");\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tclassName=\"grid gap-3\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center space-x-2\">\n\t\t\t\t\t\t\t\t\t\t\t<RadioGroupItem value=\"manual\" id=\"manual\" />\n\t\t\t\t\t\t\t\t\t\t\t<Label\n\t\t\t\t\t\t\t\t\t\t\t\thtmlFor=\"manual\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-primary font-medium cursor-pointer\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\tAdd SSH Key to Server Manually\n\t\t\t\t\t\t\t\t\t\t\t</Label>\n\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center space-x-2\">\n\t\t\t\t\t\t\t\t\t\t\t<RadioGroupItem value=\"provider\" id=\"provider\" />\n\t\t\t\t\t\t\t\t\t\t\t<Label\n\t\t\t\t\t\t\t\t\t\t\t\thtmlFor=\"provider\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-primary font-medium cursor-pointer\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\tAdd SSH Key when creating server in your provider\n\t\t\t\t\t\t\t\t\t\t\t</Label>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</RadioGroup>\n\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t{/* Content based on selected option */}\n\t\t\t\t\t\t\t\t{selectedOption === \"manual\" && (\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2 w-full border rounded-lg p-4\">\n\t\t\t\t\t\t\t\t\t\t<span className=\"text-base font-semibold text-primary\">\n\t\t\t\t\t\t\t\t\t\t\tManual Setup Instructions\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t<ul className=\"space-y-2\">\n\t\t\t\t\t\t\t\t\t\t\t<li className=\"items-center flex gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t1. Login to your server\n\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t\t\t\t2. When you are logged in run the following command\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex relative flex-col gap-4 w-full mt-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CodeEditor\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlineWrapping\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlanguage=\"properties\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={`echo \"${cloudSSHKey?.publicKey}\" >> ~/.ssh/authorized_keys`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treadOnly\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"font-mono opacity-60\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"absolute right-2 top-2\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcopy(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t`echo \"${cloudSSHKey?.publicKey}\" >> ~/.ssh/authorized_keys`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Copied to clipboard\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CopyIcon className=\"size-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t\t<li className=\"mt-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t3. You're done, follow the next step to insert the\n\t\t\t\t\t\t\t\t\t\t\t\tdetails of your server.\n\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{selectedOption === \"provider\" && (\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2 w-full border rounded-lg p-4\">\n\t\t\t\t\t\t\t\t\t\t<span className=\"text-base font-semibold text-primary\">\n\t\t\t\t\t\t\t\t\t\t\tProvider Setup Instructions\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-4 w-full overflow-auto\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex relative flex-col gap-2 overflow-y-auto\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"text-sm text-primary flex flex-row gap-2 items-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\tCopy Public Key\n\t\t\t\t\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"right-2 top-8\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcopy(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcloudSSHKey?.publicKey || \"Generate a SSH Key\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"SSH Copied to clipboard\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CopyIcon className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<p className=\"text-sm mt-2\">\n\t\t\t\t\t\t\t\t\t\t\tUse this public key when creating a server in your\n\t\t\t\t\t\t\t\t\t\t\tpreferred provider (Hostinger, Digital Ocean, Hetzner,\n\t\t\t\t\t\t\t\t\t\t\tetc.)\n\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\thref=\"https://docs.dokploy.com/docs/core/remote-servers/instructions#requirements\"\n\t\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-primary flex flex-row gap-2 mt-2\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\tView Tutorial <ExternalLinkIcon className=\"size-4\" />\n\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</CardContent>\n\t\t</Card>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/servers/welcome-stripe/setup.tsx",
    "content": "import { useState } from \"react\";\nimport {\n\ttype LogLine,\n\tparseLogs,\n} from \"@/components/dashboard/docker/logs/utils\";\nimport { DialogAction } from \"@/components/shared/dialog-action\";\nimport { DrawerLogs } from \"@/components/shared/drawer-logs\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport { Label } from \"@/components/ui/label\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectGroup,\n\tSelectItem,\n\tSelectLabel,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { api } from \"@/utils/api\";\nimport { EditScript } from \"../edit-script\";\n\nexport const Setup = () => {\n\tconst { data: servers } = api.server.all.useQuery();\n\tconst [serverId, setServerId] = useState<string>(\n\t\tservers?.[0]?.serverId || \"\",\n\t);\n\tconst { data: server } = api.server.one.useQuery(\n\t\t{\n\t\t\tserverId,\n\t\t},\n\t\t{\n\t\t\tenabled: !!serverId,\n\t\t},\n\t);\n\n\tconst [isDrawerOpen, setIsDrawerOpen] = useState(false);\n\tconst [filteredLogs, setFilteredLogs] = useState<LogLine[]>([]);\n\tconst [isDeploying, setIsDeploying] = useState(false);\n\tapi.server.setupWithLogs.useSubscription(\n\t\t{\n\t\t\tserverId: serverId,\n\t\t},\n\t\t{\n\t\t\tenabled: isDeploying,\n\t\t\tonData(log) {\n\t\t\t\tif (!isDrawerOpen) {\n\t\t\t\t\tsetIsDrawerOpen(true);\n\t\t\t\t}\n\n\t\t\t\tif (log === \"Deployment completed successfully!\") {\n\t\t\t\t\tsetIsDeploying(false);\n\t\t\t\t}\n\t\t\t\tconst parsedLogs = parseLogs(log);\n\t\t\t\tsetFilteredLogs((prev) => [...prev, ...parsedLogs]);\n\t\t\t},\n\t\t\tonError(error) {\n\t\t\t\tconsole.error(\"Deployment logs error:\", error);\n\t\t\t\tsetIsDeploying(false);\n\t\t\t},\n\t\t},\n\t);\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<Card className=\"bg-background\">\n\t\t\t\t<CardHeader className=\"flex flex-row items-center justify-between flex-wrap gap-2\">\n\t\t\t\t\t<div className=\"flex flex-col gap-2 w-full\">\n\t\t\t\t\t\t<Label>Select the server and click on setup server</Label>\n\t\t\t\t\t\t<Select onValueChange={setServerId} defaultValue={serverId}>\n\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a server\" />\n\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t<SelectGroup>\n\t\t\t\t\t\t\t\t\t{servers?.map((server) => (\n\t\t\t\t\t\t\t\t\t\t<SelectItem key={server.serverId} value={server.serverId}>\n\t\t\t\t\t\t\t\t\t\t\t{server.name}\n\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t<SelectLabel>Servers ({servers?.length})</SelectLabel>\n\t\t\t\t\t\t\t\t</SelectGroup>\n\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t</Select>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"flex flex-row gap-2 justify-between w-full max-sm:flex-col\">\n\t\t\t\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t\t\t\t<CardTitle className=\"text-xl\">Setup Server</CardTitle>\n\t\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\t\tTo setup a server, please click on the button below.\n\t\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</CardHeader>\n\t\t\t\t<CardContent className=\"flex flex-col gap-4 min-h-[25vh] items-center\">\n\t\t\t\t\t<div className=\"flex flex-col gap-4 items-center h-full max-w-xl mx-auto min-h-[25vh] justify-center\">\n\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground text-center\">\n\t\t\t\t\t\t\tWhen your server is ready, you can click on the button below, to\n\t\t\t\t\t\t\tdirectly run the script we use for setup the server or directly\n\t\t\t\t\t\t\tmodify the script\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<div className=\"flex flex-row gap-2\">\n\t\t\t\t\t\t\t<EditScript serverId={server?.serverId || \"\"} />\n\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\ttitle={\"Setup Server?\"}\n\t\t\t\t\t\t\t\ttype=\"default\"\n\t\t\t\t\t\t\t\tdescription=\"This will setup the server and all associated data\"\n\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\tsetIsDeploying(true);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Button>Setup Server</Button>\n\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<DrawerLogs\n\t\t\t\t\t\tisOpen={isDrawerOpen}\n\t\t\t\t\t\tonClose={() => {\n\t\t\t\t\t\t\tsetIsDrawerOpen(false);\n\t\t\t\t\t\t\tsetFilteredLogs([]);\n\t\t\t\t\t\t\tsetIsDeploying(false);\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tfilteredLogs={filteredLogs}\n\t\t\t\t\t/>\n\t\t\t\t</CardContent>\n\t\t\t</Card>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/servers/welcome-stripe/verify.tsx",
    "content": "import { Loader2, PcCase, RefreshCw } from \"lucide-react\";\nimport { useState } from \"react\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport { Label } from \"@/components/ui/label\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectGroup,\n\tSelectItem,\n\tSelectLabel,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { api } from \"@/utils/api\";\nimport { StatusRow } from \"../gpu-support\";\n\nexport const Verify = () => {\n\tconst { data: servers } = api.server.all.useQuery();\n\tconst [serverId, setServerId] = useState<string>(\n\t\tservers?.[0]?.serverId || \"\",\n\t);\n\tconst { data, refetch, error, isPending, isError } =\n\t\tapi.server.validate.useQuery(\n\t\t\t{ serverId },\n\t\t\t{\n\t\t\t\tenabled: !!serverId,\n\t\t\t},\n\t\t);\n\tconst [isRefreshing, setIsRefreshing] = useState(false);\n\n\treturn (\n\t\t<CardContent className=\"p-0\">\n\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t<Card className=\"bg-background\">\n\t\t\t\t\t<CardHeader className=\"flex flex-row items-center justify-between flex-wrap gap-2\">\n\t\t\t\t\t\t<div className=\"flex flex-col gap-2 w-full\">\n\t\t\t\t\t\t\t<Label>Select a server</Label>\n\t\t\t\t\t\t\t<Select onValueChange={setServerId} defaultValue={serverId}>\n\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a server\" />\n\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t<SelectGroup>\n\t\t\t\t\t\t\t\t\t\t{servers?.map((server) => (\n\t\t\t\t\t\t\t\t\t\t\t<SelectItem key={server.serverId} value={server.serverId}>\n\t\t\t\t\t\t\t\t\t\t\t\t{server.name}\n\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t<SelectLabel>Servers ({servers?.length})</SelectLabel>\n\t\t\t\t\t\t\t\t\t</SelectGroup>\n\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"flex flex-row gap-2 justify-between w-full  max-sm:flex-col\">\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t<PcCase className=\"size-5\" />\n\t\t\t\t\t\t\t\t\t<CardTitle className=\"text-xl\">Setup Validation</CardTitle>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\t\t\tCheck if your server is ready for deployment\n\t\t\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tisLoading={isRefreshing}\n\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\tsetIsRefreshing(true);\n\t\t\t\t\t\t\t\t\tawait refetch();\n\t\t\t\t\t\t\t\t\tsetIsRefreshing(false);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<RefreshCw className=\"size-4\" />\n\t\t\t\t\t\t\t\tRefresh\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"flex items-center gap-2 w-full\">\n\t\t\t\t\t\t\t{isError && (\n\t\t\t\t\t\t\t\t<AlertBlock type=\"error\" className=\"w-full\">\n\t\t\t\t\t\t\t\t\t{error.message}\n\t\t\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</CardHeader>\n\n\t\t\t\t\t<CardContent className=\"flex flex-col gap-4 min-h-[25vh]\">\n\t\t\t\t\t\t{isPending ? (\n\t\t\t\t\t\t\t<div className=\"flex items-center justify-center text-muted-foreground py-4\">\n\t\t\t\t\t\t\t\t<Loader2 className=\"mr-2 h-4 w-4 animate-spin\" />\n\t\t\t\t\t\t\t\t<span>Checking Server configuration</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<div className=\"grid w-full gap-4\">\n\t\t\t\t\t\t\t\t<div className=\"border rounded-lg p-4\">\n\t\t\t\t\t\t\t\t\t<h3 className=\"text-lg font-semibold mb-1\">Status</h3>\n\t\t\t\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground mb-4\">\n\t\t\t\t\t\t\t\t\t\tShows the server configuration status\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t<div className=\"grid gap-2.5\">\n\t\t\t\t\t\t\t\t\t\t<StatusRow\n\t\t\t\t\t\t\t\t\t\t\tlabel=\"Docker Installed\"\n\t\t\t\t\t\t\t\t\t\t\tisEnabled={data?.docker?.enabled}\n\t\t\t\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\t\t\t\tdata?.docker?.enabled\n\t\t\t\t\t\t\t\t\t\t\t\t\t? `Installed: ${data?.docker?.version}`\n\t\t\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<StatusRow\n\t\t\t\t\t\t\t\t\t\t\tlabel=\"RClone Installed\"\n\t\t\t\t\t\t\t\t\t\t\tisEnabled={data?.rclone?.enabled}\n\t\t\t\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\t\t\t\tdata?.rclone?.enabled\n\t\t\t\t\t\t\t\t\t\t\t\t\t? `Installed: ${data?.rclone?.version}`\n\t\t\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<StatusRow\n\t\t\t\t\t\t\t\t\t\t\tlabel=\"Nixpacks Installed\"\n\t\t\t\t\t\t\t\t\t\t\tisEnabled={data?.nixpacks?.enabled}\n\t\t\t\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\t\t\t\tdata?.nixpacks?.enabled\n\t\t\t\t\t\t\t\t\t\t\t\t\t? `Installed: ${data?.nixpacks?.version}`\n\t\t\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<StatusRow\n\t\t\t\t\t\t\t\t\t\t\tlabel=\"Buildpacks Installed\"\n\t\t\t\t\t\t\t\t\t\t\tisEnabled={data?.buildpacks?.enabled}\n\t\t\t\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\t\t\t\tdata?.buildpacks?.enabled\n\t\t\t\t\t\t\t\t\t\t\t\t\t? `Installed: ${data?.buildpacks?.version}`\n\t\t\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<StatusRow\n\t\t\t\t\t\t\t\t\t\t\tlabel=\"Docker Swarm Initialized\"\n\t\t\t\t\t\t\t\t\t\t\tisEnabled={data?.isSwarmInstalled}\n\t\t\t\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\t\t\t\tdata?.isSwarmInstalled\n\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Initialized\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Not Initialized\"\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<StatusRow\n\t\t\t\t\t\t\t\t\t\t\tlabel=\"Dokploy Network Created\"\n\t\t\t\t\t\t\t\t\t\t\tisEnabled={data?.isDokployNetworkInstalled}\n\t\t\t\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\t\t\t\tdata?.isDokployNetworkInstalled\n\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Created\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Not Created\"\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<StatusRow\n\t\t\t\t\t\t\t\t\t\t\tlabel=\"Main Directory Created\"\n\t\t\t\t\t\t\t\t\t\t\tisEnabled={data?.isMainDirectoryInstalled}\n\t\t\t\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\t\t\t\tdata?.isMainDirectoryInstalled\n\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Created\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Not Created\"\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</CardContent>\n\t\t\t\t</Card>\n\t\t\t</div>\n\t\t</CardContent>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/servers/welcome-stripe/welcome-suscription.tsx",
    "content": "import { defineStepper } from \"@stepperize/react\";\nimport {\n\tBookIcon,\n\tCode2,\n\tDatabase,\n\tGitMerge,\n\tGlobe,\n\tPlug,\n\tPuzzle,\n\tUsers,\n} from \"lucide-react\";\nimport Link from \"next/link\";\nimport { useRouter } from \"next/router\";\nimport React, { useEffect, useState } from \"react\";\nimport ConfettiExplosion from \"react-confetti-explosion\";\nimport { GithubIcon } from \"@/components/icons/data-tools-icons\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n} from \"@/components/ui/dialog\";\nimport { Separator } from \"@/components/ui/separator\";\nimport { CreateServer } from \"./create-server\";\nimport { CreateSSHKey } from \"./create-ssh-key\";\nimport { Setup } from \"./setup\";\nimport { Verify } from \"./verify\";\n\nexport const { useStepper, steps, Scoped } = defineStepper(\n\t{\n\t\tid: \"requisites\",\n\t\ttitle: \"Requisites\",\n\t\tdescription: \"Check your requisites\",\n\t},\n\t{\n\t\tid: \"create-ssh-key\",\n\t\ttitle: \"SSH Key\",\n\t\tdescription: \"Create your ssh key\",\n\t},\n\t{\n\t\tid: \"connect-server\",\n\t\ttitle: \"Connect\",\n\t\tdescription: \"Connect\",\n\t},\n\t{ id: \"setup\", title: \"Setup\", description: \"Setup your server\" },\n\t{ id: \"verify\", title: \"Verify\", description: \"Verify your server\" },\n\t{ id: \"complete\", title: \"Complete\", description: \"Checkout complete\" },\n);\n\nexport const WelcomeSuscription = () => {\n\tconst [showConfetti, setShowConfetti] = useState(false);\n\tconst stepper = useStepper();\n\tconst [isOpen, setIsOpen] = useState(true);\n\tconst { push } = useRouter();\n\n\tuseEffect(() => {\n\t\tconst confettiShown = localStorage.getItem(\"hasShownConfetti\");\n\t\tif (!confettiShown) {\n\t\t\tsetShowConfetti(true);\n\t\t\tlocalStorage.setItem(\"hasShownConfetti\", \"true\");\n\t\t}\n\t}, [showConfetti]);\n\n\treturn (\n\t\t<Dialog open={isOpen}>\n\t\t\t<DialogContent className=\"sm:max-w-7xl min-h-[75vh]\">\n\t\t\t\t{showConfetti ?? \"Flaso\"}\n\t\t\t\t<div className=\"flex justify-center items-center w-full\">\n\t\t\t\t\t{showConfetti && (\n\t\t\t\t\t\t<ConfettiExplosion\n\t\t\t\t\t\t\tduration={3000}\n\t\t\t\t\t\t\tforce={0.3}\n\t\t\t\t\t\t\tparticleSize={12}\n\t\t\t\t\t\t\tparticleCount={300}\n\t\t\t\t\t\t\tclassName=\"z-[9999]\"\n\t\t\t\t\t\t\tzIndex={9999}\n\t\t\t\t\t\t\twidth={1500}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle className=\"text-2xl text-center\">\n\t\t\t\t\t\tWelcome To Dokploy Cloud 🎉\n\t\t\t\t\t</DialogTitle>\n\t\t\t\t\t<DialogDescription className=\"text-center max-w-xl mx-auto\">\n\t\t\t\t\t\tThank you for choosing Dokploy Cloud! 🚀 We're excited to have you\n\t\t\t\t\t\tonboard. Before you dive in, you'll need to configure your remote\n\t\t\t\t\t\tserver to unlock all the features we offer.\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t<div className=\"grid gap-4\">\n\t\t\t\t\t<div className=\"flex justify-between\">\n\t\t\t\t\t\t<h2 className=\"text-lg font-semibold\">Steps</h2>\n\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\tStep {stepper.current.index + 1} of {steps.length}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<div />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<Scoped>\n\t\t\t\t\t\t<nav aria-label=\"Checkout Steps\" className=\"group my-4\">\n\t\t\t\t\t\t\t<ol\n\t\t\t\t\t\t\t\tclassName=\"flex items-center justify-between gap-2\"\n\t\t\t\t\t\t\t\taria-orientation=\"horizontal\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{stepper.all.map((step, index, array) => (\n\t\t\t\t\t\t\t\t\t<React.Fragment key={step.id}>\n\t\t\t\t\t\t\t\t\t\t<li className=\"flex items-center gap-4 flex-shrink-0\">\n\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\trole=\"tab\"\n\t\t\t\t\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\t\t\t\t\tindex <= stepper.current.index ? \"secondary\" : \"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\taria-current={\n\t\t\t\t\t\t\t\t\t\t\t\t\tstepper.current.id === step.id ? \"step\" : undefined\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\taria-posinset={index + 1}\n\t\t\t\t\t\t\t\t\t\t\t\taria-setsize={steps.length}\n\t\t\t\t\t\t\t\t\t\t\t\taria-selected={stepper.current.id === step.id}\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex size-10 items-center justify-center rounded-full border-2 border-border\"\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => stepper.goTo(step.id)}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{index + 1}\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm font-medium\">{step.title}</span>\n\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t{index < array.length - 1 && (\n\t\t\t\t\t\t\t\t\t\t\t<Separator\n\t\t\t\t\t\t\t\t\t\t\t\tclassName={`flex-1 ${\n\t\t\t\t\t\t\t\t\t\t\t\t\tindex < stepper.current.index\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"bg-primary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"bg-muted\"\n\t\t\t\t\t\t\t\t\t\t\t\t}`}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</React.Fragment>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</ol>\n\t\t\t\t\t\t</nav>\n\t\t\t\t\t\t{stepper.switch({\n\t\t\t\t\t\t\trequisites: () => (\n\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2 border p-4 rounded-lg\">\n\t\t\t\t\t\t\t\t\t<span className=\"text-primary text-base font-bold\">\n\t\t\t\t\t\t\t\t\t\tBefore getting started, please follow the steps below to\n\t\t\t\t\t\t\t\t\t\tensure the best experience:\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t<p className=\"text-primary text-sm font-medium\">\n\t\t\t\t\t\t\t\t\t\t\tSupported Distributions:\n\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t<ul className=\"list-inside list-disc pl-4 text-sm text-muted-foreground  mt-4\">\n\t\t\t\t\t\t\t\t\t\t\t<li>Ubuntu 24.04 LTS</li>\n\t\t\t\t\t\t\t\t\t\t\t<li>Ubuntu 23.10</li>\n\t\t\t\t\t\t\t\t\t\t\t<li>Ubuntu 22.04 LTS</li>\n\t\t\t\t\t\t\t\t\t\t\t<li>Ubuntu 20.04 LTS</li>\n\t\t\t\t\t\t\t\t\t\t\t<li>Ubuntu 18.04 LTS</li>\n\t\t\t\t\t\t\t\t\t\t\t<li>Debian 12</li>\n\t\t\t\t\t\t\t\t\t\t\t<li>Debian 11</li>\n\t\t\t\t\t\t\t\t\t\t\t<li>Debian 10</li>\n\t\t\t\t\t\t\t\t\t\t\t<li>Fedora 40</li>\n\t\t\t\t\t\t\t\t\t\t\t<li>CentOS 9</li>\n\t\t\t\t\t\t\t\t\t\t\t<li>CentOS 8</li>\n\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t<p className=\"text-primary text-sm font-medium\">\n\t\t\t\t\t\t\t\t\t\t\tYou will need to purchase or rent a Virtual Private Server\n\t\t\t\t\t\t\t\t\t\t\t(VPS) to proceed, we recommend to use one of these\n\t\t\t\t\t\t\t\t\t\t\tproviders since has been heavily tested.\n\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t<ul className=\"list-inside list-disc pl-4 text-sm text-muted-foreground mt-4\">\n\t\t\t\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\t\t\t\thref=\"https://www.hostinger.com/vps-hosting?REFERRALCODE=1SIUMAURICI97\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-link underline\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\tHostinger - Get 20% Discount\n\t\t\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\t\t\t\thref=\" https://app.americancloud.com/register?ref=dokploy\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-link underline\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\tAmerican Cloud - Get $20 Credits\n\t\t\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\t\t\t\thref=\"https://m.do.co/c/db24efd43f35\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-link underline\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\tDigitalOcean - Get $200 Credits\n\t\t\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\t\t\t\thref=\"https://hetzner.cloud/?ref=vou4fhxJ1W2D\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-link underline\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\tHetzner - Get €20 Credits\n\t\t\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\t\t\t\thref=\"https://www.vultr.com/?ref=9679828\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-link underline\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\tVultr\n\t\t\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\t\t\t\thref=\"https://www.linode.com/es/pricing/#compute-shared\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-link underline\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\tLinode\n\t\t\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t\t<AlertBlock className=\"mt-4 px-4\">\n\t\t\t\t\t\t\t\t\t\t\tYou are free to use whatever provider, but we recommend to\n\t\t\t\t\t\t\t\t\t\t\tuse one of the above, to avoid issues.\n\t\t\t\t\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\"create-ssh-key\": () => <CreateSSHKey />,\n\t\t\t\t\t\t\t\"connect-server\": () => <CreateServer stepper={stepper} />,\n\t\t\t\t\t\t\tsetup: () => <Setup />,\n\t\t\t\t\t\t\tverify: () => <Verify />,\n\t\t\t\t\t\t\tcomplete: () => {\n\t\t\t\t\t\t\t\tconst features = [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttitle: \"Scalable Deployments\",\n\t\t\t\t\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\t\t\t\t\"Deploy and scale your applications effortlessly to handle any workload.\",\n\t\t\t\t\t\t\t\t\t\ticon: <Database className=\"text-primary\" />,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttitle: \"Automated Backups\",\n\t\t\t\t\t\t\t\t\t\tdescription: \"Protect your data with automatic backups\",\n\t\t\t\t\t\t\t\t\t\ticon: <Database className=\"text-primary\" />,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttitle: \"Open Source Templates\",\n\t\t\t\t\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\t\t\t\t\"Big list of common open source templates in one-click\",\n\t\t\t\t\t\t\t\t\t\ticon: <Puzzle className=\"text-primary\" />,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttitle: \"Custom Domains\",\n\t\t\t\t\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\t\t\t\t\"Link your own domains to your applications for a professional presence.\",\n\t\t\t\t\t\t\t\t\t\ticon: <Globe className=\"text-primary\" />,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttitle: \"CI/CD Integration\",\n\t\t\t\t\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\t\t\t\t\"Implement continuous integration and deployment workflows to streamline development.\",\n\t\t\t\t\t\t\t\t\t\ticon: <GitMerge className=\"text-primary\" />,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttitle: \"Database Management\",\n\t\t\t\t\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\t\t\t\t\"Efficiently manage your databases with intuitive tools.\",\n\t\t\t\t\t\t\t\t\t\ticon: <Database className=\"text-primary\" />,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttitle: \"Team Collaboration\",\n\t\t\t\t\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\t\t\t\t\"Collaborate with your team on shared projects with customizable permissions.\",\n\t\t\t\t\t\t\t\t\t\ticon: <Users className=\"text-primary\" />,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttitle: \"Multi-language Support\",\n\t\t\t\t\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\t\t\t\t\"Deploy applications in multiple programming languages to suit your needs.\",\n\t\t\t\t\t\t\t\t\t\ticon: <Code2 className=\"text-primary\" />,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttitle: \"API Access\",\n\t\t\t\t\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\t\t\t\t\"Integrate and manage your applications via robust and well-documented APIs.\",\n\t\t\t\t\t\t\t\t\t\ticon: <Plug className=\"text-primary\" />,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-6\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t<h2 className=\"text-lg font-semibold\">You're All Set!</h2>\n\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\tDid you know you can deploy any number of applications\n\t\t\t\t\t\t\t\t\t\t\t\tthat your server can handle?\n\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\tHere are some of the things you can do with Dokploy\n\t\t\t\t\t\t\t\t\t\t\t\tCloud:\n\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t<div className=\"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-6\">\n\t\t\t\t\t\t\t\t\t\t\t{features.map((feature) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={feature.title}\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex flex-col items-start p-4 bg-card rounded-lg shadow-md hover:shadow-lg transition-shadow\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"text-3xl mb-2\">{feature.icon}</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<h3 className=\"text-lg font-medium mb-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{feature.title}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{feature.description}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2 mt-4\">\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-base text-primary\">\n\t\t\t\t\t\t\t\t\t\t\t\tNeed Help? We are here to help you.\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\tJoin to our Discord server and we will help you.\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-4\">\n\t\t\t\t\t\t\t\t\t\t\t\t<Button className=\"rounded-full bg-[#5965F2] hover:bg-[#4A55E0] w-fit\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\t\t\thref=\"https://discord.gg/2tBnJ3jDJc\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\taria-label=\"Dokploy on GitHub\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex flex-row items-center gap-2 text-white\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trole=\"img\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-6 w-6 fill-white\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<path d=\"M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tJoin Discord\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t<Button className=\"rounded-full  w-fit\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\t\t\thref=\"https://github.com/Dokploy/dokploy\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\taria-label=\"Dokploy on GitHub\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex flex-row items-center gap-2 \"\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<GithubIcon />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGithub\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"rounded-full  w-fit\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\t\t\thref=\"https://docs.dokploy.com/docs/core\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\taria-label=\"Dokploy Docs\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex flex-row items-center gap-2 \"\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<BookIcon size={16} />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDocs\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t})}\n\t\t\t\t\t</Scoped>\n\t\t\t\t</div>\n\t\t\t\t<DialogFooter>\n\t\t\t\t\t<div className=\"flex items-center justify-between w-full\">\n\t\t\t\t\t\t{!stepper.isLast && (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\tsetIsOpen(false);\n\t\t\t\t\t\t\t\t\tpush(\"/dashboard/settings/servers\");\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tSkip for now\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t<div className=\"flex items-center gap-2 w-full justify-end\">\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tonClick={stepper.prev}\n\t\t\t\t\t\t\t\tdisabled={stepper.isFirst}\n\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tBack\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\tif (stepper.isLast) {\n\t\t\t\t\t\t\t\t\t\tsetIsOpen(false);\n\t\t\t\t\t\t\t\t\t\tpush(\"/dashboard/projects\");\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tstepper.next();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{stepper.isLast ? \"Complete\" : \"Next\"}\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</DialogFooter>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/ssh-keys/handle-ssh-keys.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { DownloadIcon, PenBoxIcon, PlusIcon } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport type { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { Textarea } from \"@/components/ui/textarea\";\nimport { sshKeyCreate, type sshKeyType } from \"@/server/db/validations\";\nimport { api } from \"@/utils/api\";\n\ntype SSHKey = z.infer<typeof sshKeyCreate>;\n\ninterface Props {\n\tsshKeyId?: string;\n}\n\nexport const HandleSSHKeys = ({ sshKeyId }: Props) => {\n\tconst utils = api.useUtils();\n\n\tconst [isOpen, setIsOpen] = useState(false);\n\n\tconst { data } = api.sshKey.one.useQuery(\n\t\t{\n\t\t\tsshKeyId: sshKeyId || \"\",\n\t\t},\n\t\t{\n\t\t\tenabled: !!sshKeyId,\n\t\t},\n\t);\n\n\tconst { mutateAsync, isError, error, isPending } = sshKeyId\n\t\t? api.sshKey.update.useMutation()\n\t\t: api.sshKey.create.useMutation();\n\n\tconst generateMutation = api.sshKey.generate.useMutation();\n\n\tconst form = useForm<SSHKey>({\n\t\tresolver: zodResolver(sshKeyCreate),\n\t\tdefaultValues: {\n\t\t\tname: \"\",\n\t\t\tdescription: \"\",\n\t\t\tpublicKey: \"\",\n\t\t\tprivateKey: \"\",\n\t\t},\n\t});\n\n\tuseEffect(() => {\n\t\tif (data) {\n\t\t\tform.reset({\n\t\t\t\t...data,\n\t\t\t\tdescription: data.description || undefined,\n\t\t\t});\n\t\t} else {\n\t\t\tform.reset();\n\t\t}\n\t}, [data, form, form.reset]);\n\n\tconst onSubmit = async (data: SSHKey) => {\n\t\tawait mutateAsync({\n\t\t\t...data,\n\t\t\torganizationId: \"\",\n\t\t\tsshKeyId: sshKeyId || \"\",\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(\n\t\t\t\t\tsshKeyId\n\t\t\t\t\t\t? \"SSH key updated successfully\"\n\t\t\t\t\t\t: \"SSH key created successfully\",\n\t\t\t\t);\n\t\t\t\tawait utils.sshKey.all.invalidate();\n\t\t\t\tform.reset();\n\t\t\t\tsetIsOpen(false);\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\n\t\t\t\t\tsshKeyId\n\t\t\t\t\t\t? \"Error updating the SSH key\"\n\t\t\t\t\t\t: \"Error creating the SSH key\",\n\t\t\t\t);\n\t\t\t});\n\t};\n\n\tconst onGenerateSSHKey = (type: z.infer<typeof sshKeyType>) =>\n\t\tgenerateMutation\n\t\t\t.mutateAsync(type)\n\t\t\t.then(async (data) => {\n\t\t\t\ttoast.success(\"SSH Key Generated\");\n\t\t\t\tform.setValue(\"privateKey\", data.privateKey);\n\t\t\t\tform.setValue(\"publicKey\", data.publicKey);\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error generating the SSH Key\");\n\t\t\t});\n\n\tconst downloadKey = (content: string, keyType: \"private\" | \"public\") => {\n\t\tconst keyName = form.watch(\"name\");\n\t\tconst publicKey = form.watch(\"publicKey\");\n\n\t\t// Extract algorithm type from public key\n\t\tconst isEd25519 = publicKey.startsWith(\"ssh-ed25519\");\n\t\tconst defaultName = isEd25519 ? \"id_ed25519\" : \"id_rsa\";\n\n\t\tconst filename = keyName\n\t\t\t? `${keyName}${sshKeyId ? `_${sshKeyId}` : \"\"}_${keyType}_${defaultName}${keyType === \"public\" ? \".pub\" : \"\"}`\n\t\t\t: `${defaultName}${keyType === \"public\" ? \".pub\" : \"\"}`;\n\t\tconst blob = new Blob([content], { type: \"text/plain\" });\n\t\tconst url = window.URL.createObjectURL(blob);\n\t\tconst a = document.createElement(\"a\");\n\t\ta.href = url;\n\t\ta.download = filename;\n\t\tdocument.body.appendChild(a);\n\t\ta.click();\n\t\tdocument.body.removeChild(a);\n\t\twindow.URL.revokeObjectURL(url);\n\t};\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger className=\"\" asChild>\n\t\t\t\t{sshKeyId ? (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\tclassName=\"group hover:bg-blue-500/10 \"\n\t\t\t\t\t>\n\t\t\t\t\t\t<PenBoxIcon className=\"size-3.5  text-primary group-hover:text-blue-500\" />\n\t\t\t\t\t</Button>\n\t\t\t\t) : (\n\t\t\t\t\t<Button className=\"cursor-pointer space-x-3\">\n\t\t\t\t\t\t<PlusIcon className=\"h-4 w-4\" />\n\t\t\t\t\t\tAdd SSH Key\n\t\t\t\t\t</Button>\n\t\t\t\t)}\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-2xl\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>SSH Key</DialogTitle>\n\t\t\t\t\t<DialogDescription className=\"space-y-4\">\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\tIn this section you can add one of your keys or generate a new\n\t\t\t\t\t\t\tone.\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{!sshKeyId && (\n\t\t\t\t\t\t\t<div className=\"flex gap-4\">\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tvariant={\"secondary\"}\n\t\t\t\t\t\t\t\t\tdisabled={generateMutation.isPending}\n\t\t\t\t\t\t\t\t\tclassName=\"max-sm:w-full\"\n\t\t\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\t\t\tonGenerateSSHKey({\n\t\t\t\t\t\t\t\t\t\t\ttype: \"rsa\",\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tGenerate RSA SSH Key\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tvariant={\"secondary\"}\n\t\t\t\t\t\t\t\t\tdisabled={generateMutation.isPending}\n\t\t\t\t\t\t\t\t\tclassName=\"max-sm:w-full\"\n\t\t\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\t\t\tonGenerateSSHKey({\n\t\t\t\t\t\t\t\t\t\t\ttype: \"ed25519\",\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tGenerate ED25519 SSH Key\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t{isError && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tclassName=\"grid w-full gap-4 \"\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"name\"\n\t\t\t\t\t\t\trender={({ field }) => {\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Name</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input placeholder={\"Personal projects\"} {...field} />\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"description\"\n\t\t\t\t\t\t\trender={({ field }) => {\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Description</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder={\"Used on my personal Hetzner VPS\"}\n\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"privateKey\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Private Key</FormLabel>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Textarea\n\t\t\t\t\t\t\t\t\t\t\tplaceholder={\"-----BEGIN RSA PRIVATE KEY-----\"}\n\t\t\t\t\t\t\t\t\t\t\trows={5}\n\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"publicKey\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Public Key</FormLabel>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input placeholder={\"ssh-rsa AAAAB3NzaC1yc2E\"} {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<DialogFooter className=\"flex items-center justify-between\">\n\t\t\t\t\t\t\t<div className=\"flex items-center gap-4\">\n\t\t\t\t\t\t\t\t{form.watch(\"privateKey\") && (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\tsize=\"default\"\n\t\t\t\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\t\t\t\tdownloadKey(form.watch(\"privateKey\"), \"private\")\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-2\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<DownloadIcon className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\tPrivate Key\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{form.watch(\"publicKey\") && (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\tsize=\"default\"\n\t\t\t\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\t\t\t\tdownloadKey(form.watch(\"publicKey\"), \"public\")\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-2\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<DownloadIcon className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\tPublic Key\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<Button isLoading={isPending} type=\"submit\">\n\t\t\t\t\t\t\t\t{sshKeyId ? \"Update\" : \"Create\"}\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</DialogFooter>\n\t\t\t\t\t</form>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/ssh-keys/show-ssh-keys.tsx",
    "content": "import { formatDistanceToNow } from \"date-fns\";\nimport { KeyRound, Loader2, Trash2 } from \"lucide-react\";\nimport { toast } from \"sonner\";\nimport { DialogAction } from \"@/components/shared/dialog-action\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport { api } from \"@/utils/api\";\nimport { HandleSSHKeys } from \"./handle-ssh-keys\";\n\nexport const ShowDestinations = () => {\n\tconst { data, isPending, refetch } = api.sshKey.all.useQuery();\n\tconst { mutateAsync, isPending: isRemoving } =\n\t\tapi.sshKey.remove.useMutation();\n\tconst { data: permissions } = api.user.getPermissions.useQuery();\n\n\treturn (\n\t\t<div className=\"w-full\">\n\t\t\t<Card className=\"h-full bg-sidebar  p-2.5 rounded-xl  max-w-5xl mx-auto\">\n\t\t\t\t<div className=\"rounded-xl bg-background shadow-md \">\n\t\t\t\t\t<CardHeader className=\"\">\n\t\t\t\t\t\t<CardTitle className=\"text-xl flex flex-row gap-2\">\n\t\t\t\t\t\t\t<KeyRound className=\"size-6 text-muted-foreground self-center\" />\n\t\t\t\t\t\t\tSSH Keys\n\t\t\t\t\t\t</CardTitle>\n\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\tCreate and manage SSH Keys, you can use them to access your\n\t\t\t\t\t\t\tservers, git private repositories, and more.\n\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<CardContent className=\"space-y-2 py-8 border-t\">\n\t\t\t\t\t\t{isPending ? (\n\t\t\t\t\t\t\t<div className=\"flex flex-row gap-2 items-center justify-center text-sm text-muted-foreground min-h-[25vh]\">\n\t\t\t\t\t\t\t\t<span>Loading...</span>\n\t\t\t\t\t\t\t\t<Loader2 className=\"animate-spin size-4\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{data?.length === 0 ? (\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col items-center gap-3  min-h-[25vh] justify-center\">\n\t\t\t\t\t\t\t\t\t\t<KeyRound className=\"size-8 self-center text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t<span className=\"text-base text-muted-foreground text-center\">\n\t\t\t\t\t\t\t\t\t\t\tYou don't have any SSH keys\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t{permissions?.sshKeys.create && <HandleSSHKeys />}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-4  min-h-[25vh]\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-4 rounded-lg \">\n\t\t\t\t\t\t\t\t\t\t\t{data?.map((sshKey, index) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={sshKey.sshKeyId}\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center justify-between bg-sidebar p-1 w-full rounded-lg\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center justify-between p-3.5 rounded-lg bg-background border  w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center justify-between\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm font-medium\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{index + 1}. {sshKey.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{sshKey.description && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-xs text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{sshKey.description}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"text-xs  text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCreated:{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{formatDistanceToNow(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew Date(sshKey.createdAt),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\taddSuffix: true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<HandleSSHKeys sshKeyId={sshKey.sshKeyId} />\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{permissions?.sshKeys.delete && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"Delete SSH Key\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to delete this SSH Key?\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"destructive\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait mutateAsync({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsshKeyId: sshKey.sshKeyId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"SSH Key deleted successfully\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error deleting SSH Key\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"group hover:bg-red-500/10 \"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisLoading={isRemoving}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Trash2 className=\"size-4 text-primary group-hover:text-red-500\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t{permissions?.sshKeys.create && (\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-2 flex-wrap w-full justify-end mr-4\">\n\t\t\t\t\t\t\t\t\t\t\t\t<HandleSSHKeys />\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</CardContent>\n\t\t\t\t</div>\n\t\t\t</Card>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/tags/handle-tag.tsx",
    "content": "import { zodResolver } from \"@hookform/resolvers/zod\";\nimport { Palette, PenBoxIcon, PlusIcon } from \"lucide-react\";\nimport { useEffect, useRef, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { TagBadge } from \"@/components/shared/tag-badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { api } from \"@/utils/api\";\n\nconst TagSchema = z.object({\n\tname: z\n\t\t.string()\n\t\t.min(1, \"Tag name is required\")\n\t\t.max(50, \"Tag name must be less than 50 characters\")\n\t\t.refine(\n\t\t\t(name) => {\n\t\t\t\tconst trimmedName = name.trim();\n\t\t\t\tconst validNameRegex =\n\t\t\t\t\t/^[\\p{L}\\p{N}_-][\\p{L}\\p{N}\\s_.-]*[\\p{L}\\p{N}_-]$/u;\n\t\t\t\treturn validNameRegex.test(trimmedName);\n\t\t\t},\n\t\t\t{\n\t\t\t\tmessage:\n\t\t\t\t\t\"Tag name must start and end with a letter, number, hyphen or underscore. Spaces are allowed in between.\",\n\t\t\t},\n\t\t)\n\t\t.transform((name) => name.trim()),\n\tcolor: z.string().optional(),\n});\n\ntype Tag = z.infer<typeof TagSchema>;\n\ninterface HandleTagProps {\n\ttagId?: string;\n}\n\nexport const HandleTag = ({ tagId }: HandleTagProps) => {\n\tconst utils = api.useUtils();\n\tconst [isOpen, setIsOpen] = useState(false);\n\tconst colorInputRef = useRef<HTMLInputElement>(null);\n\n\tconst { mutateAsync, error, isError } = tagId\n\t\t? api.tag.update.useMutation()\n\t\t: api.tag.create.useMutation();\n\n\tconst { data: tag } = api.tag.one.useQuery(\n\t\t{\n\t\t\ttagId: tagId || \"\",\n\t\t},\n\t\t{\n\t\t\tenabled: !!tagId,\n\t\t},\n\t);\n\n\tconst form = useForm<Tag>({\n\t\tdefaultValues: {\n\t\t\tname: \"\",\n\t\t\tcolor: \"#3b82f6\",\n\t\t},\n\t\tresolver: zodResolver(TagSchema),\n\t});\n\n\tuseEffect(() => {\n\t\tif (tag) {\n\t\t\tform.reset({\n\t\t\t\tname: tag.name ?? \"\",\n\t\t\t\tcolor: tag.color ?? \"#3b82f6\",\n\t\t\t});\n\t\t} else {\n\t\t\tform.reset({\n\t\t\t\tname: \"\",\n\t\t\t\tcolor: \"#3b82f6\",\n\t\t\t});\n\t\t}\n\t}, [form, form.reset, tag]);\n\n\tconst onSubmit = async (data: Tag) => {\n\t\tawait mutateAsync({\n\t\t\tname: data.name,\n\t\t\tcolor: data.color,\n\t\t\ttagId: tagId || \"\",\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\tawait utils.tag.all.invalidate();\n\t\t\t\ttoast.success(tagId ? \"Tag Updated\" : \"Tag Created\");\n\t\t\t\tsetIsOpen(false);\n\t\t\t\tform.reset();\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(tagId ? \"Error updating tag\" : \"Error creating tag\");\n\t\t\t});\n\t};\n\n\tconst colorValue = form.watch(\"color\");\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t{tagId ? (\n\t\t\t\t\t<Button variant=\"ghost\" size=\"icon\" className=\"h-8 w-8\">\n\t\t\t\t\t\t<PenBoxIcon className=\"h-4 w-4\" />\n\t\t\t\t\t</Button>\n\t\t\t\t) : (\n\t\t\t\t\t<Button>\n\t\t\t\t\t\t<PlusIcon className=\"h-4 w-4\" />\n\t\t\t\t\t\tCreate Tag\n\t\t\t\t\t</Button>\n\t\t\t\t)}\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-lg\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>{tagId ? \"Update\" : \"Create\"} Tag</DialogTitle>\n\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\t{tagId\n\t\t\t\t\t\t\t? \"Update the tag name and color\"\n\t\t\t\t\t\t\t: \"Create a new tag to organize your projects\"}\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t{isError && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tid=\"hook-form-tag\"\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\tclassName=\"grid w-full gap-4\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"name\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Name</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"e.g., Production, Client, Internal\"\n\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"color\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Color (Optional)</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-3\">\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"relative flex items-center justify-center w-12 h-12 rounded-md border-2 cursor-pointer hover:opacity-80 transition-opacity\"\n\t\t\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\t\t\tbackgroundColor: field.value || \"#3b82f6\",\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => colorInputRef.current?.click()}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center justify-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{!field.value && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Palette className=\"h-5 w-5 text-white\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\t\t\t\tref={colorInputRef}\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"color\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"absolute opacity-0 pointer-events-none w-12 h-12 top-0 left-0\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value || \"#3b82f6\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"#3b82f6\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value || \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst value = e.target.value;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (value.startsWith(\"#\") || value === \"\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(value);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription className=\"mt-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\tChoose a color to easily identify this tag\n\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t{colorValue && (\n\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">Preview:</span>\n\t\t\t\t\t\t\t\t<TagBadge\n\t\t\t\t\t\t\t\t\tname={form.watch(\"name\") || \"Tag Name\"}\n\t\t\t\t\t\t\t\t\tcolor={colorValue}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</form>\n\t\t\t\t</Form>\n\n\t\t\t\t<DialogFooter>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tisLoading={form.formState.isSubmitting}\n\t\t\t\t\t\tform=\"hook-form-tag\"\n\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{tagId ? \"Update\" : \"Create\"}\n\t\t\t\t\t</Button>\n\t\t\t\t</DialogFooter>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/tags/tag-manager.tsx",
    "content": "import { Loader2, TagIcon, Trash2 } from \"lucide-react\";\nimport { toast } from \"sonner\";\nimport { DialogAction } from \"@/components/shared/dialog-action\";\nimport { TagBadge } from \"@/components/shared/tag-badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport { api } from \"@/utils/api\";\nimport { HandleTag } from \"./handle-tag\";\n\nexport const TagManager = () => {\n\tconst utils = api.useUtils();\n\tconst { data: tags, isPending } = api.tag.all.useQuery();\n\tconst { mutateAsync: deleteTag, isPending: isRemoving } =\n\t\tapi.tag.remove.useMutation();\n\tconst { data: permissions } = api.user.getPermissions.useQuery();\n\n\treturn (\n\t\t<div className=\"w-full\">\n\t\t\t<Card className=\"h-full bg-sidebar p-2.5 rounded-xl max-w-5xl mx-auto\">\n\t\t\t\t<div className=\"rounded-xl bg-background shadow-md\">\n\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t<CardTitle className=\"text-xl flex flex-row gap-2\">\n\t\t\t\t\t\t\t<TagIcon className=\"size-6 text-muted-foreground self-center\" />\n\t\t\t\t\t\t\tTags\n\t\t\t\t\t\t</CardTitle>\n\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\tCreate and manage tags to organize your projects\n\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<CardContent className=\"space-y-2 py-8 border-t\">\n\t\t\t\t\t\t{isPending ? (\n\t\t\t\t\t\t\t<div className=\"flex flex-row gap-2 items-center justify-center text-sm text-muted-foreground min-h-[25vh]\">\n\t\t\t\t\t\t\t\t<span>Loading...</span>\n\t\t\t\t\t\t\t\t<Loader2 className=\"animate-spin size-4\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{!tags || tags.length === 0 ? (\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col items-center gap-3 min-h-[25vh] justify-center\">\n\t\t\t\t\t\t\t\t\t\t<TagIcon className=\"size-6 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t<span className=\"text-base text-muted-foreground text-center\">\n\t\t\t\t\t\t\t\t\t\t\tNo tags yet. Create your first tag to start organizing\n\t\t\t\t\t\t\t\t\t\t\tprojects.\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t{permissions?.tag.create && <HandleTag />}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-4 min-h-[25vh]\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-4 rounded-lg\">\n\t\t\t\t\t\t\t\t\t\t\t{tags.map((tag) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={tag.tagId}\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center justify-between bg-sidebar p-1 w-full rounded-lg\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center justify-between p-3.5 rounded-lg bg-background border w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TagBadge name={tag.name} color={tag.color} />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{tag.color && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-xs text-muted-foreground font-mono\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{tag.color}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-1 items-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{permissions?.tag.update && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<HandleTag tagId={tag.tagId} />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{permissions?.tag.delete && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"Delete Tag\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdescription={`Are you sure you want to delete the tag \"${tag.name}\"? This will remove the tag from all projects. This action cannot be undone.`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"destructive\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait deleteTag({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttagId: tag.tagId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.then(async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait utils.tag.all.invalidate();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Tag deleted successfully\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Error deleting tag\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"group hover:bg-red-500/10\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisLoading={isRemoving}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Trash2 className=\"size-4 text-primary group-hover:text-red-500\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t{permissions?.tag.create && (\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-2 flex-wrap w-full justify-end mr-4\">\n\t\t\t\t\t\t\t\t\t\t\t\t<HandleTag />\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</CardContent>\n\t\t\t\t</div>\n\t\t\t</Card>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/users/add-invitation.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { PlusIcon } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { api } from \"@/utils/api\";\n\nconst addInvitation = z.object({\n\temail: z\n\t\t.string()\n\t\t.min(1, \"Email is required\")\n\t\t.email({ message: \"Invalid email\" }),\n\trole: z.string().min(1, \"Role is required\"),\n\tnotificationId: z.string().optional(),\n});\n\ntype AddInvitation = z.infer<typeof addInvitation>;\n\nexport const AddInvitation = () => {\n\tconst [open, setOpen] = useState(false);\n\tconst utils = api.useUtils();\n\tconst { data: isCloud } = api.settings.isCloud.useQuery();\n\tconst { data: emailProviders } =\n\t\tapi.notification.getEmailProviders.useQuery();\n\tconst { mutateAsync: inviteMember, isPending: isInviting } =\n\t\tapi.organization.inviteMember.useMutation();\n\tconst { mutateAsync: sendInvitation } = api.user.sendInvitation.useMutation();\n\tconst { data: customRoles } = api.customRole.all.useQuery();\n\tconst [error, setError] = useState<string | null>(null);\n\n\tconst form = useForm<AddInvitation>({\n\t\tdefaultValues: {\n\t\t\temail: \"\",\n\t\t\trole: \"member\",\n\t\t\tnotificationId: \"\",\n\t\t},\n\t\tresolver: zodResolver(addInvitation),\n\t});\n\tuseEffect(() => {\n\t\tform.reset();\n\t}, [form, form.formState.isSubmitSuccessful, form.reset]);\n\n\tconst onSubmit = async (data: AddInvitation) => {\n\t\ttry {\n\t\t\tconst result = await inviteMember({\n\t\t\t\temail: data.email.toLowerCase(),\n\t\t\t\trole: data.role,\n\t\t\t});\n\n\t\t\tif (!isCloud && data.notificationId) {\n\t\t\t\tawait sendInvitation({\n\t\t\t\t\tinvitationId: result!.id,\n\t\t\t\t\tnotificationId: data.notificationId || \"\",\n\t\t\t\t})\n\t\t\t\t\t.then(() => {\n\t\t\t\t\t\ttoast.success(\"Invitation created and email sent\");\n\t\t\t\t\t})\n\t\t\t\t\t.catch((error: any) => {\n\t\t\t\t\t\ttoast.error(error.message);\n\t\t\t\t\t});\n\t\t\t} else {\n\t\t\t\ttoast.success(\"Invitation created\");\n\t\t\t}\n\t\t\tsetError(null);\n\t\t\tsetOpen(false);\n\t\t} catch (error: any) {\n\t\t\tsetError(error.message || \"Failed to create invitation\");\n\t\t}\n\n\t\tutils.organization.allInvitations.invalidate();\n\t};\n\treturn (\n\t\t<Dialog open={open} onOpenChange={setOpen}>\n\t\t\t<DialogTrigger className=\"\" asChild>\n\t\t\t\t<Button>\n\t\t\t\t\t<PlusIcon className=\"h-4 w-4\" /> Add Invitation\n\t\t\t\t</Button>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-2xl\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Add Invitation</DialogTitle>\n\t\t\t\t\t<DialogDescription>Invite a new user</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t{error && <AlertBlock type=\"error\">{error}</AlertBlock>}\n\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tid=\"hook-form-add-invitation\"\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\tclassName=\"grid w-full gap-4 \"\n\t\t\t\t\t>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"email\"\n\t\t\t\t\t\t\trender={({ field }) => {\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Email</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input placeholder={\"email@dokploy.com\"} {...field} />\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\tThis will be the email of the new user\n\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"role\"\n\t\t\t\t\t\t\trender={({ field }) => {\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Role</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\t\tonValueChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\tdefaultValue={field.value}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a role\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"member\">Member</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"admin\">Admin</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t{customRoles?.map((role) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem key={role.role} value={role.role}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{role.role}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\tSelect the role for the new user\n\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t{!isCloud && (\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"notificationId\"\n\t\t\t\t\t\t\t\trender={({ field }) => {\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Email Provider</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\t\t\tonValueChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\tdefaultValue={field.value}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select an email provider\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{emailProviders?.map((provider) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={provider.notificationId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={provider.notificationId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{provider.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"none\" disabled>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tNone\n\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\tSelect the email provider to send the invitation\n\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<DialogFooter className=\"flex w-full flex-row\">\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tisLoading={isInviting}\n\t\t\t\t\t\t\t\tform=\"hook-form-add-invitation\"\n\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tCreate\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</DialogFooter>\n\t\t\t\t\t</form>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/users/add-permissions.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport { Checkbox } from \"@/components/ui/checkbox\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport { DropdownMenuItem } from \"@/components/ui/dropdown-menu\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Switch } from \"@/components/ui/switch\";\nimport { api, type RouterOutputs } from \"@/utils/api\";\n\n/** Shape returned by project.allForPermissions (admin only). Used for the permissions UI. */\ntype ProjectForPermissions =\n\tRouterOutputs[\"project\"][\"allForPermissions\"][number];\ntype EnvironmentForPermissions = ProjectForPermissions[\"environments\"][number];\n\ntype Environment = EnvironmentForPermissions;\n\nexport type Services = {\n\tappName: string;\n\tserverId?: string | null;\n\tname: string;\n\ttype:\n\t\t| \"mariadb\"\n\t\t| \"application\"\n\t\t| \"postgres\"\n\t\t| \"mysql\"\n\t\t| \"mongo\"\n\t\t| \"redis\"\n\t\t| \"compose\";\n\tdescription?: string | null;\n\tid: string;\n\tcreatedAt: string;\n\tstatus?: \"idle\" | \"running\" | \"done\" | \"error\";\n};\n\nexport const extractServices = (data: Environment | undefined) => {\n\tconst applications: Services[] = (data?.applications?.map((item) => ({\n\t\tappName: item.appName,\n\t\tname: item.name,\n\t\ttype: \"application\",\n\t\tid: item.applicationId,\n\t\tcreatedAt: item.createdAt,\n\t\tstatus: item.applicationStatus,\n\t\tdescription: item.description,\n\t\tserverId: item.serverId,\n\t})) ?? []) as Services[];\n\n\tconst mariadb: Services[] =\n\t\tdata?.mariadb.map((item) => ({\n\t\t\tappName: item.appName,\n\t\t\tname: item.name,\n\t\t\ttype: \"mariadb\",\n\t\t\tid: item.mariadbId,\n\t\t\tcreatedAt: item.createdAt,\n\t\t\tstatus: item.applicationStatus,\n\t\t\tdescription: item.description,\n\t\t\tserverId: item.serverId,\n\t\t})) || [];\n\n\tconst postgres: Services[] =\n\t\tdata?.postgres.map((item) => ({\n\t\t\tappName: item.appName,\n\t\t\tname: item.name,\n\t\t\ttype: \"postgres\",\n\t\t\tid: item.postgresId,\n\t\t\tcreatedAt: item.createdAt,\n\t\t\tstatus: item.applicationStatus,\n\t\t\tdescription: item.description,\n\t\t\tserverId: item.serverId,\n\t\t})) || [];\n\n\tconst mongo: Services[] =\n\t\tdata?.mongo.map((item) => ({\n\t\t\tappName: item.appName,\n\t\t\tname: item.name,\n\t\t\ttype: \"mongo\",\n\t\t\tid: item.mongoId,\n\t\t\tcreatedAt: item.createdAt,\n\t\t\tstatus: item.applicationStatus,\n\t\t\tdescription: item.description,\n\t\t\tserverId: item.serverId,\n\t\t})) || [];\n\n\tconst redis: Services[] =\n\t\tdata?.redis.map((item) => ({\n\t\t\tappName: item.appName,\n\t\t\tname: item.name,\n\t\t\ttype: \"redis\",\n\t\t\tid: item.redisId,\n\t\t\tcreatedAt: item.createdAt,\n\t\t\tstatus: item.applicationStatus,\n\t\t\tdescription: item.description,\n\t\t\tserverId: item.serverId,\n\t\t})) || [];\n\n\tconst mysql: Services[] =\n\t\tdata?.mysql.map((item) => ({\n\t\t\tappName: item.appName,\n\t\t\tname: item.name,\n\t\t\ttype: \"mysql\",\n\t\t\tid: item.mysqlId,\n\t\t\tcreatedAt: item.createdAt,\n\t\t\tstatus: item.applicationStatus,\n\t\t\tdescription: item.description,\n\t\t\tserverId: item.serverId,\n\t\t})) || [];\n\n\tconst compose: Services[] = (data?.compose?.map((item) => ({\n\t\tappName: item.appName,\n\t\tname: item.name,\n\t\ttype: \"compose\",\n\t\tid: item.composeId,\n\t\tcreatedAt: item.createdAt,\n\t\tstatus: item.composeStatus,\n\t\tdescription: item.description,\n\t\tserverId: item.serverId,\n\t})) ?? []) as Services[];\n\n\tapplications.push(\n\t\t...mysql,\n\t\t...redis,\n\t\t...mongo,\n\t\t...postgres,\n\t\t...mariadb,\n\t\t...compose,\n\t);\n\n\tapplications.sort((a, b) => {\n\t\treturn new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime();\n\t});\n\n\treturn applications;\n};\n\nconst addPermissions = z.object({\n\taccessedProjects: z.array(z.string()).optional(),\n\taccessedEnvironments: z.array(z.string()).optional(),\n\taccessedServices: z.array(z.string()).optional(),\n\tcanCreateProjects: z.boolean().optional().default(false),\n\tcanCreateServices: z.boolean().optional().default(false),\n\tcanDeleteProjects: z.boolean().optional().default(false),\n\tcanDeleteServices: z.boolean().optional().default(false),\n\tcanDeleteEnvironments: z.boolean().optional().default(false),\n\tcanAccessToTraefikFiles: z.boolean().optional().default(false),\n\tcanAccessToDocker: z.boolean().optional().default(false),\n\tcanAccessToAPI: z.boolean().optional().default(false),\n\tcanAccessToSSHKeys: z.boolean().optional().default(false),\n\tcanAccessToGitProviders: z.boolean().optional().default(false),\n\tcanCreateEnvironments: z.boolean().optional().default(false),\n});\n\ntype AddPermissions = z.infer<typeof addPermissions>;\n\ninterface Props {\n\tuserId: string;\n\trole?: string;\n}\n\nexport const AddUserPermissions = ({ userId, role }: Props) => {\n\tconst isCustomRole = !!role && ![\"owner\", \"admin\", \"member\"].includes(role);\n\tconst [isOpen, setIsOpen] = useState(false);\n\tconst { data: projects } = api.project.allForPermissions.useQuery(undefined, {\n\t\tenabled: isOpen,\n\t});\n\n\tconst { data, refetch } = api.user.one.useQuery(\n\t\t{\n\t\t\tuserId,\n\t\t},\n\t\t{\n\t\t\tenabled: !!userId,\n\t\t},\n\t);\n\n\tconst { mutateAsync, isError, error, isPending } =\n\t\tapi.user.assignPermissions.useMutation();\n\n\tconst form = useForm({\n\t\tdefaultValues: {\n\t\t\taccessedProjects: [],\n\t\t\taccessedEnvironments: [],\n\t\t\taccessedServices: [],\n\t\t\tcanDeleteEnvironments: false,\n\t\t\tcanCreateProjects: false,\n\t\t\tcanCreateServices: false,\n\t\t\tcanDeleteProjects: false,\n\t\t\tcanDeleteServices: false,\n\t\t\tcanAccessToTraefikFiles: false,\n\t\t\tcanAccessToDocker: false,\n\t\t\tcanAccessToAPI: false,\n\t\t\tcanAccessToSSHKeys: false,\n\t\t\tcanAccessToGitProviders: false,\n\t\t\tcanCreateEnvironments: false,\n\t\t},\n\t\tresolver: zodResolver(addPermissions),\n\t});\n\n\tuseEffect(() => {\n\t\tif (data && isOpen) {\n\t\t\tform.reset({\n\t\t\t\taccessedProjects: data.accessedProjects || [],\n\t\t\t\taccessedEnvironments: data.accessedEnvironments || [],\n\t\t\t\taccessedServices: data.accessedServices || [],\n\t\t\t\tcanCreateProjects: data.canCreateProjects,\n\t\t\t\tcanCreateServices: data.canCreateServices,\n\t\t\t\tcanDeleteProjects: data.canDeleteProjects,\n\t\t\t\tcanDeleteServices: data.canDeleteServices,\n\t\t\t\tcanDeleteEnvironments: data.canDeleteEnvironments || false,\n\t\t\t\tcanAccessToTraefikFiles: data.canAccessToTraefikFiles,\n\t\t\t\tcanAccessToDocker: data.canAccessToDocker,\n\t\t\t\tcanAccessToAPI: data.canAccessToAPI,\n\t\t\t\tcanAccessToSSHKeys: data.canAccessToSSHKeys,\n\t\t\t\tcanAccessToGitProviders: data.canAccessToGitProviders,\n\t\t\t\tcanCreateEnvironments: data.canCreateEnvironments,\n\t\t\t});\n\t\t}\n\t}, [form, form.reset, data, isOpen]);\n\n\tconst onSubmit = async (data: AddPermissions) => {\n\t\tawait mutateAsync({\n\t\t\tid: userId,\n\t\t\tcanCreateServices: data.canCreateServices,\n\t\t\tcanCreateProjects: data.canCreateProjects,\n\t\t\tcanDeleteServices: data.canDeleteServices,\n\t\t\tcanDeleteProjects: data.canDeleteProjects,\n\t\t\tcanDeleteEnvironments: data.canDeleteEnvironments,\n\t\t\tcanAccessToTraefikFiles: data.canAccessToTraefikFiles,\n\t\t\taccessedProjects: data.accessedProjects || [],\n\t\t\taccessedEnvironments: data.accessedEnvironments || [],\n\t\t\taccessedServices: data.accessedServices || [],\n\t\t\tcanAccessToDocker: data.canAccessToDocker,\n\t\t\tcanAccessToAPI: data.canAccessToAPI,\n\t\t\tcanAccessToSSHKeys: data.canAccessToSSHKeys,\n\t\t\tcanAccessToGitProviders: data.canAccessToGitProviders,\n\t\t\tcanCreateEnvironments: data.canCreateEnvironments,\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(\"Permissions updated\");\n\t\t\t\trefetch();\n\t\t\t\tsetIsOpen(false);\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error updating the permissions\");\n\t\t\t});\n\t};\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger className=\"\" asChild>\n\t\t\t\t<DropdownMenuItem\n\t\t\t\t\tclassName=\"w-full cursor-pointer\"\n\t\t\t\t\tonSelect={(e) => e.preventDefault()}\n\t\t\t\t>\n\t\t\t\t\tAdd Permissions\n\t\t\t\t</DropdownMenuItem>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"max-h-[85vh]  sm:max-w-4xl\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Permissions</DialogTitle>\n\t\t\t\t\t<DialogDescription>Add or remove permissions</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t{isError && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tid=\"hook-form-add-permissions\"\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\tclassName=\"grid  grid-cols-1 md:grid-cols-2  w-full gap-4\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{isCustomRole && (\n\t\t\t\t\t\t\t<div className=\"md:col-span-2 rounded-lg border p-3 bg-muted/50 text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\tThis user has a custom role assigned. Capabilities are defined\n\t\t\t\t\t\t\t\tby the role. You can still manage which projects, environments,\n\t\t\t\t\t\t\t\tand services they can access below.\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!isCustomRole && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"canCreateProjects\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem className=\"flex flex-row items-center justify-between rounded-lg border p-3 shadow-sm\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Create Projects</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\tAllow the user to create projects\n\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"canDeleteProjects\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem className=\"flex flex-row items-center justify-between rounded-lg border p-3 shadow-sm\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Delete Projects</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\tAllow the user to delete projects\n\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"canCreateServices\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem className=\"flex flex-row items-center justify-between rounded-lg border p-3 shadow-sm\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Create Services</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\tAllow the user to create services\n\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"canDeleteServices\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem className=\"flex flex-row items-center justify-between rounded-lg border p-3 shadow-sm\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Delete Services</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\tAllow the user to delete services\n\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"canCreateEnvironments\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem className=\"flex flex-row items-center justify-between rounded-lg border p-3 shadow-sm\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Create Environments</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\tAllow the user to create environments\n\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"canDeleteEnvironments\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem className=\"flex flex-row items-center justify-between rounded-lg border p-3 shadow-sm\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Delete Environments</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\tAllow the user to delete environments\n\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"canAccessToTraefikFiles\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem className=\"flex flex-row items-center justify-between rounded-lg border p-3 shadow-sm\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Access to Traefik Files</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\tAllow the user to access to the Traefik Tab Files\n\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"canAccessToDocker\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem className=\"flex flex-row items-center justify-between rounded-lg border p-3 shadow-sm\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Access to Docker</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\tAllow the user to access to the Docker Tab\n\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"canAccessToAPI\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem className=\"flex flex-row items-center justify-between rounded-lg border p-3 shadow-sm\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Access to API/CLI</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\tAllow the user to access to the API/CLI\n\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"canAccessToSSHKeys\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem className=\"flex flex-row items-center justify-between rounded-lg border p-3 shadow-sm\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Access to SSH Keys</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\tAllow to users to access to the SSH Keys section\n\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"canAccessToGitProviders\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem className=\"flex flex-row items-center justify-between rounded-lg border p-3 shadow-sm\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Access to Git Providers</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\tAllow to users to access to the Git Providers section\n\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"accessedProjects\"\n\t\t\t\t\t\t\trender={() => (\n\t\t\t\t\t\t\t\t<FormItem className=\"md:col-span-2\">\n\t\t\t\t\t\t\t\t\t<div className=\"mb-4\">\n\t\t\t\t\t\t\t\t\t\t<FormLabel className=\"text-base\">Projects</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\tSelect the Projects that the user can access\n\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t{projects?.length === 0 && (\n\t\t\t\t\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\tNo projects found\n\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t<div className=\"grid md:grid-cols-1 gap-4\">\n\t\t\t\t\t\t\t\t\t\t{projects?.map((project, projectIndex) => {\n\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={`project-${projectIndex}`}\n\t\t\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"accessedProjects\"\n\t\t\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={project.projectId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex flex-col items-start rounded-lg p-4 border\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{/* Project Header */}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-4 items-center w-full\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Checkbox\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tchecked={field.value?.includes(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tproject.projectId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={(checked) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (checked) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Add the project\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange([\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t...(field.value || []),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tproject.projectId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Remove the project\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.value?.filter(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(value) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue !== project.projectId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Also remove all environments and services from this project\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst currentEnvs =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.getValues(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"accessedEnvironments\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) || [];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst currentServices =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.getValues(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"accessedServices\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) || [];\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Get all environment IDs from this project\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst projectEnvIds =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tproject.environments.map(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(env) => env.environmentId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Get all service IDs from this project\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst projectServiceIds =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tproject.environments.flatMap(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(env) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\textractServices(env).map(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(service) => service.id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Remove environments and services from this project\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"accessedEnvironments\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcurrentEnvs.filter(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(envId) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t!projectEnvIds.includes(envId),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"accessedServices\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcurrentServices.filter(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(serviceId) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t!projectServiceIds.includes(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tserviceId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel className=\"text-base font-semibold text-primary\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{project.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{/* Environments */}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"ml-6 w-full space-y-3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{project.environments.length === 0 && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tNo environments found\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{project.environments.map(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(environment, envIndex) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst services =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\textractServices(environment);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={`env-${envIndex}`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"border-l-2 border-muted pl-4\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{/* Environment Header with Checkbox */}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={`env-${envIndex}`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"accessedEnvironments\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trender={({ field: envField }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem className=\"flex flex-row items-center space-x-3 space-y-0 mb-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Checkbox\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tchecked={envField.value?.includes(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenvironment.environmentId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tchecked,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (checked) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Add the environment\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenvField.onChange([\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t...(envField.value ||\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[]),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenvironment.environmentId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t]);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Auto-select the project if not already selected\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst currentProjects =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.getValues(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"accessedProjects\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) || [];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t!currentProjects.includes(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tproject.projectId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"accessedProjects\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t...currentProjects,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tproject.projectId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Remove the environment\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenvField.onChange(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenvField.value?.filter(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(value) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue !==\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenvironment.environmentId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Also remove all services from this environment\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst currentServices =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.getValues(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"accessedServices\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) || [];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst environmentServiceIds =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tservices.map(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(service) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tservice.id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"accessedServices\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcurrentServices.filter(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(serviceId) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t!environmentServiceIds.includes(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tserviceId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"w-2 h-2 bg-blue-500 rounded-full\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel className=\"text-sm font-medium text-foreground cursor-pointer\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{environment.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-xs text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t({services.length} services)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{/* Services */}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"ml-4 space-y-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{services.length === 0 && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-xs text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tNo services found\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{services.map(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(service, serviceIndex) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={`service-${serviceIndex}`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"accessedServices\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trender={({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield: serviceField,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={service.id}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex flex-row items-center space-x-3 space-y-0\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Checkbox\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tchecked={serviceField.value?.includes(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tservice.id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tchecked,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (checked) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Add the service\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tserviceField.onChange(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t...(serviceField.value ||\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[]),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tservice.id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Auto-select the environment if not already selected\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst currentEnvs =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.getValues(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"accessedEnvironments\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) || [];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t!currentEnvs.includes(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenvironment.environmentId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"accessedEnvironments\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t...currentEnvs,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenvironment.environmentId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Auto-select the project if not already selected\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst currentProjects =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.getValues(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"accessedProjects\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) || [];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t!currentProjects.includes(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tproject.projectId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"accessedProjects\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t...currentProjects,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tproject.projectId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Remove the service\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tserviceField.onChange(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tserviceField.value?.filter(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(value) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue !==\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tservice.id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={`w-1.5 h-1.5 rounded-full ${\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tservice.type ===\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"application\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"bg-green-500\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: service.type ===\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"compose\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"bg-purple-500\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"bg-orange-500\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel className=\"text-sm text-muted-foreground cursor-pointer\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{service.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-xs text-muted-foreground/70 capitalize\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t({service.type})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<DialogFooter className=\"flex w-full flex-row justify-end md:col-span-2\">\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tisLoading={isPending}\n\t\t\t\t\t\t\t\tform=\"hook-form-add-permissions\"\n\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tUpdate\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</DialogFooter>\n\t\t\t\t\t</form>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/users/change-role.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport { DropdownMenuItem } from \"@/components/ui/dropdown-menu\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { api } from \"@/utils/api\";\n\nconst changeRoleSchema = z.object({\n\trole: z.string().min(1),\n});\n\ntype ChangeRoleSchema = z.infer<typeof changeRoleSchema>;\n\ninterface Props {\n\tmemberId: string;\n\tcurrentRole: string;\n\tuserEmail: string;\n}\n\nexport const ChangeRole = ({ memberId, currentRole, userEmail }: Props) => {\n\tconst [isOpen, setIsOpen] = useState(false);\n\tconst utils = api.useUtils();\n\n\tconst { data: customRoles } = api.customRole.all.useQuery(undefined, {\n\t\tenabled: isOpen,\n\t});\n\n\tconst { mutateAsync, isError, error, isPending } =\n\t\tapi.organization.updateMemberRole.useMutation();\n\n\tconst form = useForm<ChangeRoleSchema>({\n\t\tdefaultValues: {\n\t\t\trole: currentRole,\n\t\t},\n\t\tresolver: zodResolver(changeRoleSchema),\n\t});\n\n\tuseEffect(() => {\n\t\tif (isOpen) {\n\t\t\tform.reset({\n\t\t\t\trole: currentRole,\n\t\t\t});\n\t\t}\n\t}, [form, currentRole, isOpen]);\n\n\tconst onSubmit = async (data: ChangeRoleSchema) => {\n\t\tawait mutateAsync({\n\t\t\tmemberId,\n\t\t\trole: data.role,\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(\"Role updated successfully\");\n\t\t\t\tawait utils.user.all.invalidate();\n\t\t\t\tsetIsOpen(false);\n\t\t\t})\n\t\t\t.catch((error) => {\n\t\t\t\ttoast.error(error?.message || \"Error updating role\");\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger className=\"\" asChild>\n\t\t\t\t<DropdownMenuItem\n\t\t\t\t\tclassName=\"w-full cursor-pointer\"\n\t\t\t\t\tonSelect={(e) => e.preventDefault()}\n\t\t\t\t>\n\t\t\t\t\tChange Role\n\t\t\t\t</DropdownMenuItem>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"max-h-[85vh] sm:max-w-lg\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Change User Role</DialogTitle>\n\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\tChange the role for <strong>{userEmail}</strong>\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t{isError && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tid=\"hook-form-change-role\"\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\tclassName=\"w-full space-y-4\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"role\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Role</FormLabel>\n\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\tonValueChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\tdefaultValue={field.value}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a role\" />\n\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"admin\">Admin</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t<SelectItem value=\"member\">Member</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t{customRoles?.map((customRole) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={customRole.role}\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={customRole.role}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{customRole.role}\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t<strong>Admin:</strong> Can manage users and settings.\n\t\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t\t<strong>Member:</strong> Limited permissions, can be\n\t\t\t\t\t\t\t\t\t\tcustomized.\n\t\t\t\t\t\t\t\t\t\t{customRoles && customRoles.length > 0 && (\n\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t\t\t\t<strong>Custom roles:</strong> Enterprise-defined\n\t\t\t\t\t\t\t\t\t\t\t\tpermissions.\n\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t\t<em className=\"text-muted-foreground text-xs\">\n\t\t\t\t\t\t\t\t\t\t\tNote: Owner role is intransferible.\n\t\t\t\t\t\t\t\t\t\t</em>\n\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</form>\n\t\t\t\t</Form>\n\n\t\t\t\t<DialogFooter>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tisLoading={isPending}\n\t\t\t\t\t\tform=\"hook-form-change-role\"\n\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t>\n\t\t\t\t\t\tUpdate Role\n\t\t\t\t\t</Button>\n\t\t\t\t</DialogFooter>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/users/show-invitations.tsx",
    "content": "import copy from \"copy-to-clipboard\";\nimport { format, isPast } from \"date-fns\";\nimport { Loader2, Mail, MoreHorizontal, Users } from \"lucide-react\";\nimport { toast } from \"sonner\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\tDropdownMenu,\n\tDropdownMenuContent,\n\tDropdownMenuItem,\n\tDropdownMenuLabel,\n\tDropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\nimport {\n\tTable,\n\tTableBody,\n\tTableCaption,\n\tTableCell,\n\tTableHead,\n\tTableHeader,\n\tTableRow,\n} from \"@/components/ui/table\";\nimport { authClient } from \"@/lib/auth-client\";\nimport { api } from \"@/utils/api\";\nimport { AddInvitation } from \"./add-invitation\";\n\nexport const ShowInvitations = () => {\n\tconst { data, isPending, refetch } =\n\t\tapi.organization.allInvitations.useQuery();\n\n\tconst { mutateAsync: removeInvitation } =\n\t\tapi.organization.removeInvitation.useMutation();\n\n\treturn (\n\t\t<div className=\"w-full\">\n\t\t\t<Card className=\"h-full bg-sidebar  p-2.5 rounded-xl  max-w-5xl mx-auto\">\n\t\t\t\t<div className=\"rounded-xl bg-background shadow-md \">\n\t\t\t\t\t<CardHeader className=\"\">\n\t\t\t\t\t\t<CardTitle className=\"text-xl flex flex-row gap-2\">\n\t\t\t\t\t\t\t<Mail className=\"size-6 text-muted-foreground self-center\" />\n\t\t\t\t\t\t\tInvitations\n\t\t\t\t\t\t</CardTitle>\n\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\tCreate invitations to your organization.\n\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<CardContent className=\"space-y-2 py-8 border-t\">\n\t\t\t\t\t\t{isPending ? (\n\t\t\t\t\t\t\t<div className=\"flex flex-row gap-2 items-center justify-center text-sm text-muted-foreground min-h-[25vh]\">\n\t\t\t\t\t\t\t\t<span>Loading...</span>\n\t\t\t\t\t\t\t\t<Loader2 className=\"animate-spin size-4\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{data?.length === 0 ? (\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col items-center gap-3  min-h-[25vh] justify-center\">\n\t\t\t\t\t\t\t\t\t\t<Users className=\"size-8 self-center text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t<span className=\"text-base text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\tInvite users to your organization\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t<AddInvitation />\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-4  min-h-[25vh]\">\n\t\t\t\t\t\t\t\t\t\t<Table>\n\t\t\t\t\t\t\t\t\t\t\t<TableCaption>See all invitations</TableCaption>\n\t\t\t\t\t\t\t\t\t\t\t<TableHeader>\n\t\t\t\t\t\t\t\t\t\t\t\t<TableRow>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TableHead className=\"w-[100px]\">Email</TableHead>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TableHead className=\"text-center\">Role</TableHead>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TableHead className=\"text-center\">Status</TableHead>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TableHead className=\"text-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tExpires At\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TableHead>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TableHead className=\"text-right\">Actions</TableHead>\n\t\t\t\t\t\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t\t\t\t\t\t</TableHeader>\n\t\t\t\t\t\t\t\t\t\t\t<TableBody>\n\t\t\t\t\t\t\t\t\t\t\t\t{data?.map((invitation) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst isExpired = isPast(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew Date(invitation.expiresAt),\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TableRow key={invitation.id}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TableCell className=\"w-[100px]\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{invitation.email}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TableCell className=\"text-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tinvitation.role === \"owner\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"default\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{invitation.role}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TableCell className=\"text-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tinvitation.status === \"pending\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: invitation.status === \"canceled\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"destructive\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"default\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{invitation.status}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TableCell className=\"text-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{format(new Date(invitation.expiresAt), \"PPpp\")}{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{isExpired ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(Expired)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TableCell>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TableCell className=\"text-right flex justify-end\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DropdownMenu>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DropdownMenuTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-8 w-8 p-0\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"sr-only\">Open menu</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<MoreHorizontal className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DropdownMenuTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DropdownMenuContent align=\"end\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DropdownMenuLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tActions\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DropdownMenuLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{!isExpired && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{invitation.status === \"pending\" && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-full cursor-pointer\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcopy(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t`${origin}/invitation?token=${invitation.id}`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Invitation Copied to clipboard\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCopy Invitation\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{invitation.status === \"pending\" && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-full cursor-pointer\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonSelect={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst result =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait authClient.organization.cancelInvitation(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tinvitationId: invitation.id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (result.error) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tresult.error.message,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Invitation deleted\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCancel Invitation\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-full cursor-pointer\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonSelect={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait removeInvitation({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tinvitationId: invitation.id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}).then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Invitation removed\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tRemove Invitation\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DropdownMenuContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DropdownMenu>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t\t\t</TableBody>\n\t\t\t\t\t\t\t\t\t\t</Table>\n\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-2 flex-wrap w-full justify-end mr-4\">\n\t\t\t\t\t\t\t\t\t\t\t<AddInvitation />\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</CardContent>\n\t\t\t\t</div>\n\t\t\t</Card>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/users/show-users.tsx",
    "content": "import { format } from \"date-fns\";\nimport { Loader2, MoreHorizontal, Users } from \"lucide-react\";\nimport { toast } from \"sonner\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { DialogAction } from \"@/components/shared/dialog-action\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\tDropdownMenu,\n\tDropdownMenuContent,\n\tDropdownMenuItem,\n\tDropdownMenuLabel,\n\tDropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\nimport {\n\tTable,\n\tTableBody,\n\tTableCell,\n\tTableHead,\n\tTableHeader,\n\tTableRow,\n} from \"@/components/ui/table\";\nimport { authClient } from \"@/lib/auth-client\";\nimport { api } from \"@/utils/api\";\nimport { AddUserPermissions } from \"./add-permissions\";\nimport { ChangeRole } from \"./change-role\";\n\nexport const ShowUsers = () => {\n\tconst { data: isCloud } = api.settings.isCloud.useQuery();\n\tconst { data, isPending, refetch } = api.user.all.useQuery();\n\tconst { mutateAsync } = api.user.remove.useMutation();\n\tconst { data: permissions } = api.user.getPermissions.useQuery();\n\tconst { data: hasValidLicense } =\n\t\tapi.licenseKey.haveValidLicenseKey.useQuery();\n\n\tconst utils = api.useUtils();\n\tconst { data: session } = api.user.session.useQuery();\n\n\tconst FREE_ROLES = [\"owner\", \"admin\", \"member\"];\n\tconst membersWithCustomRoles = data?.filter(\n\t\t(member) => !FREE_ROLES.includes(member.role),\n\t);\n\tconst hasCustomRolesWithoutLicense =\n\t\t!hasValidLicense && (membersWithCustomRoles?.length ?? 0) > 0;\n\n\treturn (\n\t\t<div className=\"w-full\">\n\t\t\t<Card className=\"h-full bg-sidebar  p-2.5 rounded-xl  max-w-5xl mx-auto\">\n\t\t\t\t<div className=\"rounded-xl bg-background shadow-md \">\n\t\t\t\t\t<CardHeader className=\"\">\n\t\t\t\t\t\t<CardTitle className=\"text-xl flex flex-row gap-2\">\n\t\t\t\t\t\t\t<Users className=\"size-6 text-muted-foreground self-center\" />\n\t\t\t\t\t\t\tUsers\n\t\t\t\t\t\t</CardTitle>\n\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\tAdd your users to your Dokploy account.\n\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<CardContent className=\"space-y-2 py-8 border-t\">\n\t\t\t\t\t\t{isPending ? (\n\t\t\t\t\t\t\t<div className=\"flex flex-row gap-2 items-center justify-center text-sm text-muted-foreground min-h-[25vh]\">\n\t\t\t\t\t\t\t\t<span>Loading...</span>\n\t\t\t\t\t\t\t\t<Loader2 className=\"animate-spin size-4\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{data?.length === 0 ? (\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col items-center gap-3  min-h-[25vh] justify-center\">\n\t\t\t\t\t\t\t\t\t\t<Users className=\"size-8 self-center text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t<span className=\"text-base text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\tInvite users to your Dokploy account\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-4  min-h-[25vh]\">\n\t\t\t\t\t\t\t\t\t\t{hasCustomRolesWithoutLicense && (\n\t\t\t\t\t\t\t\t\t\t\t<AlertBlock type=\"warning\">\n\t\t\t\t\t\t\t\t\t\t\t\tYou have{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t{membersWithCustomRoles?.length === 1\n\t\t\t\t\t\t\t\t\t\t\t\t\t? \"1 user\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t: `${membersWithCustomRoles?.length} users`}{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\tassigned to custom roles. Custom roles will not work\n\t\t\t\t\t\t\t\t\t\t\t\twithout a valid Enterprise license. Please activate your\n\t\t\t\t\t\t\t\t\t\t\t\tlicense or change these users to a free role (Admin or\n\t\t\t\t\t\t\t\t\t\t\t\tMember).\n\t\t\t\t\t\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t<Table>\n\t\t\t\t\t\t\t\t\t\t\t<TableHeader>\n\t\t\t\t\t\t\t\t\t\t\t\t<TableRow>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TableHead className=\"w-[100px]\">Email</TableHead>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TableHead className=\"text-center\">Role</TableHead>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TableHead className=\"text-center\">2FA</TableHead>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TableHead className=\"text-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tCreated At\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TableHead>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TableHead className=\"text-right\">Actions</TableHead>\n\t\t\t\t\t\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t\t\t\t\t\t</TableHeader>\n\t\t\t\t\t\t\t\t\t\t\t<TableBody>\n\t\t\t\t\t\t\t\t\t\t\t\t{data?.map((member) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst currentUserRole = data?.find(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t(m) => m.user.id === session?.user?.id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t)?.role;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Owner never has \"Edit Permissions\" (they're absolute owner)\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Other users can edit permissions if target is not themselves and target is a member/custom role\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst isStaticAdminOrOwner =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmember.role === \"owner\" || member.role === \"admin\";\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst canEditPermissions =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t!isStaticAdminOrOwner &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmember.user.id !== session?.user?.id;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Can change role based on hierarchy:\n\t\t\t\t\t\t\t\t\t\t\t\t\t// - Owner: Can change anyone's role (except themselves and other owners)\n\t\t\t\t\t\t\t\t\t\t\t\t\t// - Admin: Can only change member/custom roles (not other admins or owners)\n\t\t\t\t\t\t\t\t\t\t\t\t\t// - Owner role is intransferible\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst canChangeRole =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmember.role !== \"owner\" &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmember.user.id !== session?.user?.id &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t(currentUserRole === \"owner\" ||\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(currentUserRole === \"admin\" &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmember.role !== \"admin\"));\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst canDeleteMember =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpermissions?.member.delete ?? false;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Self-hosted: \"Delete User\" removes the user entirely\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Cloud: \"Unlink User\" removes from the organization only\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst canRemove =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmember.role !== \"owner\" &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmember.user.id !== session?.user?.id &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t(currentUserRole === \"owner\" ||\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(currentUserRole === \"admin\" &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmember.role !== \"admin\") ||\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(canDeleteMember && !isStaticAdminOrOwner));\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst canDelete = canRemove && !isCloud;\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst canUnlink = canRemove && !!isCloud;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst hasAnyAction =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcanEditPermissions ||\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcanChangeRole ||\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcanDelete ||\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcanUnlink;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TableRow key={member.id}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TableCell className=\"w-[100px]\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{member.user.email}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{member.user.id === session?.user?.id && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground ml-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(You)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TableCell className=\"text-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmember.role === \"owner\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"default\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{member.role}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TableCell className=\"text-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{member.user.twoFactorEnabled\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Enabled\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Disabled\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TableCell className=\"text-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{format(new Date(member.createdAt), \"PPpp\")}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TableCell>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TableCell className=\"text-right flex justify-end\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{hasAnyAction ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DropdownMenu>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DropdownMenuTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-8 w-8 p-0\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"sr-only\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tOpen menu\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<MoreHorizontal className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DropdownMenuTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DropdownMenuContent align=\"end\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DropdownMenuLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tActions\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DropdownMenuLabel>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{canChangeRole && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ChangeRole\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmemberId={member.id}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcurrentRole={member.role}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tuserEmail={member.user.email}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{canEditPermissions && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<AddUserPermissions\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tuserId={member.user.id}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trole={member.role}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{canDelete && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"Delete User\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to delete this user?\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"destructive\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait mutateAsync({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tuserId: member.user.id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"User deleted successfully\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.catch((err) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\terr?.message ||\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Error deleting user\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-full cursor-pointer text-red-500 hover:!text-red-600\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonSelect={(e) => e.preventDefault()}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDelete User\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{canUnlink && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"Unlink User\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to unlink this user?\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"destructive\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!isCloud) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst orgCount =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait utils.user.checkUserOrganizations.fetch(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tuserId: member.user.id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (orgCount === 1) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait mutateAsync({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tuserId: member.user.id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"User deleted successfully\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Error deleting user\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst { error } =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait authClient.organization.removeMember(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmemberIdOrEmail: member.id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!error) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"User unlinked successfully\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Error unlinking user\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-full cursor-pointer text-red-500 hover:!text-red-600\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonSelect={(e) => e.preventDefault()}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tUnlink User\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DropdownMenuContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DropdownMenu>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-8 w-8 p-0\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisabled\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"sr-only\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tNo actions available\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<MoreHorizontal className=\"h-4 w-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t\t\t</TableBody>\n\t\t\t\t\t\t\t\t\t\t</Table>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</CardContent>\n\t\t\t\t</div>\n\t\t\t</Card>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/web-domain.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { GlobeIcon } from \"lucide-react\";\nimport { useEffect } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { Switch } from \"@/components/ui/switch\";\nimport { api } from \"@/utils/api\";\n\nconst addServerDomain = z\n\t.object({\n\t\tdomain: z.string().trim().toLowerCase(),\n\t\tletsEncryptEmail: z.string(),\n\t\thttps: z.boolean().optional(),\n\t\tcertificateType: z.enum([\"letsencrypt\", \"none\", \"custom\"]),\n\t})\n\t.superRefine((data, ctx) => {\n\t\tif (data.https && !data.certificateType) {\n\t\t\tctx.addIssue({\n\t\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\t\tpath: [\"certificateType\"],\n\t\t\t\tmessage: \"Required\",\n\t\t\t});\n\t\t}\n\t\tif (\n\t\t\tdata.https &&\n\t\t\tdata.certificateType === \"letsencrypt\" &&\n\t\t\t!data.letsEncryptEmail\n\t\t) {\n\t\t\tctx.addIssue({\n\t\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\t\tmessage:\n\t\t\t\t\t\"LetsEncrypt email is required when certificate type is letsencrypt\",\n\t\t\t\tpath: [\"letsEncryptEmail\"],\n\t\t\t});\n\t\t}\n\t});\n\ntype AddServerDomain = z.infer<typeof addServerDomain>;\n\nexport const WebDomain = () => {\n\tconst { data, refetch } = api.settings.getWebServerSettings.useQuery();\n\tconst { mutateAsync, isPending } =\n\t\tapi.settings.assignDomainServer.useMutation();\n\n\tconst form = useForm<AddServerDomain>({\n\t\tdefaultValues: {\n\t\t\tdomain: \"\",\n\t\t\tcertificateType: \"none\",\n\t\t\tletsEncryptEmail: \"\",\n\t\t\thttps: false,\n\t\t},\n\t\tresolver: zodResolver(addServerDomain),\n\t});\n\tconst https = form.watch(\"https\");\n\tconst domain = form.watch(\"domain\") || \"\";\n\tconst host = data?.host || \"\";\n\tconst hasChanged = domain !== host;\n\tuseEffect(() => {\n\t\tif (data) {\n\t\t\tform.reset({\n\t\t\t\tdomain: data?.host || \"\",\n\t\t\t\tcertificateType: data?.certificateType || \"none\",\n\t\t\t\tletsEncryptEmail: data?.letsEncryptEmail || \"\",\n\t\t\t\thttps: data?.https || false,\n\t\t\t});\n\t\t}\n\t}, [form, form.reset, data]);\n\n\tconst onSubmit = async (data: AddServerDomain) => {\n\t\tawait mutateAsync({\n\t\t\thost: data.domain,\n\t\t\tletsEncryptEmail: data.letsEncryptEmail,\n\t\t\tcertificateType: data.certificateType,\n\t\t\thttps: data.https,\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\tawait refetch();\n\t\t\t\ttoast.success(\"Domain Assigned\");\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error assigning the domain\");\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<div className=\"w-full\">\n\t\t\t<Card className=\"h-full bg-sidebar  p-2.5 rounded-xl  max-w-5xl mx-auto\">\n\t\t\t\t<div className=\"rounded-xl bg-background shadow-md \">\n\t\t\t\t\t<CardHeader className=\"flex flex-row gap-2 flex-wrap justify-between items-center\">\n\t\t\t\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t\t\t\t<CardTitle className=\"text-xl flex flex-row gap-2\">\n\t\t\t\t\t\t\t\t<GlobeIcon className=\"size-6 text-muted-foreground self-center\" />\n\t\t\t\t\t\t\t\tServer Domain\n\t\t\t\t\t\t\t</CardTitle>\n\t\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\t\tAdd a domain to your server application.\n\t\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<CardContent className=\"space-y-2 py-6 border-t\">\n\t\t\t\t\t\t{/* Warning for GitHub webhook URL changes */}\n\t\t\t\t\t\t{hasChanged && (\n\t\t\t\t\t\t\t<AlertBlock type=\"warning\">\n\t\t\t\t\t\t\t\t<div className=\"space-y-2\">\n\t\t\t\t\t\t\t\t\t<p className=\"font-medium\">⚠️ Important: URL Change Impact</p>\n\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\tIf you change the Dokploy Server URL make sure to update\n\t\t\t\t\t\t\t\t\t\tyour Github Apps to keep the auto-deploy working and preview\n\t\t\t\t\t\t\t\t\t\tdeployments working.\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<Form {...form}>\n\t\t\t\t\t\t\t<form\n\t\t\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\t\t\tclassName=\"grid w-full gap-4 md:grid-cols-2\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"domain\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => {\n\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Domain</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-full\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder={\"dokploy.com\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"letsEncryptEmail\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => {\n\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Let's Encrypt Email</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-full\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder={\"Dp4kz@example.com\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"https\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem className=\"flex flex-row items-center justify-between p-3 mt-4 border rounded-lg shadow-sm w-full col-span-2\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>HTTPS</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\tAutomatically provision SSL Certificate.\n\t\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t{https && (\n\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\tname=\"certificateType\"\n\t\t\t\t\t\t\t\t\t\trender={({ field }) => {\n\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t<FormItem className=\"md:col-span-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Certificate Provider</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonValueChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a certificate\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value={\"none\"}>None</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem value={\"letsencrypt\"}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLet's Encrypt\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t<div className=\"flex w-full justify-end col-span-2\">\n\t\t\t\t\t\t\t\t\t<Button isLoading={isPending} type=\"submit\">\n\t\t\t\t\t\t\t\t\t\tSave\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t</Form>\n\t\t\t\t\t</CardContent>\n\t\t\t\t</div>\n\t\t\t</Card>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/web-server/docker-terminal-modal.tsx",
    "content": "import { Loader2 } from \"lucide-react\";\nimport dynamic from \"next/dynamic\";\nimport type React from \"react\";\nimport { useEffect, useState } from \"react\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectGroup,\n\tSelectItem,\n\tSelectLabel,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { api } from \"@/utils/api\";\nimport { badgeStateColor } from \"../../application/logs/show\";\n\nconst Terminal = dynamic(\n\t() =>\n\t\timport(\"@/components/dashboard/docker/terminal/docker-terminal\").then(\n\t\t\t(e) => e.DockerTerminal,\n\t\t),\n\t{\n\t\tssr: false,\n\t},\n);\n\ninterface Props {\n\tappName: string;\n\tchildren?: React.ReactNode;\n\tserverId?: string;\n\tappType?: \"stack\" | \"docker-compose\";\n}\n\nexport const DockerTerminalModal = ({\n\tchildren,\n\tappName,\n\tserverId,\n\tappType,\n}: Props) => {\n\tconst { data, isPending } = api.docker.getContainersByAppNameMatch.useQuery(\n\t\t{\n\t\t\tappName,\n\t\t\tappType,\n\t\t\tserverId,\n\t\t},\n\t\t{\n\t\t\tenabled: !!appName,\n\t\t},\n\t);\n\n\tconst [containerId, setContainerId] = useState<string | undefined>();\n\tconst [mainDialogOpen, setMainDialogOpen] = useState(false);\n\tconst [confirmDialogOpen, setConfirmDialogOpen] = useState(false);\n\n\tconst handleMainDialogOpenChange = (open: boolean) => {\n\t\tif (!open) {\n\t\t\tsetConfirmDialogOpen(true);\n\t\t} else {\n\t\t\tsetMainDialogOpen(true);\n\t\t}\n\t};\n\n\tconst handleConfirm = () => {\n\t\tsetConfirmDialogOpen(false);\n\t\tsetMainDialogOpen(false);\n\t};\n\n\tconst handleCancel = () => {\n\t\tsetConfirmDialogOpen(false);\n\t};\n\n\tuseEffect(() => {\n\t\tif (data && data?.length > 0) {\n\t\t\tsetContainerId(data[0]?.containerId);\n\t\t}\n\t}, [data]);\n\n\treturn (\n\t\t<Dialog open={mainDialogOpen} onOpenChange={handleMainDialogOpenChange}>\n\t\t\t<DialogTrigger asChild>{children}</DialogTrigger>\n\t\t\t<DialogContent\n\t\t\t\tclassName=\"max-h-[85vh] sm:max-w-7xl\"\n\t\t\t\tonEscapeKeyDown={(event) => event.preventDefault()}\n\t\t\t>\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Docker Terminal</DialogTitle>\n\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\tEasy way to access to docker container\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t<Select onValueChange={setContainerId} value={containerId}>\n\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t{isPending ? (\n\t\t\t\t\t\t\t<div className=\"flex flex-row gap-2 items-center justify-center text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t<span>Loading...</span>\n\t\t\t\t\t\t\t\t<Loader2 className=\"animate-spin size-4\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a container\" />\n\t\t\t\t\t\t)}\n\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t<SelectGroup>\n\t\t\t\t\t\t\t{data?.map((container) => (\n\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\tkey={container.containerId}\n\t\t\t\t\t\t\t\t\tvalue={container.containerId}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{container.name} ({container.containerId}){\" \"}\n\t\t\t\t\t\t\t\t\t<Badge variant={badgeStateColor(container.state)}>\n\t\t\t\t\t\t\t\t\t\t{container.state}\n\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t<SelectLabel>Containers ({data?.length})</SelectLabel>\n\t\t\t\t\t\t</SelectGroup>\n\t\t\t\t\t</SelectContent>\n\t\t\t\t</Select>\n\t\t\t\t<Terminal\n\t\t\t\t\tserverId={serverId || \"\"}\n\t\t\t\t\tid=\"terminal\"\n\t\t\t\t\tcontainerId={containerId || \"select-a-container\"}\n\t\t\t\t/>\n\t\t\t\t<Dialog open={confirmDialogOpen} onOpenChange={setConfirmDialogOpen}>\n\t\t\t\t\t<DialogContent onEscapeKeyDown={(event) => event.preventDefault()}>\n\t\t\t\t\t\t<DialogHeader>\n\t\t\t\t\t\t\t<DialogTitle>\n\t\t\t\t\t\t\t\tAre you sure you want to close the terminal?\n\t\t\t\t\t\t\t</DialogTitle>\n\t\t\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\t\t\tBy clicking the confirm button, the terminal will be closed.\n\t\t\t\t\t\t\t</DialogDescription>\n\t\t\t\t\t\t</DialogHeader>\n\t\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t\t<Button variant=\"outline\" onClick={handleCancel}>\n\t\t\t\t\t\t\t\tCancel\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t<Button onClick={handleConfirm}>Confirm</Button>\n\t\t\t\t\t\t</DialogFooter>\n\t\t\t\t\t</DialogContent>\n\t\t\t\t</Dialog>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/web-server/edit-traefik-env.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { CodeEditor } from \"@/components/shared/code-editor\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { useHealthCheckAfterMutation } from \"@/hooks/use-health-check-after-mutation\";\nimport { api } from \"@/utils/api\";\n\nconst schema = z.object({\n\tenv: z.string(),\n});\n\ntype Schema = z.infer<typeof schema>;\n\ninterface Props {\n\tchildren?: React.ReactNode;\n\tserverId?: string;\n}\n\nexport const EditTraefikEnv = ({ children, serverId }: Props) => {\n\tconst [canEdit, setCanEdit] = useState(true);\n\n\tconst { data } = api.settings.readTraefikEnv.useQuery({\n\t\tserverId,\n\t});\n\n\tconst { mutateAsync, isPending, error, isError } =\n\t\tapi.settings.writeTraefikEnv.useMutation();\n\n\tconst {\n\t\texecute: executeWithHealthCheck,\n\t\tisExecuting: isHealthCheckExecuting,\n\t} = useHealthCheckAfterMutation({\n\t\tinitialDelay: 5000,\n\t\tsuccessMessage: \"Traefik Env Updated\",\n\t});\n\n\tconst form = useForm<Schema>({\n\t\tdefaultValues: {\n\t\t\tenv: data || \"\",\n\t\t},\n\t\tdisabled: canEdit,\n\t\tresolver: zodResolver(schema),\n\t});\n\n\tuseEffect(() => {\n\t\tif (data) {\n\t\t\tform.reset({\n\t\t\t\tenv: data || \"\",\n\t\t\t});\n\t\t}\n\t}, [form, form.reset, data]);\n\n\tconst onSubmit = async (data: Schema) => {\n\t\ttry {\n\t\t\tawait executeWithHealthCheck(() =>\n\t\t\t\tmutateAsync({\n\t\t\t\t\tenv: data.env,\n\t\t\t\t\tserverId,\n\t\t\t\t}),\n\t\t\t);\n\t\t} catch {\n\t\t\ttoast.error(\"Error updating the Traefik env\");\n\t\t}\n\t};\n\n\t// Add keyboard shortcut for Ctrl+S/Cmd+S\n\tuseEffect(() => {\n\t\tconst handleKeyDown = (e: KeyboardEvent) => {\n\t\t\tif ((e.ctrlKey || e.metaKey) && e.key === \"s\" && !isPending && !canEdit) {\n\t\t\t\te.preventDefault();\n\t\t\t\tform.handleSubmit(onSubmit)();\n\t\t\t}\n\t\t};\n\n\t\tdocument.addEventListener(\"keydown\", handleKeyDown);\n\t\treturn () => {\n\t\t\tdocument.removeEventListener(\"keydown\", handleKeyDown);\n\t\t};\n\t}, [form, onSubmit, isPending, canEdit]);\n\n\treturn (\n\t\t<Dialog>\n\t\t\t<DialogTrigger asChild>{children}</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-4xl\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Update Traefik Environment</DialogTitle>\n\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\tUpdate the traefik environment variables\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t{isError && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tid=\"hook-form-update-server-traefik-config\"\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\tclassName=\"w-full space-y-4 relative overflow-auto\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"flex flex-col\">\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"env\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem className=\"relative\">\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Env</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<CodeEditor\n\t\t\t\t\t\t\t\t\t\t\t\tlanguage=\"properties\"\n\t\t\t\t\t\t\t\t\t\t\t\twrapperClassName=\"h-[35rem] font-mono\"\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder={`TRAEFIK_CERTIFICATESRESOLVERS_LETSENCRYPT_ACME_EMAIL=test@localhost.com\nTRAEFIK_CERTIFICATESRESOLVERS_LETSENCRYPT_STORAGE=/etc/dokploy/traefik/dynamic/acme.json\nTRAEFIK_CERTIFICATESRESOLVERS_LETSENCRYPT_HTTP_CHALLENGE=true\nTRAEFIK_CERTIFICATESRESOLVERS_LETSENCRYPT_HTTP_CHALLENGE_PRETTY=true\nTRAEFIK_CERTIFICATESRESOLVERS_LETSENCRYPT_HTTP_CHALLENGE_ENTRYPOINT=web\nTRAEFIK_CERTIFICATESRESOLVERS_LETSENCRYPT_HTTP_CHALLENGE_DNS_CHALLENGE=true\nTRAEFIK_CERTIFICATESRESOLVERS_LETSENCRYPT_HTTP_CHALLENGE_DNS_PROVIDER=cloudflare\n                                                    `}\n\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t<pre>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</pre>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex justify-end absolute z-50 right-6 top-0\">\n\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"shadow-sm\"\n\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetCanEdit(!canEdit);\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{canEdit ? \"Unlock\" : \"Lock\"}\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</form>\n\n\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tisLoading={isPending || isHealthCheckExecuting}\n\t\t\t\t\t\t\tdisabled={canEdit || isPending || isHealthCheckExecuting}\n\t\t\t\t\t\t\tform=\"hook-form-update-server-traefik-config\"\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tUpdate\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</DialogFooter>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/web-server/local-server-config.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { Settings } from \"lucide-react\";\nimport { useForm } from \"react-hook-form\";\nimport { z } from \"zod\";\nimport {\n\tAccordion,\n\tAccordionContent,\n\tAccordionItem,\n\tAccordionTrigger,\n} from \"@/components/ui/accordion\";\nimport { Button, buttonVariants } from \"@/components/ui/button\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { cn } from \"@/lib/utils\";\n\nconst Schema = z.object({\n\tport: z.number().min(1, \"Port must be higher than 0\"),\n\tusername: z.string().min(1, \"Username is required\"),\n});\n\ntype Schema = z.infer<typeof Schema>;\n\nconst DEFAULT_LOCAL_SERVER_DATA: Schema = {\n\tport: 22,\n\tusername: \"root\",\n};\n\n/** Returns local server data for use with local server terminal */\nexport const getLocalServerData = () => {\n\ttry {\n\t\tconst localServerData = localStorage.getItem(\"localServerData\");\n\t\tconst parsedLocalServerData = localServerData\n\t\t\t? (JSON.parse(localServerData) as typeof DEFAULT_LOCAL_SERVER_DATA)\n\t\t\t: DEFAULT_LOCAL_SERVER_DATA;\n\n\t\treturn parsedLocalServerData;\n\t} catch {\n\t\treturn DEFAULT_LOCAL_SERVER_DATA;\n\t}\n};\n\ninterface Props {\n\tonSave: () => void;\n}\n\nconst LocalServerConfig = ({ onSave }: Props) => {\n\tconst form = useForm<Schema>({\n\t\tdefaultValues: getLocalServerData(),\n\t\tresolver: zodResolver(Schema),\n\t});\n\n\tconst onSubmit = (data: Schema) => {\n\t\tlocalStorage.setItem(\"localServerData\", JSON.stringify(data));\n\t\tform.reset(data);\n\t\tonSave();\n\t};\n\n\treturn (\n\t\t<Accordion collapsible type=\"single\">\n\t\t\t<AccordionItem value=\"connectionSettings\">\n\t\t\t\t<AccordionTrigger\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\tbuttonVariants({ variant: \"ghost\" }),\n\t\t\t\t\t\t\"hover:no-underline px-1 mb-2 active:hover:transform-none\",\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t<div className=\"flex flex-row items-center gap-2 justify-between w-full\">\n\t\t\t\t\t\t<div className=\"flex flex-row gap-2 items-center\">\n\t\t\t\t\t\t\t<Settings className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t<span className=\"dark:hover:text-white\">Connection settings</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</AccordionTrigger>\n\n\t\t\t\t<AccordionContent className=\"px-1 flex flex-col gap-2\">\n\t\t\t\t\t<Form {...form}>\n\t\t\t\t\t\t<form\n\t\t\t\t\t\t\tid=\"hook-form-add-server\"\n\t\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\t\tclassName=\"w-full grid grid-cols-2 gap-4\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"port\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Port</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst value = e.target.value;\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (value === \"\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst number = Number.parseInt(value, 10);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!Number.isNaN(number)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(number);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"username\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Username</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"root\" {...field} />\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</form>\n\t\t\t\t\t</Form>\n\n\t\t\t\t\t<Button\n\t\t\t\t\t\tform=\"hook-form-add-server\"\n\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\tclassName=\"ml-auto\"\n\t\t\t\t\t\tdisabled={!form.formState.isDirty}\n\t\t\t\t\t>\n\t\t\t\t\t\tSave\n\t\t\t\t\t</Button>\n\t\t\t\t</AccordionContent>\n\t\t\t</AccordionItem>\n\t\t</Accordion>\n\t);\n};\n\nexport default LocalServerConfig;\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/web-server/manage-traefik-ports.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { ArrowRightLeft, Plus, Trash2 } from \"lucide-react\";\nimport type React from \"react\";\nimport { useEffect, useState } from \"react\";\nimport { useFieldArray, useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport { Card, CardContent } from \"@/components/ui/card\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { ScrollArea } from \"@/components/ui/scroll-area\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectGroup,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { useHealthCheckAfterMutation } from \"@/hooks/use-health-check-after-mutation\";\nimport { api } from \"@/utils/api\";\n\ninterface Props {\n\tchildren: React.ReactNode;\n\tserverId?: string;\n}\n\nconst PortSchema = z.object({\n\ttargetPort: z.number().min(1, \"Target port is required\"),\n\tpublishedPort: z.number().min(1, \"Published port is required\"),\n\tprotocol: z.enum([\"tcp\", \"udp\", \"sctp\"]),\n});\n\nconst TraefikPortsSchema = z.object({\n\tports: z.array(PortSchema),\n});\n\ntype TraefikPortsForm = z.infer<typeof TraefikPortsSchema>;\n\nexport const ManageTraefikPorts = ({ children, serverId }: Props) => {\n\tconst [open, setOpen] = useState(false);\n\n\tconst form = useForm<TraefikPortsForm>({\n\t\tresolver: zodResolver(TraefikPortsSchema),\n\t\tdefaultValues: {\n\t\t\tports: [],\n\t\t},\n\t});\n\n\tconst { fields, append, remove } = useFieldArray({\n\t\tcontrol: form.control,\n\t\tname: \"ports\",\n\t});\n\n\tconst { data: currentPorts, refetch: refetchPorts } =\n\t\tapi.settings.getTraefikPorts.useQuery({\n\t\t\tserverId,\n\t\t});\n\n\tconst { mutateAsync: updatePorts, isPending } =\n\t\tapi.settings.updateTraefikPorts.useMutation();\n\n\tconst {\n\t\texecute: executeWithHealthCheck,\n\t\tisExecuting: isHealthCheckExecuting,\n\t} = useHealthCheckAfterMutation({\n\t\tinitialDelay: 5000,\n\t\tsuccessMessage: \"Ports updated successfully\",\n\t\tonSuccess: () => {\n\t\t\trefetchPorts();\n\t\t\tsetOpen(false);\n\t\t},\n\t});\n\n\tuseEffect(() => {\n\t\tif (currentPorts) {\n\t\t\tform.reset({\n\t\t\t\tports: currentPorts.map((port) => ({\n\t\t\t\t\t...port,\n\t\t\t\t\tprotocol: port.protocol as \"tcp\" | \"udp\" | \"sctp\",\n\t\t\t\t})),\n\t\t\t});\n\t\t}\n\t}, [currentPorts, form]);\n\n\tconst handleAddPort = () => {\n\t\tappend({ targetPort: 0, publishedPort: 0, protocol: \"tcp\" });\n\t};\n\n\tconst onSubmit = async (data: TraefikPortsForm) => {\n\t\ttry {\n\t\t\tawait executeWithHealthCheck(() =>\n\t\t\t\tupdatePorts({\n\t\t\t\t\tserverId,\n\t\t\t\t\tadditionalPorts: data.ports,\n\t\t\t\t}),\n\t\t\t);\n\t\t\tsetOpen(false);\n\t\t} catch (error) {\n\t\t\ttoast.error((error as Error).message || \"Error updating Traefik ports\");\n\t\t}\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<button type=\"button\" onClick={() => setOpen(true)}>\n\t\t\t\t{children}\n\t\t\t</button>\n\t\t\t<Dialog open={open} onOpenChange={setOpen}>\n\t\t\t\t<DialogContent className=\"sm:max-w-3xl\">\n\t\t\t\t\t<DialogHeader>\n\t\t\t\t\t\t<DialogTitle className=\"flex items-center gap-2 text-xl\">\n\t\t\t\t\t\t\tAdditional Port Mappings\n\t\t\t\t\t\t</DialogTitle>\n\t\t\t\t\t\t<DialogDescription className=\"text-base w-full\">\n\t\t\t\t\t\t\t<div className=\"flex items-center justify-between\">\n\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t\t\t\t\t\tAdd or remove additional ports for Traefik\n\t\t\t\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t{fields.length} port mapping{fields.length !== 1 ? \"s\" : \"\"}{\" \"}\n\t\t\t\t\t\t\t\t\t\tconfigured\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tonClick={handleAddPort}\n\t\t\t\t\t\t\t\t\tvariant=\"default\"\n\t\t\t\t\t\t\t\t\tclassName=\"gap-2\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Plus className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\tAdd Mapping\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</DialogDescription>\n\t\t\t\t\t</DialogHeader>\n\n\t\t\t\t\t<Form {...form}>\n\t\t\t\t\t\t<form onSubmit={form.handleSubmit(onSubmit)} className=\"space-y-6\">\n\t\t\t\t\t\t\t<div className=\"grid gap-6 py-4\">\n\t\t\t\t\t\t\t\t{fields.length === 0 ? (\n\t\t\t\t\t\t\t\t\t<div className=\"flex w-full flex-col items-center justify-center gap-3 pt-10\">\n\t\t\t\t\t\t\t\t\t\t<ArrowRightLeft className=\"size-8 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t<span className=\"text-base text-muted-foreground text-center\">\n\t\t\t\t\t\t\t\t\t\t\tNo port mappings configured\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground text-center\">\n\t\t\t\t\t\t\t\t\t\t\tAdd one to get started\n\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<ScrollArea className=\"pr-4\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"grid gap-4\">\n\t\t\t\t\t\t\t\t\t\t\t{fields.map((field, index) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<Card key={field.id} className=\"bg-transparent\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CardContent className=\"grid grid-cols-4  gap-4 p-4 transparent\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tname={`ports.${index}.targetPort`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel className=\"text-sm font-medium text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tTarget Port\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst value = e.target.value;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue === \"\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: Number(value),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value || \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"e.g. 8080\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tname={`ports.${index}.publishedPort`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel className=\"text-sm font-medium text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tPublished Port\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst value = e.target.value;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue === \"\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: Number(value),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value || \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"e.g. 80\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tname={`ports.${index}.protocol`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormLabel className=\"text-sm font-medium text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tProtocol\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonValueChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdefaultValue={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a protocol\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{[\"tcp\", \"udp\", \"sctp\"].map(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(protocol) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={protocol}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={protocol}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{protocol}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-end\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => remove(index)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-muted-foreground hover:text-destructive\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Trash2 className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t\t\t\t\t\t\t\t</Card>\n\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</ScrollArea>\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{fields.length > 0 && (\n\t\t\t\t\t\t\t\t\t<AlertBlock type=\"info\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t<strong>\n\t\t\t\t\t\t\t\t\t\t\t\t\tEach port mapping defines how external traffic reaches\n\t\t\t\t\t\t\t\t\t\t\t\t\tyour containers through Traefik.\n\t\t\t\t\t\t\t\t\t\t\t\t</strong>\n\t\t\t\t\t\t\t\t\t\t\t\t<ul className=\"pt-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<strong>Target Port:</strong> The port inside your\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontainer that the service is listening on.\n\t\t\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<strong>Published Port:</strong> The port on your\n\t\t\t\t\t\t\t\t\t\t\t\t\t\thost machine that will be mapped to the target port.\n\t\t\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"mt-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\tAll ports are bound directly to the host machine,\n\t\t\t\t\t\t\t\t\t\t\t\t\tallowing Traefik to handle incoming traffic and route\n\t\t\t\t\t\t\t\t\t\t\t\t\tit appropriately to your services.\n\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t<AlertBlock type=\"warning\">\n\t\t\t\t\t\t\t\t\tThe Traefik container will be recreated from scratch. This\n\t\t\t\t\t\t\t\t\tmeans the container will be deleted and created again, which\n\t\t\t\t\t\t\t\t\tmay cause downtime in your applications.\n\t\t\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t\t\tvariant=\"default\"\n\t\t\t\t\t\t\t\t\tclassName=\"text-sm\"\n\t\t\t\t\t\t\t\t\tisLoading={isPending || isHealthCheckExecuting}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tSave\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</DialogFooter>\n\t\t\t\t\t\t</form>\n\t\t\t\t\t</Form>\n\t\t\t\t</DialogContent>\n\t\t\t</Dialog>\n\t\t</>\n\t);\n};\n\nexport default ManageTraefikPorts;\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/web-server/show-modal-logs.tsx",
    "content": "import { Loader2 } from \"lucide-react\";\nimport dynamic from \"next/dynamic\";\nimport type React from \"react\";\nimport { useEffect, useState } from \"react\";\nimport { Badge } from \"@/components/ui/badge\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport { Label } from \"@/components/ui/label\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectGroup,\n\tSelectItem,\n\tSelectLabel,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { api } from \"@/utils/api\";\nimport { badgeStateColor } from \"../../application/logs/show\";\n\nexport const DockerLogsId = dynamic(\n\t() =>\n\t\timport(\"@/components/dashboard/docker/logs/docker-logs-id\").then(\n\t\t\t(e) => e.DockerLogsId,\n\t\t),\n\t{\n\t\tssr: false,\n\t},\n);\n\ninterface Props {\n\tappName: string;\n\tchildren?: React.ReactNode;\n\tserverId?: string;\n\ttype?: \"standalone\" | \"swarm\";\n}\n\nexport const ShowModalLogs = ({\n\tappName,\n\tchildren,\n\tserverId,\n\ttype = \"swarm\",\n}: Props) => {\n\tconst { data, isPending } = api.docker.getContainersByAppLabel.useQuery(\n\t\t{\n\t\t\tappName,\n\t\t\tserverId,\n\t\t\ttype,\n\t\t},\n\t\t{\n\t\t\tenabled: !!appName,\n\t\t},\n\t);\n\tconst [containerId, setContainerId] = useState<string | undefined>();\n\n\tuseEffect(() => {\n\t\tif (data && data?.length > 0) {\n\t\t\tsetContainerId(data[0]?.containerId);\n\t\t}\n\t}, [data]);\n\treturn (\n\t\t<Dialog>\n\t\t\t<DialogTrigger asChild>{children}</DialogTrigger>\n\t\t\t<DialogContent className=\"max-h-[85vh]  sm:max-w-7xl\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>View Logs</DialogTitle>\n\t\t\t\t\t<DialogDescription>View the logs for {appName}</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t<div className=\"flex flex-col gap-4 pt-2.5\">\n\t\t\t\t\t<Label>Select a container to view logs</Label>\n\t\t\t\t\t<Select onValueChange={setContainerId} value={containerId}>\n\t\t\t\t\t\t<SelectTrigger>\n\t\t\t\t\t\t\t{isPending ? (\n\t\t\t\t\t\t\t\t<div className=\"flex flex-row gap-2 items-center justify-center text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t<span>Loading...</span>\n\t\t\t\t\t\t\t\t\t<Loader2 className=\"animate-spin size-4\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<SelectValue placeholder=\"Select a container\" />\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t<SelectGroup>\n\t\t\t\t\t\t\t\t{data?.map((container) => (\n\t\t\t\t\t\t\t\t\t<SelectItem\n\t\t\t\t\t\t\t\t\t\tkey={container.containerId}\n\t\t\t\t\t\t\t\t\t\tvalue={container.containerId}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{container.name} ({container.containerId}){\" \"}\n\t\t\t\t\t\t\t\t\t\t<Badge variant={badgeStateColor(container.state)}>\n\t\t\t\t\t\t\t\t\t\t\t{container.state}\n\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t<SelectLabel>Containers ({data?.length})</SelectLabel>\n\t\t\t\t\t\t\t</SelectGroup>\n\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t</Select>\n\t\t\t\t\t<DockerLogsId\n\t\t\t\t\t\tcontainerId={containerId || \"\"}\n\t\t\t\t\t\tserverId={serverId}\n\t\t\t\t\t\trunType=\"native\"\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/web-server/terminal-modal.tsx",
    "content": "import dynamic from \"next/dynamic\";\nimport type React from \"react\";\nimport { useState } from \"react\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport { DropdownMenuItem } from \"@/components/ui/dropdown-menu\";\nimport { api } from \"@/utils/api\";\nimport LocalServerConfig from \"./local-server-config\";\n\nconst Terminal = dynamic(() => import(\"./terminal\").then((e) => e.Terminal), {\n\tssr: false,\n});\n\nconst getTerminalKey = () => {\n\treturn `terminal-${Date.now()}`;\n};\n\ninterface Props {\n\tchildren?: React.ReactNode;\n\tserverId: string;\n\tasButton?: boolean;\n}\n\nexport const TerminalModal = ({\n\tchildren,\n\tserverId,\n\tasButton = false,\n}: Props) => {\n\tconst [terminalKey, setTerminalKey] = useState<string>(getTerminalKey());\n\tconst [isOpen, setIsOpen] = useState(false);\n\tconst isLocalServer = serverId === \"local\";\n\n\tconst { data } = api.server.one.useQuery(\n\t\t{\n\t\t\tserverId,\n\t\t},\n\t\t{ enabled: !!serverId && !isLocalServer },\n\t);\n\n\tconst handleLocalServerConfigSave = () => {\n\t\t// Rerender Terminal component to reconnect using new component key when saving local server config\n\t\tsetTerminalKey(getTerminalKey());\n\t};\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t{asButton ? (\n\t\t\t\t<DialogTrigger asChild>{children}</DialogTrigger>\n\t\t\t) : (\n\t\t\t\t<DropdownMenuItem\n\t\t\t\t\tclassName=\"w-full cursor-pointer space-x-3\"\n\t\t\t\t\tonSelect={(e) => {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\tsetIsOpen(true);\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</DropdownMenuItem>\n\t\t\t)}\n\t\t\t<DialogContent\n\t\t\t\tclassName=\"sm:max-w-7xl\"\n\t\t\t\tonEscapeKeyDown={(event) => event.preventDefault()}\n\t\t\t>\n\t\t\t\t<DialogHeader className=\"flex flex-col gap-1\">\n\t\t\t\t\t<DialogTitle>Terminal ({data?.name ?? serverId})</DialogTitle>\n\t\t\t\t\t<DialogDescription>Easy way to access the server</DialogDescription>\n\t\t\t\t</DialogHeader>\n\n\t\t\t\t{isLocalServer && (\n\t\t\t\t\t<LocalServerConfig onSave={handleLocalServerConfigSave} />\n\t\t\t\t)}\n\n\t\t\t\t<div className=\"flex flex-col gap-4 h-[552px]\">\n\t\t\t\t\t<Terminal id=\"terminal\" key={terminalKey} serverId={serverId} />\n\t\t\t\t</div>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/web-server/terminal.tsx",
    "content": "import { Terminal as XTerm } from \"@xterm/xterm\";\nimport type React from \"react\";\nimport { useEffect, useRef } from \"react\";\nimport { FitAddon } from \"xterm-addon-fit\";\nimport \"@xterm/xterm/css/xterm.css\";\nimport { AttachAddon } from \"@xterm/addon-attach\";\nimport { ClipboardAddon } from \"@xterm/addon-clipboard\";\nimport { useTheme } from \"next-themes\";\nimport { getLocalServerData } from \"./local-server-config\";\n\ninterface Props {\n\tid: string;\n\tserverId: string;\n}\n\nexport const Terminal: React.FC<Props> = ({ id, serverId }) => {\n\tconst termRef = useRef<HTMLDivElement>(null);\n\tconst initialized = useRef<boolean>(false);\n\tconst { resolvedTheme } = useTheme();\n\tuseEffect(() => {\n\t\tif (initialized.current) {\n\t\t\t// Required in strict mode to avoid issues due to double wss connection\n\t\t\treturn;\n\t\t}\n\n\t\tinitialized.current = true;\n\t\tconst container = document.getElementById(id);\n\t\tif (container) {\n\t\t\tcontainer.innerHTML = \"\";\n\t\t}\n\t\tconst term = new XTerm({\n\t\t\tcursorBlink: true,\n\t\t\tlineHeight: 1.4,\n\t\t\tconvertEol: true,\n\t\t\ttheme: {\n\t\t\t\tcursor: resolvedTheme === \"light\" ? \"#000000\" : \"transparent\",\n\t\t\t\tbackground: \"rgba(0, 0, 0, 0)\",\n\t\t\t\tforeground: \"currentColor\",\n\t\t\t},\n\t\t});\n\n\t\tconst addonFit = new FitAddon();\n\n\t\tconst protocol = window.location.protocol === \"https:\" ? \"wss:\" : \"ws:\";\n\n\t\tconst urlParams = new URLSearchParams();\n\t\turlParams.set(\"serverId\", serverId);\n\n\t\tif (serverId === \"local\") {\n\t\t\tconst { port, username } = getLocalServerData();\n\t\t\turlParams.set(\"port\", port.toString());\n\t\t\turlParams.set(\"username\", username);\n\t\t}\n\n\t\tconst wsUrl = `${protocol}//${window.location.host}/terminal?${urlParams}`;\n\n\t\tconst ws = new WebSocket(wsUrl);\n\t\tconst addonAttach = new AttachAddon(ws);\n\t\tconst clipboardAddon = new ClipboardAddon();\n\t\tterm.loadAddon(clipboardAddon);\n\n\t\t// @ts-ignore\n\t\tterm.open(termRef.current);\n\t\t// @ts-ignore\n\t\tterm.loadAddon(addonFit);\n\t\tterm.loadAddon(addonAttach);\n\t\taddonFit.fit();\n\t\treturn () => {\n\t\t\tws.readyState === WebSocket.OPEN && ws.close();\n\t\t};\n\t}, [id, serverId]);\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<div className=\"w-full h-full bg-transparent border rounded-lg p-2\">\n\t\t\t\t<div id={id} ref={termRef} className=\"rounded-xl\" />\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/web-server/toggle-auto-check-updates.tsx",
    "content": "import { useState } from \"react\";\nimport { Label } from \"@/components/ui/label\";\nimport { Switch } from \"@/components/ui/switch\";\n\nexport const ToggleAutoCheckUpdates = ({ disabled }: { disabled: boolean }) => {\n\tconst [enabled, setEnabled] = useState<boolean>(\n\t\tlocalStorage.getItem(\"enableAutoCheckUpdates\") === \"true\",\n\t);\n\n\tconst handleToggle = (checked: boolean) => {\n\t\tsetEnabled(checked);\n\t\tlocalStorage.setItem(\"enableAutoCheckUpdates\", String(checked));\n\t};\n\n\treturn (\n\t\t<div className=\"flex items-center gap-4\">\n\t\t\t<Switch\n\t\t\t\tchecked={enabled}\n\t\t\t\tonCheckedChange={handleToggle}\n\t\t\t\tid=\"autoCheckUpdatesToggle\"\n\t\t\t\tdisabled={disabled}\n\t\t\t/>\n\t\t\t<Label className=\"text-primary\" htmlFor=\"autoCheckUpdatesToggle\">\n\t\t\t\tAutomatically check for new updates\n\t\t\t</Label>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/web-server/update-server-ip.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { RefreshCw } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { api } from \"@/utils/api\";\n\nconst schema = z.object({\n\tserverIp: z.string(),\n});\n\ntype Schema = z.infer<typeof schema>;\n\ninterface Props {\n\tchildren?: React.ReactNode;\n\tserverId?: string;\n}\n\nexport const UpdateServerIp = ({ children }: Props) => {\n\tconst [isOpen, setIsOpen] = useState(false);\n\n\tconst { data, refetch } = api.settings.getWebServerSettings.useQuery();\n\tconst { data: ip } = api.server.publicIp.useQuery();\n\n\tconst { mutateAsync, isPending, error, isError } =\n\t\tapi.settings.updateServerIp.useMutation();\n\n\tconst form = useForm<Schema>({\n\t\tdefaultValues: {\n\t\t\tserverIp: data?.serverIp || \"\",\n\t\t},\n\t\tresolver: zodResolver(schema),\n\t});\n\n\tuseEffect(() => {\n\t\tif (data) {\n\t\t\tform.reset({\n\t\t\t\tserverIp: data.serverIp || \"\",\n\t\t\t});\n\t\t}\n\t}, [form, form.reset, data]);\n\n\tconst setCurrentIp = () => {\n\t\tif (!ip) return;\n\t\tform.setValue(\"serverIp\", ip);\n\t};\n\n\tconst onSubmit = async (data: Schema) => {\n\t\tawait mutateAsync({\n\t\t\tserverIp: data.serverIp,\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(\"Server IP Updated\");\n\t\t\t\tawait refetch();\n\t\t\t\tsetIsOpen(false);\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\"Error updating the IP of the server\");\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t<DialogTrigger asChild>{children}</DialogTrigger>\n\t\t\t<DialogContent>\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Update Server IP</DialogTitle>\n\t\t\t\t\t<DialogDescription>Update the IP of the server</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t{isError && <AlertBlock type=\"error\">{error?.message}</AlertBlock>}\n\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tid=\"hook-form-update-server-ip\"\n\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"serverIp\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Server IP</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl className=\"flex gap-2\">\n\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t<Input {...field} />\n\n\t\t\t\t\t\t\t\t\t\t\t<TooltipProvider delayDuration={0}>\n\t\t\t\t\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={setCurrentIp}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<RefreshCw className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TooltipContent\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tside=\"left\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsideOffset={5}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"max-w-[11rem]\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>Set current public IP</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<pre>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</pre>\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</form>\n\n\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tisLoading={isPending}\n\t\t\t\t\t\t\tdisabled={isPending}\n\t\t\t\t\t\t\tform=\"hook-form-update-server-ip\"\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tUpdate\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</DialogFooter>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/web-server/update-server.tsx",
    "content": "import type { IUpdateData } from \"@dokploy/server/index\";\nimport {\n\tBug,\n\tDownload,\n\tInfo,\n\tRefreshCcw,\n\tServer,\n\tSparkles,\n\tStars,\n} from \"lucide-react\";\nimport Link from \"next/link\";\nimport { useState } from \"react\";\nimport { toast } from \"sonner\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { api } from \"@/utils/api\";\nimport { ToggleAutoCheckUpdates } from \"./toggle-auto-check-updates\";\nimport { UpdateWebServer } from \"./update-webserver\";\n\ninterface Props {\n\tupdateData?: IUpdateData;\n\tchildren?: React.ReactNode;\n\tisOpen?: boolean;\n\tonOpenChange?: (open: boolean) => void;\n}\n\nexport const UpdateServer = ({\n\tupdateData,\n\tchildren,\n\tisOpen: isOpenProp,\n\tonOpenChange: onOpenChangeProp,\n}: Props) => {\n\tconst [hasCheckedUpdate, setHasCheckedUpdate] = useState(!!updateData);\n\tconst [isUpdateAvailable, setIsUpdateAvailable] = useState(\n\t\t!!updateData?.updateAvailable,\n\t);\n\tconst { mutateAsync: getUpdateData, isPending } =\n\t\tapi.settings.getUpdateData.useMutation();\n\tconst { data: dokployVersion } = api.settings.getDokployVersion.useQuery();\n\tconst { data: releaseTag } = api.settings.getReleaseTag.useQuery();\n\tconst [latestVersion, setLatestVersion] = useState(\n\t\tupdateData?.latestVersion ?? \"\",\n\t);\n\tconst [isOpenInternal, setIsOpenInternal] = useState(false);\n\n\tconst handleCheckUpdates = async () => {\n\t\ttry {\n\t\t\tconst updateData = await getUpdateData();\n\t\t\tconst versionToUpdate = updateData.latestVersion || \"\";\n\t\t\tsetHasCheckedUpdate(true);\n\t\t\tsetIsUpdateAvailable(updateData.updateAvailable);\n\t\t\tsetLatestVersion(versionToUpdate);\n\n\t\t\tif (updateData.updateAvailable) {\n\t\t\t\ttoast.success(versionToUpdate, {\n\t\t\t\t\tdescription: \"New version available!\",\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\ttoast.info(\"No updates available\");\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tconsole.error(\"Error checking for updates:\", error);\n\t\t\tsetHasCheckedUpdate(true);\n\t\t\tsetIsUpdateAvailable(false);\n\t\t\ttoast.error(\n\t\t\t\t\"An error occurred while checking for updates, please try again.\",\n\t\t\t);\n\t\t}\n\t};\n\n\tconst isOpen = isOpenInternal || isOpenProp;\n\tconst onOpenChange = (open: boolean) => {\n\t\tsetIsOpenInternal(open);\n\t\tonOpenChangeProp?.(open);\n\t};\n\n\treturn (\n\t\t<Dialog open={isOpen} onOpenChange={onOpenChange}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t{children ? (\n\t\t\t\t\tchildren\n\t\t\t\t) : (\n\t\t\t\t\t<TooltipProvider delayDuration={0}>\n\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tvariant={updateData ? \"outline\" : \"secondary\"}\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\tonClick={() => onOpenChange?.(true)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Download className=\"h-4 w-4 flex-shrink-0\" />\n\t\t\t\t\t\t\t\t\t{updateData ? (\n\t\t\t\t\t\t\t\t\t\t<span className=\"font-medium truncate group-data-[collapsible=icon]:hidden\">\n\t\t\t\t\t\t\t\t\t\t\tUpdate Available\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t<span className=\"font-medium truncate group-data-[collapsible=icon]:hidden\">\n\t\t\t\t\t\t\t\t\t\t\tCheck for updates\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t{updateData && (\n\t\t\t\t\t\t\t\t\t\t<span className=\"absolute right-2 flex h-2 w-2 group-data-[collapsible=icon]:hidden\">\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75\" />\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"relative inline-flex rounded-full h-2 w-2 bg-emerald-500\" />\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t{updateData && (\n\t\t\t\t\t\t\t\t<TooltipContent side=\"right\" sideOffset={10}>\n\t\t\t\t\t\t\t\t\t<p>Update Available</p>\n\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t</TooltipProvider>\n\t\t\t\t)}\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"max-w-lg\">\n\t\t\t\t<div className=\"flex items-center justify-between mb-8\">\n\t\t\t\t\t<DialogTitle className=\"text-2xl font-semibold\">\n\t\t\t\t\t\tWeb Server Update\n\t\t\t\t\t</DialogTitle>\n\t\t\t\t\t{dokployVersion && (\n\t\t\t\t\t\t<div className=\"flex items-center gap-1.5 rounded-full px-3 py-1 mr-2 bg-muted\">\n\t\t\t\t\t\t\t<Server className=\"h-4 w-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t{dokployVersion}{\" \"}\n\t\t\t\t\t\t\t\t{(releaseTag === \"canary\" || releaseTag === \"feature\") &&\n\t\t\t\t\t\t\t\t\t`(${releaseTag})`}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\n\t\t\t\t{/* Initial state */}\n\t\t\t\t{!hasCheckedUpdate && (\n\t\t\t\t\t<div className=\"mb-8\">\n\t\t\t\t\t\t<p className=\"text text-muted-foreground\">\n\t\t\t\t\t\t\tCheck for new releases and update Dokploy.\n\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\tWe recommend checking for updates regularly to ensure you have the\n\t\t\t\t\t\t\tlatest features and security improvements.\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t{/* Update available state */}\n\t\t\t\t{isUpdateAvailable && latestVersion && (\n\t\t\t\t\t<div className=\"mb-8\">\n\t\t\t\t\t\t<div className=\"inline-flex items-center gap-2 rounded-lg px-3 py-2 border border-emerald-900 bg-emerald-900 dark:bg-emerald-900/40 mb-4 w-full\">\n\t\t\t\t\t\t\t<div className=\"flex items-center gap-1.5\">\n\t\t\t\t\t\t\t\t<Download className=\"h-4 w-4 text-emerald-400\" />\n\t\t\t\t\t\t\t\t<span className=\"text font-medium text-emerald-400 \">\n\t\t\t\t\t\t\t\t\tNew version available:\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<span className=\"text font-semibold text-emerald-300\">\n\t\t\t\t\t\t\t\t{latestVersion}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div className=\"space-y-4 text-muted-foreground\">\n\t\t\t\t\t\t\t<p className=\"text\">\n\t\t\t\t\t\t\t\tA new version of the server software is available. Consider\n\t\t\t\t\t\t\t\tupdating if you:\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t<ul className=\"space-y-3\">\n\t\t\t\t\t\t\t\t<li className=\"flex items-start gap-2\">\n\t\t\t\t\t\t\t\t\t<Stars className=\"h-5 w-5 mt-0.5 text-[#5B9DFF]\" />\n\t\t\t\t\t\t\t\t\t<span className=\"text\">\n\t\t\t\t\t\t\t\t\t\tWant to access the latest features and improvements\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t<li className=\"flex items-start gap-2\">\n\t\t\t\t\t\t\t\t\t<Bug className=\"h-5 w-5 mt-0.5 text-[#5B9DFF]\" />\n\t\t\t\t\t\t\t\t\t<span className=\"text\">\n\t\t\t\t\t\t\t\t\t\tAre experiencing issues that may be resolved in the new\n\t\t\t\t\t\t\t\t\t\tversion\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t{/* Up to date state */}\n\t\t\t\t{hasCheckedUpdate && !isUpdateAvailable && !isPending && (\n\t\t\t\t\t<div className=\"mb-8\">\n\t\t\t\t\t\t<div className=\"flex flex-col items-center gap-6 mb-6\">\n\t\t\t\t\t\t\t<div className=\"rounded-full p-4 bg-emerald-400/40\">\n\t\t\t\t\t\t\t\t<Sparkles className=\"h-8 w-8 text-emerald-400\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"text-center space-y-2\">\n\t\t\t\t\t\t\t\t<h3 className=\"text-lg font-medium\">\n\t\t\t\t\t\t\t\t\tYou are using the latest version\n\t\t\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t\t\t<p className=\"text text-muted-foreground\">\n\t\t\t\t\t\t\t\t\tYour server is up to date with all the latest features and\n\t\t\t\t\t\t\t\t\tsecurity improvements.\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t{hasCheckedUpdate && isPending && (\n\t\t\t\t\t<div className=\"mb-8\">\n\t\t\t\t\t\t<div className=\"flex flex-col items-center gap-6 mb-6\">\n\t\t\t\t\t\t\t<div className=\"rounded-full p-4 bg-[#5B9DFF]/40 text-foreground\">\n\t\t\t\t\t\t\t\t<RefreshCcw className=\"h-8 w-8 animate-spin\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"text-center space-y-2\">\n\t\t\t\t\t\t\t\t<h3 className=\"text-lg font-medium\">Checking for updates...</h3>\n\t\t\t\t\t\t\t\t<p className=\"text text-muted-foreground\">\n\t\t\t\t\t\t\t\t\tPlease wait while we pull the latest version information from\n\t\t\t\t\t\t\t\t\tDocker Hub.\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t{isUpdateAvailable && (\n\t\t\t\t\t<div className=\"rounded-lg bg-[#16254D] p-4 mb-8\">\n\t\t\t\t\t\t<div className=\"flex gap-2\">\n\t\t\t\t\t\t\t<Info className=\"h-5 w-5 flex-shrink-0 text-[#5B9DFF]\" />\n\t\t\t\t\t\t\t<div className=\"text-[#5B9DFF]\">\n\t\t\t\t\t\t\t\tWe recommend reviewing the{\" \"}\n\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\thref=\"https://github.com/Dokploy/dokploy/releases\"\n\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\tclassName=\"text-white underline hover:text-zinc-200\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\trelease notes\n\t\t\t\t\t\t\t\t</Link>{\" \"}\n\t\t\t\t\t\t\t\tfor any breaking changes before updating.\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t<div className=\"flex items-center justify-between pt-2\">\n\t\t\t\t\t<ToggleAutoCheckUpdates disabled={isPending} />\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"space-y-4 flex items-center justify-end mt-4\t\">\n\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t<Button variant=\"outline\" onClick={() => onOpenChange?.(false)}>\n\t\t\t\t\t\t\tCancel\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t{isUpdateAvailable ? (\n\t\t\t\t\t\t\t<UpdateWebServer />\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\tonClick={handleCheckUpdates}\n\t\t\t\t\t\t\t\tdisabled={isPending}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{isPending ? (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<RefreshCcw className=\"h-4 w-4 animate-spin\" />\n\t\t\t\t\t\t\t\t\t\tChecking for updates\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<RefreshCcw className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\tCheck for updates\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n\nexport default UpdateServer;\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/web-server/update-webserver.tsx",
    "content": "import {\n\tAlertTriangle,\n\tCheckCircle2,\n\tHardDriveDownload,\n\tLoader2,\n\tRefreshCw,\n\tXCircle,\n} from \"lucide-react\";\nimport { useState } from \"react\";\nimport { toast } from \"sonner\";\nimport {\n\tAlertDialog,\n\tAlertDialogAction,\n\tAlertDialogCancel,\n\tAlertDialogContent,\n\tAlertDialogDescription,\n\tAlertDialogFooter,\n\tAlertDialogHeader,\n\tAlertDialogTitle,\n\tAlertDialogTrigger,\n} from \"@/components/ui/alert-dialog\";\nimport { Button } from \"@/components/ui/button\";\nimport { api } from \"@/utils/api\";\n\ntype ServiceStatus = {\n\tstatus: \"healthy\" | \"unhealthy\";\n\tmessage?: string;\n};\n\ntype HealthResult = {\n\tpostgres: ServiceStatus;\n\tredis: ServiceStatus;\n\ttraefik: ServiceStatus;\n};\n\ntype ModalState = \"idle\" | \"checking\" | \"results\" | \"updating\";\n\nconst ServiceStatusItem = ({\n\tname,\n\tservice,\n}: {\n\tname: string;\n\tservice: ServiceStatus;\n}) => (\n\t<div className=\"flex items-center gap-2\">\n\t\t{service.status === \"healthy\" ? (\n\t\t\t<CheckCircle2 className=\"h-4 w-4 text-green-500\" />\n\t\t) : (\n\t\t\t<XCircle className=\"h-4 w-4 text-red-500\" />\n\t\t)}\n\t\t<span className=\"text-sm font-medium\">{name}</span>\n\t\t{service.status === \"unhealthy\" && service.message && (\n\t\t\t<span className=\"text-xs text-muted-foreground\">— {service.message}</span>\n\t\t)}\n\t</div>\n);\n\nexport const UpdateWebServer = () => {\n\tconst [modalState, setModalState] = useState<ModalState>(\"idle\");\n\tconst [open, setOpen] = useState(false);\n\tconst [healthResult, setHealthResult] = useState<HealthResult | null>(null);\n\n\tconst { mutateAsync: updateServer } = api.settings.updateServer.useMutation();\n\tconst { refetch: checkHealth } =\n\t\tapi.settings.checkInfrastructureHealth.useQuery(undefined, {\n\t\t\tenabled: false,\n\t\t});\n\n\tconst handleVerify = async () => {\n\t\tsetModalState(\"checking\");\n\t\tsetHealthResult(null);\n\n\t\ttry {\n\t\t\tconst result = await checkHealth();\n\t\t\tif (result.data) {\n\t\t\t\tsetHealthResult(result.data);\n\t\t\t}\n\t\t} catch {\n\t\t\t// checkHealth failed entirely\n\t\t}\n\t\tsetModalState(\"results\");\n\t};\n\n\tconst allHealthy =\n\t\thealthResult &&\n\t\thealthResult.postgres.status === \"healthy\" &&\n\t\thealthResult.redis.status === \"healthy\" &&\n\t\thealthResult.traefik.status === \"healthy\";\n\n\tconst checkIsUpdateFinished = async () => {\n\t\ttry {\n\t\t\tconst response = await fetch(\"/api/health\");\n\t\t\tif (!response.ok) {\n\t\t\t\tthrow new Error(\"Health check failed\");\n\t\t\t}\n\n\t\t\ttoast.success(\n\t\t\t\t\"The server has been updated. The page will be reloaded to reflect the changes...\",\n\t\t\t);\n\n\t\t\tsetTimeout(() => {\n\t\t\t\twindow.location.reload();\n\t\t\t}, 2000);\n\t\t} catch {\n\t\t\tawait new Promise((resolve) => setTimeout(resolve, 2000));\n\t\t\tvoid checkIsUpdateFinished();\n\t\t}\n\t};\n\n\tconst handleConfirm = async () => {\n\t\ttry {\n\t\t\tsetModalState(\"updating\");\n\t\t\tawait updateServer();\n\n\t\t\tawait new Promise((resolve) => setTimeout(resolve, 8000));\n\n\t\t\tawait checkIsUpdateFinished();\n\t\t} catch (error) {\n\t\t\tsetModalState(\"results\");\n\t\t\tconsole.error(\"Error updating server:\", error);\n\t\t\ttoast.error(\n\t\t\t\t\"An error occurred while updating the server, please try again.\",\n\t\t\t);\n\t\t}\n\t};\n\n\tconst handleClose = () => {\n\t\tif (modalState !== \"updating\") {\n\t\t\tsetOpen(false);\n\t\t\tsetModalState(\"idle\");\n\t\t\tsetHealthResult(null);\n\t\t}\n\t};\n\n\treturn (\n\t\t<AlertDialog open={open}>\n\t\t\t<AlertDialogTrigger asChild>\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"relative w-full\"\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tonClick={() => setOpen(true)}\n\t\t\t\t>\n\t\t\t\t\t<HardDriveDownload className=\"h-4 w-4\" />\n\t\t\t\t\t<span className=\"absolute -right-1 -top-2 flex h-3 w-3\">\n\t\t\t\t\t\t<span className=\"animate-ping absolute inline-flex h-full w-full rounded-full bg-green-400 opacity-75\" />\n\t\t\t\t\t\t<span className=\"relative inline-flex rounded-full h-3 w-3 bg-green-500\" />\n\t\t\t\t\t</span>\n\t\t\t\t\tUpdate Server\n\t\t\t\t</Button>\n\t\t\t</AlertDialogTrigger>\n\t\t\t<AlertDialogContent>\n\t\t\t\t<AlertDialogHeader>\n\t\t\t\t\t<AlertDialogTitle>\n\t\t\t\t\t\t{modalState === \"idle\" && \"Are you absolutely sure?\"}\n\t\t\t\t\t\t{modalState === \"checking\" && \"Verifying Services...\"}\n\t\t\t\t\t\t{modalState === \"results\" &&\n\t\t\t\t\t\t\t(allHealthy ? \"Ready to Update\" : \"Service Issues Detected\")}\n\t\t\t\t\t\t{modalState === \"updating\" && \"Server update in progress\"}\n\t\t\t\t\t</AlertDialogTitle>\n\t\t\t\t\t<AlertDialogDescription asChild>\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t{modalState === \"idle\" && (\n\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\tThis will update the web server to the new version. You will\n\t\t\t\t\t\t\t\t\tnot be able to use the panel during the update process. The\n\t\t\t\t\t\t\t\t\tpage will be reloaded once the update is finished.\n\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\tWe recommend verifying that all services are running before\n\t\t\t\t\t\t\t\t\tupdating.\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t{modalState === \"checking\" && (\n\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t<Loader2 className=\"animate-spin h-4 w-4\" />\n\t\t\t\t\t\t\t\t\tChecking PostgreSQL, Redis and Traefik...\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t{modalState === \"results\" && healthResult && (\n\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-3\">\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t\t\t<ServiceStatusItem\n\t\t\t\t\t\t\t\t\t\t\tname=\"PostgreSQL\"\n\t\t\t\t\t\t\t\t\t\t\tservice={healthResult.postgres}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<ServiceStatusItem\n\t\t\t\t\t\t\t\t\t\t\tname=\"Redis\"\n\t\t\t\t\t\t\t\t\t\t\tservice={healthResult.redis}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<ServiceStatusItem\n\t\t\t\t\t\t\t\t\t\t\tname=\"Traefik\"\n\t\t\t\t\t\t\t\t\t\t\tservice={healthResult.traefik}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t{!allHealthy && (\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-start gap-2 rounded-md border border-yellow-500/30 bg-yellow-500/10 p-3\">\n\t\t\t\t\t\t\t\t\t\t\t<AlertTriangle className=\"h-4 w-4 text-yellow-500 mt-0.5 shrink-0\" />\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm text-yellow-600 dark:text-yellow-400\">\n\t\t\t\t\t\t\t\t\t\t\t\tSome services are not healthy. You can still proceed\n\t\t\t\t\t\t\t\t\t\t\t\twith the update.\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t{allHealthy && (\n\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\tAll services are running. You can proceed with the update.\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t{modalState === \"results\" && !healthResult && (\n\t\t\t\t\t\t\t\t<div className=\"flex items-start gap-2 rounded-md border border-yellow-500/30 bg-yellow-500/10 p-3\">\n\t\t\t\t\t\t\t\t\t<AlertTriangle className=\"h-4 w-4 text-yellow-500 mt-0.5 shrink-0\" />\n\t\t\t\t\t\t\t\t\t<span className=\"text-sm text-yellow-600 dark:text-yellow-400\">\n\t\t\t\t\t\t\t\t\t\tCould not verify services. You can still proceed with the\n\t\t\t\t\t\t\t\t\t\tupdate.\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t{modalState === \"updating\" && (\n\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t<Loader2 className=\"animate-spin h-4 w-4\" />\n\t\t\t\t\t\t\t\t\tThe server is being updated, please wait...\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</AlertDialogDescription>\n\t\t\t\t</AlertDialogHeader>\n\t\t\t\t{modalState === \"idle\" && (\n\t\t\t\t\t<AlertDialogFooter>\n\t\t\t\t\t\t<AlertDialogCancel onClick={handleClose}>Cancel</AlertDialogCancel>\n\t\t\t\t\t\t<Button variant=\"secondary\" onClick={handleVerify}>\n\t\t\t\t\t\t\t<RefreshCw className=\"h-4 w-4\" />\n\t\t\t\t\t\t\tVerify Status\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<AlertDialogAction onClick={handleConfirm}>\n\t\t\t\t\t\t\tConfirm\n\t\t\t\t\t\t</AlertDialogAction>\n\t\t\t\t\t</AlertDialogFooter>\n\t\t\t\t)}\n\t\t\t\t{modalState === \"results\" && (\n\t\t\t\t\t<AlertDialogFooter>\n\t\t\t\t\t\t<AlertDialogCancel onClick={handleClose}>Cancel</AlertDialogCancel>\n\t\t\t\t\t\t<Button variant=\"secondary\" onClick={handleVerify}>\n\t\t\t\t\t\t\t<RefreshCw className=\"h-4 w-4\" />\n\t\t\t\t\t\t\tRe-check\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<AlertDialogAction onClick={handleConfirm}>\n\t\t\t\t\t\t\t{allHealthy ? \"Confirm\" : \"Confirm Anyway\"}\n\t\t\t\t\t\t</AlertDialogAction>\n\t\t\t\t\t</AlertDialogFooter>\n\t\t\t\t)}\n\t\t\t</AlertDialogContent>\n\t\t</AlertDialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/settings/web-server.tsx",
    "content": "import { ServerIcon } from \"lucide-react\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport { api } from \"@/utils/api\";\nimport { ShowDokployActions } from \"./servers/actions/show-dokploy-actions\";\nimport { ShowStorageActions } from \"./servers/actions/show-storage-actions\";\nimport { ShowTraefikActions } from \"./servers/actions/show-traefik-actions\";\nimport { ToggleDockerCleanup } from \"./servers/actions/toggle-docker-cleanup\";\nimport { UpdateServer } from \"./web-server/update-server\";\n\nexport const WebServer = () => {\n\tconst { data: webServerSettings } =\n\t\tapi.settings.getWebServerSettings.useQuery();\n\n\tconst { data: dokployVersion } = api.settings.getDokployVersion.useQuery();\n\n\treturn (\n\t\t<div className=\"w-full\">\n\t\t\t{/* <Card className={cn(\"rounded-lg w-full bg-transparent p-0\", className)}></Card> */}\n\t\t\t<Card className=\"h-full bg-sidebar  p-2.5 rounded-xl  max-w-5xl mx-auto\">\n\t\t\t\t<div className=\"rounded-xl bg-background shadow-md \">\n\t\t\t\t\t<CardHeader className=\"\">\n\t\t\t\t\t\t<CardTitle className=\"text-xl flex flex-row gap-2\">\n\t\t\t\t\t\t\t<ServerIcon className=\"size-6 text-muted-foreground self-center\" />\n\t\t\t\t\t\t\tWeb Server\n\t\t\t\t\t\t</CardTitle>\n\t\t\t\t\t\t<CardDescription>Reload or clean the web server.</CardDescription>\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t{/* <CardHeader>\n\t\t\t\t\t\t<CardTitle className=\"text-xl\">\n\t\t\t\t\t\t\tWeb Server\n\t\t\t\t\t\t</CardTitle>\n\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\tReload or clean the web server.\n\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t</CardHeader> */}\n\t\t\t\t\t<CardContent className=\"space-y-6 py-6 border-t\">\n\t\t\t\t\t\t<div className=\"grid md:grid-cols-2 gap-4\">\n\t\t\t\t\t\t\t<ShowDokployActions />\n\t\t\t\t\t\t\t<ShowTraefikActions />\n\t\t\t\t\t\t\t<ShowStorageActions />\n\n\t\t\t\t\t\t\t<UpdateServer />\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div className=\"flex items-center flex-wrap justify-between gap-4\">\n\t\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\tServer IP: {webServerSettings?.serverIp}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\tVersion: {dokployVersion}\n\t\t\t\t\t\t\t</span>\n\n\t\t\t\t\t\t\t<ToggleDockerCleanup />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</CardContent>\n\t\t\t\t</div>\n\t\t\t</Card>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/shared/rebuild-database.tsx",
    "content": "import { AlertTriangle, DatabaseIcon } from \"lucide-react\";\nimport { toast } from \"sonner\";\nimport {\n\tAlertDialog,\n\tAlertDialogAction,\n\tAlertDialogCancel,\n\tAlertDialogContent,\n\tAlertDialogDescription,\n\tAlertDialogFooter,\n\tAlertDialogHeader,\n\tAlertDialogTitle,\n\tAlertDialogTrigger,\n} from \"@/components/ui/alert-dialog\";\nimport { Button } from \"@/components/ui/button\";\nimport { Card, CardContent, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport { api } from \"@/utils/api\";\n\ninterface Props {\n\tid: string;\n\ttype: \"postgres\" | \"mysql\" | \"mariadb\" | \"mongo\" | \"redis\";\n}\n\nexport const RebuildDatabase = ({ id, type }: Props) => {\n\tconst utils = api.useUtils();\n\n\tconst mutationMap = {\n\t\tpostgres: () => api.postgres.rebuild.useMutation(),\n\t\tmysql: () => api.mysql.rebuild.useMutation(),\n\t\tmariadb: () => api.mariadb.rebuild.useMutation(),\n\t\tmongo: () => api.mongo.rebuild.useMutation(),\n\t\tredis: () => api.redis.rebuild.useMutation(),\n\t};\n\n\tconst { mutateAsync, isPending } = mutationMap[type]();\n\n\tconst handleRebuild = async () => {\n\t\ttry {\n\t\t\tawait mutateAsync({\n\t\t\t\tpostgresId: type === \"postgres\" ? id : \"\",\n\t\t\t\tmysqlId: type === \"mysql\" ? id : \"\",\n\t\t\t\tmariadbId: type === \"mariadb\" ? id : \"\",\n\t\t\t\tmongoId: type === \"mongo\" ? id : \"\",\n\t\t\t\tredisId: type === \"redis\" ? id : \"\",\n\t\t\t});\n\t\t\ttoast.success(\"Database rebuilt successfully\");\n\t\t\tawait utils.invalidate();\n\t\t} catch (error) {\n\t\t\ttoast.error(\"Error rebuilding database\", {\n\t\t\t\tdescription: error instanceof Error ? error.message : \"Unknown error\",\n\t\t\t});\n\t\t}\n\t};\n\n\treturn (\n\t\t<Card className=\"bg-background border-destructive/50\">\n\t\t\t<CardHeader>\n\t\t\t\t<CardTitle className=\"text-xl flex items-center gap-2\">\n\t\t\t\t\t<AlertTriangle className=\"h-5 w-5 text-destructive\" />\n\t\t\t\t\tDanger Zone\n\t\t\t\t</CardTitle>\n\t\t\t</CardHeader>\n\t\t\t<CardContent>\n\t\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t<h3 className=\"text-base font-semibold\">Rebuild Database</h3>\n\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\tThis action will completely reset your database to its initial\n\t\t\t\t\t\t\tstate. All data, tables, and configurations will be removed.\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t\t<AlertDialog>\n\t\t\t\t\t\t<AlertDialogTrigger asChild>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tisLoading={isPending}\n\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\tclassName=\"w-full border-destructive/50 hover:bg-destructive/10 hover:text-destructive text-destructive\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<DatabaseIcon className=\"mr-2 h-4 w-4\" />\n\t\t\t\t\t\t\t\tRebuild Database\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</AlertDialogTrigger>\n\t\t\t\t\t\t<AlertDialogContent>\n\t\t\t\t\t\t\t<AlertDialogHeader>\n\t\t\t\t\t\t\t\t<AlertDialogTitle className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t<AlertTriangle className=\"h-5 w-5 text-destructive\" />\n\t\t\t\t\t\t\t\t\tAre you absolutely sure?\n\t\t\t\t\t\t\t\t</AlertDialogTitle>\n\t\t\t\t\t\t\t\t<AlertDialogDescription className=\"space-y-2\">\n\t\t\t\t\t\t\t\t\t<p>This action will:</p>\n\t\t\t\t\t\t\t\t\t<ul className=\"list-disc list-inside space-y-1\">\n\t\t\t\t\t\t\t\t\t\t<li>Stop the current database service</li>\n\t\t\t\t\t\t\t\t\t\t<li>Delete all existing data and volumes</li>\n\t\t\t\t\t\t\t\t\t\t<li>Reset to the default configuration</li>\n\t\t\t\t\t\t\t\t\t\t<li>Restart the service with a clean state</li>\n\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t<p className=\"font-medium text-destructive mt-4\">\n\t\t\t\t\t\t\t\t\t\tThis action cannot be undone.\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t</AlertDialogDescription>\n\t\t\t\t\t\t\t</AlertDialogHeader>\n\t\t\t\t\t\t\t<AlertDialogFooter>\n\t\t\t\t\t\t\t\t<AlertDialogCancel>Cancel</AlertDialogCancel>\n\t\t\t\t\t\t\t\t<AlertDialogAction\n\t\t\t\t\t\t\t\t\tonClick={handleRebuild}\n\t\t\t\t\t\t\t\t\tclassName=\"bg-destructive text-destructive-foreground hover:bg-destructive/90\"\n\t\t\t\t\t\t\t\t\tasChild\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Button isLoading={isPending} type=\"submit\">\n\t\t\t\t\t\t\t\t\t\tYes, rebuild database\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</AlertDialogAction>\n\t\t\t\t\t\t\t</AlertDialogFooter>\n\t\t\t\t\t\t</AlertDialogContent>\n\t\t\t\t\t</AlertDialog>\n\t\t\t\t</div>\n\t\t\t</CardContent>\n\t\t</Card>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/shared/show-database-advanced-settings.tsx",
    "content": "import { ShowResources } from \"@/components/dashboard/application/advanced/show-resources\";\nimport { ShowVolumes } from \"@/components/dashboard/application/advanced/volumes/show-volumes\";\nimport { ShowCustomCommand } from \"@/components/dashboard/postgres/advanced/show-custom-command\";\nimport { ShowClusterSettings } from \"../application/advanced/cluster/show-cluster-settings\";\nimport { RebuildDatabase } from \"./rebuild-database\";\n\ninterface Props {\n\tid: string;\n\ttype: \"postgres\" | \"mysql\" | \"mariadb\" | \"mongo\" | \"redis\";\n}\n\nexport const ShowDatabaseAdvancedSettings = ({ id, type }: Props) => {\n\treturn (\n\t\t<div className=\"flex w-full flex-col gap-5\">\n\t\t\t<ShowCustomCommand id={id} type={type} />\n\t\t\t<ShowClusterSettings id={id} type={type} />\n\t\t\t<ShowVolumes id={id} type={type} />\n\t\t\t<ShowResources id={id} type={type} />\n\t\t\t<RebuildDatabase id={id} type={type} />\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/swarm/applications/columns.tsx",
    "content": "import type { ColumnDef } from \"@tanstack/react-table\";\nimport { ArrowUpDown, MoreHorizontal } from \"lucide-react\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDropdownMenu,\n\tDropdownMenuContent,\n\tDropdownMenuLabel,\n\tDropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\nimport { ShowDockerModalStackLogs } from \"../../docker/logs/show-docker-modal-stack-logs\";\n\nexport interface ApplicationList {\n\tID: string;\n\tImage: string;\n\tMode: string;\n\tName: string;\n\tPorts: string;\n\tReplicas: string;\n\tCurrentState: string;\n\tDesiredState: string;\n\tError: string;\n\tNode: string;\n\tserverId: string;\n}\n\nexport const columns: ColumnDef<ApplicationList>[] = [\n\t{\n\t\taccessorKey: \"ID\",\n\t\taccessorFn: (row) => row.ID,\n\t\theader: ({ column }) => {\n\t\t\treturn (\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\tonClick={() => column.toggleSorting(column.getIsSorted() === \"asc\")}\n\t\t\t\t>\n\t\t\t\t\tID\n\t\t\t\t\t<ArrowUpDown className=\"ml-2 h-4 w-4\" />\n\t\t\t\t</Button>\n\t\t\t);\n\t\t},\n\t\tcell: ({ row }) => {\n\t\t\treturn <div>{row.getValue(\"ID\")}</div>;\n\t\t},\n\t},\n\t{\n\t\taccessorKey: \"Name\",\n\t\taccessorFn: (row) => row.Name,\n\t\theader: ({ column }) => {\n\t\t\treturn (\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\tonClick={() => column.toggleSorting(column.getIsSorted() === \"asc\")}\n\t\t\t\t>\n\t\t\t\t\tName\n\t\t\t\t\t<ArrowUpDown className=\"ml-2 h-4 w-4\" />\n\t\t\t\t</Button>\n\t\t\t);\n\t\t},\n\t\tcell: ({ row }) => {\n\t\t\treturn <div>{row.getValue(\"Name\")}</div>;\n\t\t},\n\t},\n\t{\n\t\taccessorKey: \"Image\",\n\t\taccessorFn: (row) => row.Image,\n\t\theader: ({ column }) => {\n\t\t\treturn (\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\tonClick={() => column.toggleSorting(column.getIsSorted() === \"asc\")}\n\t\t\t\t>\n\t\t\t\t\tImage\n\t\t\t\t\t<ArrowUpDown className=\"ml-2 h-4 w-4\" />\n\t\t\t\t</Button>\n\t\t\t);\n\t\t},\n\t\tcell: ({ row }) => {\n\t\t\treturn <div>{row.getValue(\"Image\")}</div>;\n\t\t},\n\t},\n\t{\n\t\taccessorKey: \"Mode\",\n\t\taccessorFn: (row) => row.Mode,\n\t\theader: ({ column }) => {\n\t\t\treturn (\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\tonClick={() => column.toggleSorting(column.getIsSorted() === \"asc\")}\n\t\t\t\t>\n\t\t\t\t\tMode\n\t\t\t\t\t<ArrowUpDown className=\"ml-2 h-4 w-4\" />\n\t\t\t\t</Button>\n\t\t\t);\n\t\t},\n\t\tcell: ({ row }) => {\n\t\t\treturn <div>{row.getValue(\"Mode\")}</div>;\n\t\t},\n\t},\n\t{\n\t\taccessorKey: \"CurrentState\",\n\t\taccessorFn: (row) => row.CurrentState,\n\t\theader: ({ column }) => {\n\t\t\treturn (\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\tonClick={() => column.toggleSorting(column.getIsSorted() === \"asc\")}\n\t\t\t\t>\n\t\t\t\t\tCurrent State\n\t\t\t\t\t<ArrowUpDown className=\"ml-2 h-4 w-4\" />\n\t\t\t\t</Button>\n\t\t\t);\n\t\t},\n\t\tcell: ({ row }) => {\n\t\t\tconst value = row.getValue(\"CurrentState\") as string;\n\t\t\tconst valueStart = value.startsWith(\"Running\")\n\t\t\t\t? \"Running\"\n\t\t\t\t: value.startsWith(\"Shutdown\")\n\t\t\t\t\t? \"Shutdown\"\n\t\t\t\t\t: value;\n\t\t\treturn (\n\t\t\t\t<div className=\"capitalize\">\n\t\t\t\t\t<Badge\n\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\tvalueStart === \"Running\"\n\t\t\t\t\t\t\t\t? \"default\"\n\t\t\t\t\t\t\t\t: value === \"Shutdown\"\n\t\t\t\t\t\t\t\t\t? \"destructive\"\n\t\t\t\t\t\t\t\t\t: \"secondary\"\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t{value}\n\t\t\t\t\t</Badge>\n\t\t\t\t</div>\n\t\t\t);\n\t\t},\n\t},\n\t{\n\t\taccessorKey: \"DesiredState\",\n\t\taccessorFn: (row) => row.DesiredState,\n\t\theader: ({ column }) => {\n\t\t\treturn (\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\tonClick={() => column.toggleSorting(column.getIsSorted() === \"asc\")}\n\t\t\t\t>\n\t\t\t\t\tDesired State\n\t\t\t\t\t<ArrowUpDown className=\"ml-2 h-4 w-4\" />\n\t\t\t\t</Button>\n\t\t\t);\n\t\t},\n\t\tcell: ({ row }) => {\n\t\t\treturn <div>{row.getValue(\"DesiredState\")}</div>;\n\t\t},\n\t},\n\n\t{\n\t\taccessorKey: \"Replicas\",\n\t\taccessorFn: (row) => row.Replicas,\n\t\theader: ({ column }) => {\n\t\t\treturn (\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\tonClick={() => column.toggleSorting(column.getIsSorted() === \"asc\")}\n\t\t\t\t>\n\t\t\t\t\tReplicas\n\t\t\t\t\t<ArrowUpDown className=\"ml-2 h-4 w-4\" />\n\t\t\t\t</Button>\n\t\t\t);\n\t\t},\n\t\tcell: ({ row }) => {\n\t\t\treturn <div>{row.getValue(\"Replicas\")}</div>;\n\t\t},\n\t},\n\n\t{\n\t\taccessorKey: \"Ports\",\n\t\taccessorFn: (row) => row.Ports,\n\t\theader: ({ column }) => {\n\t\t\treturn (\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\tonClick={() => column.toggleSorting(column.getIsSorted() === \"asc\")}\n\t\t\t\t>\n\t\t\t\t\tPorts\n\t\t\t\t\t<ArrowUpDown className=\"ml-2 h-4 w-4\" />\n\t\t\t\t</Button>\n\t\t\t);\n\t\t},\n\t\tcell: ({ row }) => {\n\t\t\treturn <div>{row.getValue(\"Ports\")}</div>;\n\t\t},\n\t},\n\t{\n\t\taccessorKey: \"Errors\",\n\t\taccessorFn: (row) => row.Error,\n\t\theader: ({ column }) => {\n\t\t\treturn (\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\tonClick={() => column.toggleSorting(column.getIsSorted() === \"asc\")}\n\t\t\t\t>\n\t\t\t\t\tErrors\n\t\t\t\t\t<ArrowUpDown className=\"ml-2 h-4 w-4\" />\n\t\t\t\t</Button>\n\t\t\t);\n\t\t},\n\t\tcell: ({ row }) => {\n\t\t\treturn <div className=\"w-[10rem]\">{row.getValue(\"Errors\")}</div>;\n\t\t},\n\t},\n\t{\n\t\taccessorKey: \"Logs\",\n\t\taccessorFn: (row) => row.Error,\n\t\theader: () => {\n\t\t\treturn <span>Logs</span>;\n\t\t},\n\t\tcell: ({ row }) => {\n\t\t\treturn (\n\t\t\t\t<span className=\"w-[10rem]\">\n\t\t\t\t\t<DropdownMenu>\n\t\t\t\t\t\t<DropdownMenuTrigger asChild>\n\t\t\t\t\t\t\t<Button variant=\"ghost\" className=\"h-8 w-8 p-0\">\n\t\t\t\t\t\t\t\t<span className=\"sr-only\">Open menu</span>\n\t\t\t\t\t\t\t\t<MoreHorizontal className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</DropdownMenuTrigger>\n\t\t\t\t\t\t<DropdownMenuContent align=\"end\">\n\t\t\t\t\t\t\t<DropdownMenuLabel>Actions</DropdownMenuLabel>\n\t\t\t\t\t\t\t<ShowDockerModalStackLogs\n\t\t\t\t\t\t\t\tcontainerId={row.original.ID}\n\t\t\t\t\t\t\t\tserverId={row.original.serverId}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tView Logs\n\t\t\t\t\t\t\t</ShowDockerModalStackLogs>\n\t\t\t\t\t\t</DropdownMenuContent>\n\t\t\t\t\t</DropdownMenu>\n\t\t\t\t</span>\n\t\t\t);\n\t\t},\n\t},\n];\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/swarm/applications/data-table.tsx",
    "content": "\"use client\";\n\nimport { DropdownMenuTrigger } from \"@radix-ui/react-dropdown-menu\";\nimport {\n\ttype ColumnDef,\n\ttype ColumnFiltersState,\n\tflexRender,\n\tgetCoreRowModel,\n\tgetFilteredRowModel,\n\tgetPaginationRowModel,\n\tgetSortedRowModel,\n\ttype SortingState,\n\tuseReactTable,\n\ttype VisibilityState,\n} from \"@tanstack/react-table\";\nimport { ChevronDown } from \"lucide-react\";\nimport React from \"react\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDropdownMenu,\n\tDropdownMenuCheckboxItem,\n\tDropdownMenuContent,\n} from \"@/components/ui/dropdown-menu\";\nimport { Input } from \"@/components/ui/input\";\nimport {\n\tTable,\n\tTableBody,\n\tTableCell,\n\tTableHead,\n\tTableHeader,\n\tTableRow,\n} from \"@/components/ui/table\";\n\ninterface DataTableProps<TData, TValue> {\n\tcolumns: ColumnDef<TData, TValue>[];\n\tdata: TData[];\n}\n\nexport function DataTable<TData, TValue>({\n\tcolumns,\n\tdata,\n}: DataTableProps<TData, TValue>) {\n\tconst [sorting, setSorting] = React.useState<SortingState>([]);\n\tconst [columnFilters, setColumnFilters] = React.useState<ColumnFiltersState>(\n\t\t[],\n\t);\n\tconst [columnVisibility, setColumnVisibility] =\n\t\tReact.useState<VisibilityState>({});\n\tconst [rowSelection, setRowSelection] = React.useState({});\n\tconst [_pagination, _setPagination] = React.useState({\n\t\tpageIndex: 0, //initial page index\n\t\tpageSize: 8, //default page size\n\t});\n\n\tconst table = useReactTable({\n\t\tdata,\n\t\tcolumns,\n\t\tonSortingChange: setSorting,\n\t\tonColumnFiltersChange: setColumnFilters,\n\t\tgetCoreRowModel: getCoreRowModel(),\n\t\tgetPaginationRowModel: getPaginationRowModel(),\n\t\tgetSortedRowModel: getSortedRowModel(),\n\t\tgetFilteredRowModel: getFilteredRowModel(),\n\t\tonColumnVisibilityChange: setColumnVisibility,\n\t\tonRowSelectionChange: setRowSelection,\n\t\tstate: {\n\t\t\tsorting,\n\t\t\tcolumnFilters,\n\t\t\tcolumnVisibility,\n\t\t\trowSelection,\n\t\t},\n\t});\n\n\treturn (\n\t\t<div className=\"mt-6 grid gap-4 pb-20 w-full\">\n\t\t\t<div className=\"flex flex-col gap-4  </div>w-full overflow-auto\">\n\t\t\t\t<div className=\"flex items-center gap-2 max-sm:flex-wrap\">\n\t\t\t\t\t<Input\n\t\t\t\t\t\tplaceholder=\"Filter by name...\"\n\t\t\t\t\t\tvalue={(table.getColumn(\"Name\")?.getFilterValue() as string) ?? \"\"}\n\t\t\t\t\t\tonChange={(event) =>\n\t\t\t\t\t\t\ttable.getColumn(\"Name\")?.setFilterValue(event.target.value)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tclassName=\"md:max-w-sm\"\n\t\t\t\t\t/>\n\t\t\t\t\t<DropdownMenu>\n\t\t\t\t\t\t<DropdownMenuTrigger asChild>\n\t\t\t\t\t\t\t<Button variant=\"outline\" className=\"sm:ml-auto max-sm:w-full\">\n\t\t\t\t\t\t\t\tColumns <ChevronDown className=\"ml-2 h-4 w-4\" />\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</DropdownMenuTrigger>\n\t\t\t\t\t\t<DropdownMenuContent align=\"end\">\n\t\t\t\t\t\t\t{table\n\t\t\t\t\t\t\t\t.getAllColumns()\n\t\t\t\t\t\t\t\t.filter((column) => column.getCanHide())\n\t\t\t\t\t\t\t\t.map((column) => {\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<DropdownMenuCheckboxItem\n\t\t\t\t\t\t\t\t\t\t\tkey={column.id}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"capitalize\"\n\t\t\t\t\t\t\t\t\t\t\tchecked={column.getIsVisible()}\n\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={(value) =>\n\t\t\t\t\t\t\t\t\t\t\t\tcolumn.toggleVisibility(!!value)\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{column.id}\n\t\t\t\t\t\t\t\t\t\t</DropdownMenuCheckboxItem>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t</DropdownMenuContent>\n\t\t\t\t\t</DropdownMenu>\n\t\t\t\t</div>\n\t\t\t\t<Table>\n\t\t\t\t\t<TableHeader>\n\t\t\t\t\t\t{table.getHeaderGroups().map((headerGroup) => (\n\t\t\t\t\t\t\t<TableRow key={headerGroup.id}>\n\t\t\t\t\t\t\t\t{headerGroup.headers.map((header) => {\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<TableHead key={header.id}>\n\t\t\t\t\t\t\t\t\t\t\t{header.isPlaceholder\n\t\t\t\t\t\t\t\t\t\t\t\t? null\n\t\t\t\t\t\t\t\t\t\t\t\t: flexRender(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\theader.column.columnDef.header,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\theader.getContext(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t</TableHead>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</TableHeader>\n\t\t\t\t\t<TableBody>\n\t\t\t\t\t\t{table?.getRowModel()?.rows?.length ? (\n\t\t\t\t\t\t\ttable.getRowModel().rows.map((row) => (\n\t\t\t\t\t\t\t\t<TableRow\n\t\t\t\t\t\t\t\t\tkey={row.id}\n\t\t\t\t\t\t\t\t\tdata-state={row.getIsSelected() && \"selected\"}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{row.getVisibleCells().map((cell) => (\n\t\t\t\t\t\t\t\t\t\t<TableCell key={cell.id}>\n\t\t\t\t\t\t\t\t\t\t\t{flexRender(\n\t\t\t\t\t\t\t\t\t\t\t\tcell.column.columnDef.cell,\n\t\t\t\t\t\t\t\t\t\t\t\tcell.getContext(),\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t\t))\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<TableRow>\n\t\t\t\t\t\t\t\t<TableCell\n\t\t\t\t\t\t\t\t\tcolSpan={columns.length}\n\t\t\t\t\t\t\t\t\tclassName=\"h-24 text-center\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tNo results.\n\t\t\t\t\t\t\t\t\t{/* {isPending ? (\n                    <div className=\"w-full flex-col gap-2 flex items-center justify-center h-[55vh]\">\n                      <span className=\"text-muted-foreground text-lg font-medium\">\n                        Loading...\n                      </span>\n                    </div>\n                  ) : (\n                    <>No results.</>\n                  )} */}\n\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</TableBody>\n\t\t\t\t</Table>\n\n\t\t\t\t{data && data?.length > 0 && (\n\t\t\t\t\t<div className=\"flex items-center justify-end space-x-2 py-4\">\n\t\t\t\t\t\t<div className=\"space-x-2 flex flex-wrap\">\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\tonClick={() => table.previousPage()}\n\t\t\t\t\t\t\t\tdisabled={!table.getCanPreviousPage()}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tPrevious\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\tonClick={() => table.nextPage()}\n\t\t\t\t\t\t\t\tdisabled={!table.getCanNextPage()}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tNext\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/swarm/applications/show-applications.tsx",
    "content": "import { Layers, Loader2 } from \"lucide-react\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport { api } from \"@/utils/api\";\nimport { type ApplicationList, columns } from \"./columns\";\nimport { DataTable } from \"./data-table\";\n\ninterface Props {\n\tserverId?: string;\n}\n\nexport const ShowNodeApplications = ({ serverId }: Props) => {\n\tconst { data: NodeApps, isPending: NodeAppsLoading } =\n\t\tapi.swarm.getNodeApps.useQuery({ serverId });\n\n\tlet applicationList: string[] = [];\n\n\tif (NodeApps && NodeApps.length > 0) {\n\t\tapplicationList = NodeApps.map((app) => app.Name);\n\t}\n\n\tconst { data: NodeAppDetails, isPending: NodeAppDetailsLoading } =\n\t\tapi.swarm.getAppInfos.useQuery({ appName: applicationList, serverId });\n\n\tif (NodeAppsLoading || NodeAppDetailsLoading) {\n\t\treturn (\n\t\t\t<Dialog>\n\t\t\t\t<DialogTrigger asChild>\n\t\t\t\t\t<Button variant=\"outline\" size=\"sm\" className=\"w-full\">\n\t\t\t\t\t\t<Loader2 className=\"h-4 w-4 mr-2 animate-spin\" />\n\t\t\t\t\t</Button>\n\t\t\t\t</DialogTrigger>\n\t\t\t</Dialog>\n\t\t);\n\t}\n\n\tif (!NodeApps || !NodeAppDetails) {\n\t\treturn (\n\t\t\t<span className=\"text-sm w-full flex text-center justify-center items-center\">\n\t\t\t\tNo data found\n\t\t\t</span>\n\t\t);\n\t}\n\n\tconst combinedData: ApplicationList[] = NodeApps.flatMap((app) => {\n\t\tconst appDetails =\n\t\t\tNodeAppDetails?.filter((detail) =>\n\t\t\t\tdetail.Name.startsWith(`${app.Name}.`),\n\t\t\t) || [];\n\n\t\tif (appDetails.length === 0) {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\t...app,\n\t\t\t\t\tCurrentState: \"N/A\",\n\t\t\t\t\tDesiredState: \"N/A\",\n\t\t\t\t\tError: \"\",\n\t\t\t\t\tNode: \"N/A\",\n\t\t\t\t\tPorts: app.Ports,\n\t\t\t\t},\n\t\t\t];\n\t\t}\n\n\t\treturn appDetails.map((detail) => ({\n\t\t\t...app,\n\t\t\tCurrentState: detail.CurrentState,\n\t\t\tDesiredState: detail.DesiredState,\n\t\t\tError: detail.Error,\n\t\t\tNode: detail.Node,\n\t\t\tPorts: detail.Ports || app.Ports,\n\t\t\tserverId: serverId || \"\",\n\t\t}));\n\t});\n\n\treturn (\n\t\t<Dialog>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t<Button variant=\"outline\" size=\"sm\" className=\"w-full\">\n\t\t\t\t\t<Layers className=\"h-4 w-4 mr-2\" />\n\t\t\t\t\tServices\n\t\t\t\t</Button>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className={\"sm:max-w-10xl\"}>\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Node Applications</DialogTitle>\n\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\tSee in detail the applications running on this node\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t<div className=\"max-h-[80vh]\">\n\t\t\t\t\t<DataTable columns={columns} data={combinedData ?? []} />\n\t\t\t\t</div>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/swarm/details/details-card.tsx",
    "content": "import { Box, Cpu, Database, HardDrive, Loader2 } from \"lucide-react\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Card, CardContent, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport { Separator } from \"@/components/ui/separator\";\nimport { api } from \"@/utils/api\";\nimport { ShowNodeApplications } from \"../applications/show-applications\";\nimport { ShowNodeConfig } from \"./show-node-config\";\n\nexport interface SwarmList {\n\tID: string;\n\tHostname: string;\n\tAvailability: string;\n\tEngineVersion: string;\n\tStatus: string;\n\tManagerStatus: string;\n\tTLSStatus: string;\n}\n\ninterface Props {\n\tnode: SwarmList;\n\tserverId?: string;\n}\n\nexport function NodeCard({ node, serverId }: Props) {\n\tconst { data, isPending } = api.swarm.getNodeInfo.useQuery({\n\t\tnodeId: node.ID,\n\t\tserverId,\n\t});\n\n\tif (isPending) {\n\t\treturn (\n\t\t\t<Card className=\"w-full bg-background\">\n\t\t\t\t<CardHeader>\n\t\t\t\t\t<CardTitle className=\"flex items-center justify-between text-lg\">\n\t\t\t\t\t\t<span className=\"flex items-center gap-2\">{node.Hostname}</span>\n\t\t\t\t\t\t<Badge variant=\"green\">{node.ManagerStatus || \"Worker\"}</Badge>\n\t\t\t\t\t</CardTitle>\n\t\t\t\t</CardHeader>\n\t\t\t\t<CardContent>\n\t\t\t\t\t<div className=\"flex items-center justify-center\">\n\t\t\t\t\t\t<Loader2 className=\"h-6 w-6 animate-spin text-muted-foreground\" />\n\t\t\t\t\t</div>\n\t\t\t\t</CardContent>\n\t\t\t</Card>\n\t\t);\n\t}\n\n\treturn (\n\t\t<Card className=\"w-full bg-background\">\n\t\t\t<CardHeader>\n\t\t\t\t<CardTitle className=\"text-lg\">Node Status</CardTitle>\n\t\t\t</CardHeader>\n\t\t\t<CardContent>\n\t\t\t\t<div className=\"space-y-6\">\n\t\t\t\t\t<div className=\"flex flex-wrap gap-y-2 items-center justify-between\">\n\t\t\t\t\t\t<div className=\"flex items-center space-x-4 p-2 rounded-xl border\">\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName={`h-2.5 w-2.5 rounded-full ${node.Status === \"Ready\" ? \"bg-green-500\" : \"bg-red-500\"}`}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<div className=\"font-medium\">{node.Hostname}</div>\n\t\t\t\t\t\t\t<Badge variant=\"green\">{node.ManagerStatus || \"Worker\"}</Badge>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"flex flex-wrap items-center gap-4\">\n\t\t\t\t\t\t\t<Badge variant=\"green\">TLS Status: {node.TLSStatus}</Badge>\n\t\t\t\t\t\t\t<Badge variant=\"blue\">Availability: {node.Availability}</Badge>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<Separator />\n\n\t\t\t\t\t<div className=\"grid gap-4 md:grid-cols-2 lg:grid-cols-4\">\n\t\t\t\t\t\t<div className=\"space-y-2 flex flex-col items-center text-center\">\n\t\t\t\t\t\t\t<div className=\"flex items-center text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t<HardDrive className=\"mr-2 h-4 w-4\" />\n\t\t\t\t\t\t\t\tEngine Version\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div>{node.EngineVersion}</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"space-y-2 flex flex-col items-center text-center\">\n\t\t\t\t\t\t\t<div className=\"flex items-center text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t<Cpu className=\"mr-2 h-4 w-4\" />\n\t\t\t\t\t\t\t\tCPU\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t{data &&\n\t\t\t\t\t\t\t\t\t(data.Description?.Resources?.NanoCPUs / 1e9).toFixed(2)}{\" \"}\n\t\t\t\t\t\t\t\tCore(s)\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"space-y-2 flex flex-col items-center text-center\">\n\t\t\t\t\t\t\t<div className=\"flex items-center text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t<Database className=\"mr-2 h-4 w-4\" />\n\t\t\t\t\t\t\t\tMemory\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t{data &&\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\tdata.Description?.Resources?.MemoryBytes /\n\t\t\t\t\t\t\t\t\t\t1024 ** 3\n\t\t\t\t\t\t\t\t\t).toFixed(2)}{\" \"}\n\t\t\t\t\t\t\t\tGB\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"space-y-2 flex flex-col items-center text-center\">\n\t\t\t\t\t\t\t<div className=\"flex items-center text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t<Box className=\"mr-2 h-4 w-4\" />\n\t\t\t\t\t\t\t\tIP Address\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div>{data?.Status?.Addr}</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div className=\"flex justify-end w-full space-x-4\">\n\t\t\t\t\t\t<ShowNodeConfig nodeId={node.ID} serverId={serverId} />\n\t\t\t\t\t\t<ShowNodeApplications serverId={serverId} />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</CardContent>\n\t\t</Card>\n\t);\n}\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/swarm/details/show-node-config.tsx",
    "content": "import { Settings } from \"lucide-react\";\nimport { CodeEditor } from \"@/components/shared/code-editor\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport { api } from \"@/utils/api\";\n\ninterface Props {\n\tnodeId: string;\n\tserverId?: string;\n}\n\nexport const ShowNodeConfig = ({ nodeId, serverId }: Props) => {\n\tconst { data } = api.swarm.getNodeInfo.useQuery({\n\t\tnodeId,\n\t\tserverId,\n\t});\n\treturn (\n\t\t<Dialog>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t<Button variant=\"outline\" size=\"sm\" className=\"w-full\">\n\t\t\t\t\t<Settings className=\"h-4 w-4 mr-2\" />\n\t\t\t\t\tConfig\n\t\t\t\t</Button>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className={\"sm:max-w-5xl\"}>\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Node Config</DialogTitle>\n\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\tSee in detail the metadata of this node\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t<div className=\"text-wrap rounded-lg border p-4 text-sm sm:max-w-[59rem] bg-card max-h-[70vh] overflow-auto \">\n\t\t\t\t\t<code>\n\t\t\t\t\t\t<pre className=\"whitespace-pre-wrap break-words items-center justify-center\">\n\t\t\t\t\t\t\t{/* {JSON.stringify(data, null, 2)} */}\n\t\t\t\t\t\t\t<CodeEditor\n\t\t\t\t\t\t\t\tlanguage=\"json\"\n\t\t\t\t\t\t\t\tlineWrapping={false}\n\t\t\t\t\t\t\t\tlineNumbers={false}\n\t\t\t\t\t\t\t\treadOnly\n\t\t\t\t\t\t\t\tvalue={JSON.stringify(data, null, 2)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</pre>\n\t\t\t\t\t</code>\n\t\t\t\t</div>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/dashboard/swarm/monitoring-card.tsx",
    "content": "import {\n\tActivity,\n\tLoader2,\n\tMonitor,\n\tServer,\n\tSettings,\n\tWorkflowIcon,\n} from \"lucide-react\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport { Card, CardContent, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { api } from \"@/utils/api\";\nimport { NodeCard } from \"./details/details-card\";\n\ninterface Props {\n\tserverId?: string;\n}\n\nexport default function SwarmMonitorCard({ serverId }: Props) {\n\tconst { data: nodes, isPending } = api.swarm.getNodes.useQuery({\n\t\tserverId,\n\t});\n\n\tif (isPending) {\n\t\treturn (\n\t\t\t<div className=\"w-full max-w-7xl mx-auto\">\n\t\t\t\t<div className=\"mb-6 border min-h-[55vh] flex rounded-lg h-full items-center justify-center  text-muted-foreground\">\n\t\t\t\t\t{/* <div className=\"flex items-center justify-center h-full text-muted-foreground\"> */}\n\n\t\t\t\t\t<div className=\"flex flex-row gap-2 items-center justify-center text-sm text-muted-foreground min-h-[55vh]\">\n\t\t\t\t\t\t<span>Loading...</span>\n\t\t\t\t\t\t<Loader2 className=\"animate-spin size-4\" />\n\t\t\t\t\t</div>\n\t\t\t\t\t{/* </div> */}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n\n\tif (!nodes) {\n\t\treturn (\n\t\t\t<div className=\"w-full max-w-7xl mx-auto\">\n\t\t\t\t<div className=\"mb-6 border min-h-[55vh] flex justify-center items-center rounded-lg h-full\">\n\t\t\t\t\t<div className=\"flex items-center justify-center h-full  text-destructive\">\n\t\t\t\t\t\t<span>Failed to load data</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n\n\tconst totalNodes = nodes.length;\n\tconst activeNodesCount = nodes.filter(\n\t\t(node) => node.Status === \"Ready\",\n\t).length;\n\tconst managerNodesCount = nodes.filter(\n\t\t(node) =>\n\t\t\tnode.ManagerStatus === \"Leader\" || node.ManagerStatus === \"Reachable\",\n\t).length;\n\tconst activeNodes = nodes.filter((node) => node.Status === \"Ready\");\n\tconst managerNodes = nodes.filter(\n\t\t(node) =>\n\t\t\tnode.ManagerStatus === \"Leader\" || node.ManagerStatus === \"Reachable\",\n\t);\n\n\treturn (\n\t\t<Card className=\"h-full bg-sidebar  p-2.5 rounded-xl mx-auto w-full\">\n\t\t\t<div className=\"rounded-xl bg-background shadow-md p-6 flex flex-col gap-4\">\n\t\t\t\t<header className=\"flex items-center flex-wrap gap-4 justify-between\">\n\t\t\t\t\t<div className=\"space-y-1\">\n\t\t\t\t\t\t<CardTitle className=\"text-xl flex flex-row gap-2\">\n\t\t\t\t\t\t\t<WorkflowIcon className=\"size-6 text-muted-foreground self-center\" />\n\t\t\t\t\t\t\tDocker Swarm Overview\n\t\t\t\t\t\t</CardTitle>\n\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\tMonitor and manage your Docker Swarm cluster\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t\t{!serverId && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\twindow.location.replace(\"/dashboard/settings/cluster\")\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Settings className=\"mr-2 h-4 w-4\" />\n\t\t\t\t\t\t\tManage Cluster\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t)}\n\t\t\t\t</header>\n\n\t\t\t\t<div className=\"grid gap-6 lg:grid-cols-3\">\n\t\t\t\t\t<Card className=\"bg-background\">\n\t\t\t\t\t\t<CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n\t\t\t\t\t\t\t<CardTitle className=\"text-sm font-medium\">Total Nodes</CardTitle>\n\t\t\t\t\t\t\t<div className=\"p-2 bg-emerald-600/20 text-emerald-600 rounded-md\">\n\t\t\t\t\t\t\t\t<Server className=\"h-4 w-4 text-muted-foreground dark:text-emerald-600\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t<CardContent>\n\t\t\t\t\t\t\t<div className=\"text-2xl font-bold\">{totalNodes}</div>\n\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t</Card>\n\n\t\t\t\t\t<Card className=\"bg-background\">\n\t\t\t\t\t\t<CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t<CardTitle className=\"text-sm font-medium\">\n\t\t\t\t\t\t\t\t\tActive Nodes\n\t\t\t\t\t\t\t\t</CardTitle>\n\t\t\t\t\t\t\t\t<Badge variant=\"green\">Online</Badge>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"p-2 bg-emerald-600/20 text-emerald-600 rounded-md\">\n\t\t\t\t\t\t\t\t<Activity className=\"h-4 w-4 text-muted-foreground dark:text-emerald-600\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t<CardContent>\n\t\t\t\t\t\t\t<TooltipProvider>\n\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t<TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t<div className=\"text-2xl font-bold\">\n\t\t\t\t\t\t\t\t\t\t\t{activeNodesCount} / {totalNodes}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t\t\t\t<div className=\"max-h-48 overflow-y-auto\">\n\t\t\t\t\t\t\t\t\t\t\t{activeNodes.map((node) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<div key={node.ID} className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{node.Hostname}\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t</Card>\n\n\t\t\t\t\t<Card className=\"bg-background\">\n\t\t\t\t\t\t<CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t<CardTitle className=\"text-sm font-medium\">\n\t\t\t\t\t\t\t\t\tManager Nodes\n\t\t\t\t\t\t\t\t</CardTitle>\n\t\t\t\t\t\t\t\t<Badge variant=\"green\">Online</Badge>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"p-2 bg-emerald-600/20 text-emerald-600 rounded-md\">\n\t\t\t\t\t\t\t\t<Monitor className=\"h-4 w-4 text-muted-foreground dark:text-emerald-600\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t<CardContent>\n\t\t\t\t\t\t\t<TooltipProvider>\n\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t<TooltipTrigger>\n\t\t\t\t\t\t\t\t\t\t<div className=\"text-2xl font-bold\">\n\t\t\t\t\t\t\t\t\t\t\t{managerNodesCount} / {totalNodes}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t\t\t\t<div className=\"max-h-48 overflow-y-auto\">\n\t\t\t\t\t\t\t\t\t\t\t{managerNodes.map((node) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<div key={node.ID} className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{node.Hostname}\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t</Card>\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"grid grid-cols-1 xl:grid-cols-2 2xl:grid-cols-3 gap-4\">\n\t\t\t\t\t{nodes.map((node) => (\n\t\t\t\t\t\t<NodeCard key={node.ID} node={node} serverId={serverId} />\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</Card>\n\t);\n}\n"
  },
  {
    "path": "apps/dokploy/components/icons/data-tools-icons.tsx",
    "content": "import { cn } from \"@/lib/utils\";\n\n// https://worldvectorlogo.com/downloaded/redis Ref\n\ninterface Props {\n\tclassName?: string;\n}\n\nexport const PostgresqlIcon = ({ className }: Props) => {\n\treturn (\n\t\t<svg\n\t\t\twidth=\"40\"\n\t\t\theight=\"40\"\n\t\t\tviewBox=\"0 0 40 40\"\n\t\t\tfill=\"none\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\tclassName={className}\n\t\t>\n\t\t\t<path\n\t\t\t\td=\"M35.5795 23.2987C35.3852 22.7102 34.8762 22.3002 34.2178 22.2018C33.9073 22.1555 33.5518 22.1753 33.1312 22.262C32.398 22.4133 31.854 22.4708 31.4568 22.482C32.9555 19.952 34.174 17.0668 34.8755 14.3508C36.0098 9.9592 35.4037 7.95855 34.6953 7.05362C32.8208 4.65839 30.0858 3.37162 26.7863 3.33225C25.0263 3.31073 23.4812 3.65825 22.6752 3.90818C21.9247 3.77577 21.1177 3.70177 20.271 3.68813C18.6838 3.6628 17.2815 4.00878 16.0832 4.71994C15.4199 4.49555 14.3552 4.1793 13.1256 3.9775C10.2338 3.50277 7.90314 3.87269 6.19836 5.07702C4.13406 6.53524 3.17706 9.0687 3.35406 12.6072C3.41028 13.7306 4.03874 17.1488 5.02824 20.3905C5.59689 22.2537 6.2033 23.801 6.83063 24.9898C7.7202 26.6755 8.67213 27.6682 9.74076 28.0247C10.3397 28.2242 11.4279 28.3638 12.5725 27.4107C12.7176 27.5863 12.9112 27.7608 13.168 27.9232C13.4943 28.1288 13.8932 28.297 14.2916 28.3967C15.7273 28.7555 17.0723 28.6657 18.2195 28.1627C18.2267 28.3667 18.2322 28.5617 18.2367 28.73C18.2443 29.0032 18.2518 29.2708 18.2618 29.5213C18.3298 31.2143 18.445 32.5308 18.7863 33.4522C18.8052 33.5027 18.8303 33.5798 18.8568 33.6618C19.0272 34.1832 19.3118 35.056 20.0363 35.7395C20.7863 36.4475 21.6937 36.6647 22.5247 36.6647C22.9415 36.6647 23.3392 36.61 23.6878 36.5353C24.9312 36.2688 26.3432 35.8628 27.3645 34.4085C28.3302 33.0337 28.7997 30.9628 28.8845 27.7C28.8955 27.6078 28.9057 27.5197 28.9155 27.4357L28.9357 27.2632L29.1632 27.2833L29.2218 27.2872C30.488 27.345 32.0363 27.0765 32.9872 26.6347C33.7387 26.286 36.1463 25.0148 35.5795 23.2987Z\"\n\t\t\t\tfill=\"black\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td=\"M33.4143 23.6325C29.6493 24.4092 29.3905 23.1343 29.3905 23.1343C33.3657 17.2358 35.0275 9.74828 33.5935 7.91574C29.681 2.91699 22.9087 5.28114 22.7957 5.34238L22.7593 5.34899C22.0153 5.19451 21.183 5.10259 20.2473 5.08729C18.5438 5.05943 17.2515 5.53394 16.2708 6.27759C16.2708 6.27759 4.18945 1.3005 4.75149 12.5372C4.87094 14.9276 8.17772 30.6247 12.1218 25.8835C13.5634 24.1497 14.9563 22.6838 14.9563 22.6838C15.6481 23.1433 16.4763 23.3778 17.3445 23.2937L17.412 23.2363C17.391 23.4517 17.4007 23.6622 17.439 23.9115C16.4229 25.0467 16.7215 25.246 14.6904 25.6642C12.635 26.0877 13.8424 26.8417 14.6307 27.039C15.5864 27.2778 17.7973 27.6163 19.2913 25.525L19.2318 25.7637C19.6298 26.0827 19.9093 27.8377 19.8625 29.429C19.8155 31.02 19.7843 32.1125 20.098 32.9658C20.4118 33.8192 20.7243 35.739 23.3945 35.1668C25.6257 34.6887 26.7818 33.4497 26.9427 31.3828C27.0568 29.9135 27.3152 30.1308 27.3315 28.817L27.5387 28.1952C27.7775 26.2033 27.5767 25.5608 28.9512 25.8597L29.2853 25.889C30.2968 25.935 31.6212 25.7262 32.3983 25.365C34.0717 24.5885 35.0642 23.2917 33.4142 23.6325H33.4143Z\"\n\t\t\t\tfill=\"#336791\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td=\"M16.978 13.606C16.6387 13.5588 16.3314 13.6025 16.1759 13.7203C16.0886 13.7865 16.0615 13.8632 16.0541 13.916C16.0347 14.0559 16.1327 14.2106 16.1929 14.2903C16.3633 14.5162 16.6122 14.6714 16.8587 14.7055C16.8943 14.7106 16.9298 14.7129 16.9652 14.7129C17.376 14.7129 17.7497 14.393 17.7825 14.1569C17.8237 13.8612 17.3943 13.6641 16.978 13.6062\"\n\t\t\t\tfill=\"white\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td=\"M28.218 13.6156C28.1855 13.3838 27.7732 13.3177 27.3817 13.3721C26.9907 13.4265 26.6117 13.6031 26.6433 13.8354C26.6687 14.016 26.9948 14.3244 27.381 14.3244C27.4137 14.3244 27.4465 14.3223 27.4797 14.3176C27.7375 14.2819 27.9267 14.1182 28.0165 14.0239C28.1532 13.88 28.2325 13.7198 28.218 13.6156Z\"\n\t\t\t\tfill=\"white\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td=\"M34.6672 23.544C34.5237 23.11 34.0615 22.9703 33.2938 23.1288C31.0145 23.5993 30.1982 23.2733 29.9302 23.076C31.7018 20.377 33.1595 17.1142 33.9457 14.0701C34.3182 12.6282 34.524 11.289 34.5408 10.1975C34.5593 8.99946 34.3553 8.11912 33.9345 7.58136C32.2378 5.41332 29.7475 4.25037 26.7332 4.21849C24.661 4.19516 22.91 4.72551 22.5707 4.87462C21.856 4.69689 21.0767 4.58774 20.2283 4.57382C18.6727 4.54862 17.328 4.92109 16.2147 5.68031C15.731 5.50029 14.4813 5.07122 12.9528 4.82502C10.3104 4.39964 8.21066 4.72196 6.71221 5.78351C4.92426 7.05021 4.09888 9.31456 4.25876 12.5135C4.31258 13.5897 4.92581 16.9005 5.89351 20.0712C7.16736 24.2445 8.55211 26.6068 10.009 27.0928C10.1796 27.1498 10.3762 27.1895 10.593 27.1895C11.1245 27.1895 11.7761 26.95 12.454 26.135C13.2809 25.143 14.1363 24.1752 15.019 23.2325C15.5917 23.5398 16.221 23.7115 16.8645 23.7288C16.8657 23.7457 16.8673 23.7625 16.869 23.7792C16.7582 23.9113 16.6497 24.0452 16.5435 24.1812C16.0977 24.7472 16.0048 24.865 14.5696 25.1605C14.1613 25.2448 13.077 25.4682 13.0611 26.2283C13.0438 27.0588 14.3429 27.4077 14.4909 27.4447C15.0067 27.5737 15.5035 27.6373 15.9774 27.6373C17.1298 27.6373 18.144 27.2587 18.9545 26.5258C18.9295 29.4863 19.053 32.4037 19.4085 33.2927C19.6997 34.0203 20.4108 35.7987 22.6575 35.7985C22.9872 35.7985 23.35 35.7602 23.7492 35.6745C26.094 35.172 27.1122 34.1357 27.506 31.8508C27.7168 30.6298 28.0785 27.7142 28.2487 26.1502C28.6077 26.2622 29.0698 26.3133 29.5695 26.3133C30.6117 26.3133 31.8143 26.0918 32.5685 25.7418C33.4157 25.3483 34.9445 24.383 34.6672 23.544ZM29.0835 12.9756C29.0757 13.4373 29.0122 13.8564 28.9448 14.294C28.8722 14.7646 28.7973 15.2511 28.7785 15.8416C28.7598 16.4164 28.8317 17.014 28.901 17.5918C29.0413 18.7592 29.1852 19.9608 28.628 21.1465C28.5355 20.9825 28.453 20.813 28.3812 20.639C28.312 20.4712 28.1615 20.2015 27.9533 19.8282C27.1432 18.3755 25.246 14.9732 26.2173 13.5849C26.5065 13.1717 27.2407 12.7468 29.0835 12.9756ZM26.8497 5.15344C29.5505 5.21306 31.687 6.22341 33.1997 8.15636C34.3598 9.63896 33.0823 16.385 29.384 22.2048C29.3468 22.1577 29.3093 22.1105 29.2718 22.0635L29.225 22.005C30.1807 20.4267 29.9938 18.865 29.8275 17.4807C29.7592 16.9123 29.6945 16.3758 29.711 15.8717C29.728 15.3374 29.7985 14.8792 29.867 14.436C29.9508 13.89 30.0363 13.325 30.0128 12.659C30.0303 12.5891 30.0375 12.5065 30.0283 12.4085C29.9682 11.7699 29.2388 9.85834 27.7527 8.12821C26.9397 7.18189 25.754 6.12287 24.1352 5.40866C24.8315 5.26434 25.7837 5.12971 26.8497 5.15344ZM11.7366 25.5383C10.9896 26.4365 10.4739 26.2643 10.3042 26.2078C9.19903 25.8392 7.91661 23.5032 6.78594 19.7988C5.80754 16.5936 5.23583 13.3705 5.19051 12.4668C5.04773 9.60841 5.74058 7.61639 7.25004 6.54587C9.70658 4.80384 13.7453 5.84654 15.3682 6.37536C15.3449 6.39841 15.3206 6.41994 15.2976 6.44332C12.6344 9.13281 12.6976 13.7278 12.7042 14.0088C12.7039 14.1171 12.713 14.2706 12.7255 14.4816C12.7713 15.2545 12.8566 16.6928 12.6287 18.3218C12.417 19.8357 12.8837 21.3172 13.9087 22.3868C14.014 22.4963 14.1245 22.6007 14.2401 22.6993C13.7838 23.188 12.7922 24.2687 11.7366 25.5383ZM14.5824 21.7413C13.7562 20.8792 13.381 19.68 13.5528 18.451C13.7933 16.7303 13.7046 15.2316 13.6568 14.4264C13.6501 14.3137 13.6442 14.215 13.6408 14.1371C14.0298 13.7921 15.8327 12.8262 17.1183 13.1208C17.7052 13.2551 18.0627 13.6546 18.2112 14.3419C18.9805 17.8997 18.313 19.3825 17.7768 20.5742C17.6663 20.8197 17.5618 21.0517 17.4727 21.2917L17.4035 21.4773C17.2285 21.9465 17.0658 22.3828 16.9648 22.797C16.0865 22.7945 15.2321 22.4192 14.5824 21.7412V21.7413ZM14.7172 26.5393C14.4607 26.4753 14.2301 26.364 14.0948 26.2718C14.2078 26.2187 14.4089 26.1462 14.7579 26.0743C16.4464 25.7268 16.7072 25.4813 17.2765 24.7583C17.4072 24.5925 17.5552 24.4047 17.76 24.1758L17.7603 24.1755C18.0655 23.8337 18.2052 23.8917 18.4583 23.9968C18.6637 24.0817 18.8635 24.3388 18.9445 24.6218C18.9828 24.7557 19.0258 25.0093 18.885 25.2068C17.6955 26.8723 15.9621 26.851 14.7172 26.5393ZM23.5537 34.7623C21.4882 35.2048 20.7567 34.1508 20.2748 32.9462C19.9638 32.1682 19.8108 28.6607 19.9193 24.7872C19.9207 24.7357 19.9133 24.6858 19.8992 24.639C19.8865 24.5465 19.8672 24.455 19.8415 24.3653C19.6802 23.8017 19.2872 23.3303 18.8155 23.1347C18.6282 23.0572 18.2843 22.9148 17.871 23.0205C17.9592 22.6573 18.112 22.2473 18.2777 21.8033L18.3472 21.6165C18.4255 21.4062 18.5237 21.1878 18.6275 20.957C19.1887 19.7102 19.9573 18.0025 19.1232 14.1447C18.8107 12.6998 17.7673 11.9941 16.1855 12.158C15.2373 12.2561 14.3697 12.6387 13.937 12.8581C13.844 12.9052 13.7589 12.9508 13.6794 12.9951C13.8001 11.5392 14.2564 8.81831 15.9632 7.09681C17.038 6.01312 18.4692 5.47791 20.2128 5.50677C23.6488 5.56292 25.8522 7.32621 27.0957 8.79566C28.1672 10.0618 28.7473 11.3373 28.9788 12.0252C27.2375 11.8481 26.0532 12.1918 25.4528 13.0502C24.1467 14.9173 26.1673 18.541 27.1385 20.2827C27.3167 20.6018 27.4703 20.8777 27.5187 20.9948C27.835 21.7613 28.2443 22.273 28.5432 22.6465C28.6348 22.761 28.7238 22.872 28.7913 22.9688C28.264 23.121 27.3167 23.4723 27.403 25.2283C27.3333 26.1095 26.8382 30.2348 26.5867 31.6923C26.2545 33.618 25.546 34.3352 23.5537 34.7623ZM32.1757 24.8957C31.6363 25.146 30.7338 25.3337 29.8765 25.374C28.9295 25.4183 28.4473 25.268 28.334 25.1755C28.2808 24.0812 28.6882 23.9668 29.1192 23.8458C29.1868 23.8268 29.253 23.8082 29.3168 23.7858C29.3563 23.8182 29.3998 23.8502 29.4475 23.8817C30.2085 24.384 31.566 24.438 33.4827 24.0425L33.5037 24.0383C33.2452 24.28 32.8028 24.6043 32.1757 24.8957Z\"\n\t\t\t\tfill=\"white\"\n\t\t\t/>\n\t\t</svg>\n\t);\n};\nexport const MysqlIcon = ({ className }: Props) => {\n\treturn (\n\t\t<svg\n\t\t\twidth=\"40\"\n\t\t\theight=\"40\"\n\t\t\tviewBox=\"0 0 40 40\"\n\t\t\tfill=\"none\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\tclassName={className}\n\t\t>\n\t\t\t<path\n\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\tclipRule=\"evenodd\"\n\t\t\t\td=\"M12.4844 10.4823C12.2084 10.4814 11.9336 10.5164 11.6667 10.5865V10.6229H11.7062C11.8974 10.9115 12.1105 11.1848 12.3437 11.4406C12.5042 11.7594 12.6437 12.0771 12.8031 12.3958C12.8229 12.376 12.8427 12.3552 12.8427 12.3552C12.9907 12.2377 13.1065 12.0847 13.1794 11.9104C13.2522 11.7361 13.2797 11.5462 13.2594 11.3583C13.1721 11.2238 13.0922 11.0847 13.0198 10.9417C12.9 10.7427 12.6406 10.6427 12.4812 10.4833\"\n\t\t\t\tfill=\"#5D87A1\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\tclipRule=\"evenodd\"\n\t\t\t\td=\"M32.2708 27.8657C30.9568 27.7733 29.6383 27.9638 28.4042 28.424C28.1052 28.5438 27.6282 28.5438 27.5865 28.922C27.7468 29.0813 27.7657 29.3387 27.9063 29.5605C28.1792 30.0223 28.5298 30.4337 28.9427 30.7762C29.3593 31.0948 29.776 31.4125 30.2188 31.6917C30.9948 32.172 31.873 32.45 32.6292 32.9282C33.0688 33.2073 33.5063 33.5657 33.9458 33.8657C34.1647 34.025 34.3032 34.2823 34.5823 34.3865V34.3262C34.5003 34.1047 34.3988 33.891 34.2792 33.6875C34.0802 33.4897 33.8802 33.3095 33.6802 33.1105C33.096 32.3378 32.3968 31.6592 31.6073 31.098C30.9688 30.6583 29.573 30.0563 29.3157 29.3272L29.275 29.2865C29.7423 29.2203 30.2027 29.113 30.651 28.9657C31.3282 28.7865 31.9458 28.8272 32.6427 28.6532C32.9625 28.573 33.5407 28.374 33.5407 28.374V28.0615C33.1843 27.7073 32.9292 27.2333 32.5542 26.899C31.534 26.0085 30.4467 25.1977 29.3022 24.474C28.6907 24.0792 27.9022 23.825 27.251 23.4887C27.0157 23.3698 26.626 23.3115 26.4833 23.1137C26.1595 22.6385 25.8885 22.1297 25.675 21.5958C25.1042 20.5125 24.551 19.3115 24.0593 18.1657C23.7683 17.3978 23.4327 16.6475 23.0542 15.9188C21.2275 12.813 18.5907 10.2624 15.4261 8.53964C14.6276 8.15314 13.7786 7.88102 12.9042 7.73131C12.4104 7.71047 11.9188 7.67194 11.4261 7.65319C11.108 7.44481 10.8055 7.21366 10.5209 6.96152C9.39378 6.24797 6.49795 4.71464 5.66878 6.74486C5.13753 8.02714 6.45837 9.28756 6.91148 9.93861C7.29357 10.3976 7.6302 10.8927 7.9167 11.4167C8.05523 11.7521 8.09481 12.1074 8.2292 12.4584C8.51835 13.3595 8.86168 14.2424 9.25731 15.1021C9.46891 15.5271 9.71268 15.9352 9.98648 16.323C10.1459 16.5407 10.4209 16.6355 10.4802 16.9948C10.2618 17.4643 10.109 17.9618 10.0261 18.473C9.68173 19.5603 9.55502 20.705 9.65313 21.8413C9.75127 22.9777 10.0723 24.0837 10.5979 25.0958C10.9104 25.5887 11.6625 26.673 12.6677 26.2583C13.5542 25.9042 13.3573 24.7803 13.6136 23.7958C13.6719 23.5573 13.6334 23.4012 13.7511 23.2438V23.4355C13.7511 23.4355 14.2542 24.5407 14.5042 25.1022C15.1841 26.1323 16.0287 27.0438 17.0042 27.8C17.39 28.137 17.701 28.5512 17.9167 29.0157V29.373H18.3615C18.3522 29.2118 18.3075 29.0548 18.2307 28.913C18.1538 28.771 18.0467 28.6478 17.9167 28.5522C17.552 28.1767 17.2178 27.7727 16.9177 27.3438C16.1024 26.1825 15.3833 24.9567 14.7677 23.6782C14.4552 23.0532 14.1917 22.3678 13.9417 21.7438C13.8271 21.5032 13.8271 21.1397 13.6344 21.0147C13.2786 21.4357 12.9698 21.8943 12.7136 22.3823C12.4025 23.3688 12.2215 24.3917 12.175 25.425C12.099 25.4458 12.1365 25.425 12.099 25.4647C11.4854 25.3032 11.274 24.6397 11.0427 24.0772C10.4453 22.3423 10.3851 20.4677 10.8698 18.698C11.0031 18.2762 11.5813 16.947 11.35 16.5438C11.2344 16.1594 10.85 15.9396 10.6396 15.6365C10.371 15.2287 10.1398 14.7975 9.94898 14.348C9.4917 13.2271 9.26045 11.9771 8.76253 10.848C8.4869 10.3049 8.16596 9.78606 7.80315 9.29694C7.40181 8.80832 7.0478 8.28271 6.74587 7.72714C6.65003 7.50527 6.51565 7.14277 6.66878 6.90111C6.67911 6.83397 6.71103 6.77204 6.75972 6.72467C6.8084 6.67731 6.87118 6.64709 6.93856 6.63861C7.18648 6.41777 7.89795 6.69902 8.1469 6.81986C8.81602 7.08327 9.45337 7.42116 10.0469 7.82714C10.3156 8.02922 10.949 8.54069 10.949 8.54069H11.1365C11.774 8.67922 12.4906 8.57922 13.0906 8.75944C14.1009 9.09619 15.065 9.55812 15.9604 10.1344C18.5997 11.8169 20.7453 14.1695 22.1782 16.9522C22.4177 17.4095 22.5188 17.8292 22.7375 18.3063C23.1542 19.2855 23.675 20.2855 24.0917 21.2375C24.4593 22.1795 24.9347 23.0758 25.5083 23.9083C25.8063 24.325 27.0032 24.5458 27.5417 24.7647C28.0093 24.9265 28.4683 25.1125 28.9167 25.322C29.5948 25.7387 30.2708 26.2188 30.9093 26.6762C31.2272 26.9157 32.224 27.4137 32.2843 27.8125\"\n\t\t\t\tfill=\"#00758F\"\n\t\t\t/>\n\t\t</svg>\n\t);\n};\nexport const MariadbIcon = ({ className }: Props) => {\n\treturn (\n\t\t<svg\n\t\t\twidth=\"40\"\n\t\t\theight=\"40\"\n\t\t\tviewBox=\"0 0 40 40\"\n\t\t\tfill=\"none\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\tclassName={className}\n\t\t>\n\t\t\t<path\n\t\t\t\td=\"M38.1637 8.19202C38.0639 8.10928 37.9372 8.0659 37.8075 8.07003C37.4539 8.07003 36.9964 8.314 36.7512 8.43598L36.6524 8.486C36.2404 8.68747 35.7917 8.80285 35.3337 8.8251C34.8629 8.83973 34.4567 8.8678 33.9309 8.92147C30.8009 9.2435 29.4115 11.6392 28.0685 13.9557C27.3365 15.2157 26.5827 16.5173 25.5472 17.5273C25.333 17.735 25.1052 17.9282 24.8652 18.1055C23.7942 18.9045 22.4487 19.468 21.3974 19.8705C20.3897 20.256 19.2894 20.6025 18.2257 20.9367C17.2499 21.2442 16.3338 21.5332 15.4885 21.8467C15.1067 21.9893 14.7822 22.0907 14.4968 22.1918C13.7271 22.4493 13.1708 22.6335 12.3609 23.1885C12.0449 23.4043 11.7278 23.6398 11.507 23.8155C10.8638 24.3293 10.2945 24.9295 9.81509 25.5988C9.40495 26.2163 8.93065 26.7888 8.4001 27.3067C8.22932 27.475 7.92559 27.5505 7.47059 27.5505C6.93754 27.5505 6.29102 27.4408 5.6067 27.3248C4.90287 27.2028 4.17342 27.081 3.54887 27.081C3.0402 27.081 2.6523 27.1627 2.36077 27.3322C2.36077 27.3322 1.87284 27.6177 1.66669 27.986L1.86917 28.0775C2.18275 28.2468 2.47374 28.455 2.73525 28.6972C3.00602 28.9482 3.3082 29.1632 3.63425 29.3363C3.7385 29.3782 3.83284 29.4413 3.91115 29.5218C3.82577 29.6438 3.70012 29.8072 3.5696 29.9792C2.84747 30.9233 2.42664 31.521 2.66815 31.8455C2.78092 31.9047 2.90685 31.934 3.0341 31.931C4.60767 31.931 5.45179 31.5223 6.52157 31.0038C6.83507 30.8623 7.15587 30.7075 7.52182 30.5488C8.14637 30.278 8.81972 29.845 9.53209 29.3877C10.4762 28.7777 11.4521 28.1532 12.3975 27.8507C13.1762 27.6123 13.9875 27.4978 14.8017 27.5115C15.8056 27.5115 16.8547 27.647 17.8695 27.7762C18.627 27.8738 19.4102 27.9738 20.1787 28.0202C20.4775 28.0373 20.7544 28.0458 21.0229 28.0458C21.3825 28.047 21.7422 28.0283 22.0999 27.9897L22.1854 27.9592C22.7245 27.6287 22.977 26.9175 23.2222 26.2295C23.3795 25.7867 23.5112 25.3903 23.7162 25.1317C23.729 25.1195 23.743 25.1085 23.7577 25.0987C23.7674 25.0933 23.7787 25.0913 23.7899 25.093C23.8009 25.0948 23.811 25.1003 23.8187 25.1085C23.8187 25.1085 23.8187 25.1085 23.8187 25.128C23.6894 27.8177 22.611 29.5193 21.5157 31.0417L20.7837 31.826C20.7837 31.826 21.8072 31.826 22.389 31.6015C24.5139 30.966 26.1192 29.5657 27.2865 27.3322C27.5745 26.7592 27.8319 26.1712 28.0575 25.5708C28.077 25.5208 28.2624 25.428 28.2442 25.6928C28.2442 25.7697 28.2332 25.855 28.227 25.9367C28.227 25.9892 28.2197 26.0428 28.2174 26.0965C28.1869 26.4685 28.0954 27.2652 28.0954 27.2652L28.7515 26.9127C30.3374 25.9098 31.5572 23.896 32.4794 20.7562C32.8649 19.4485 33.1465 18.1507 33.3954 17.004C33.693 15.6341 33.9505 14.4509 34.2494 13.9935C34.7104 13.2762 35.4142 12.7895 36.0949 12.3199L36.373 12.1259C37.2269 11.5258 38.0807 10.8305 38.2687 9.53748V9.50942C38.4102 8.55065 38.2942 8.30423 38.1637 8.19202Z\"\n\t\t\t\tfill=\"#231F20\"\n\t\t\t/>\n\t\t</svg>\n\t);\n};\nexport const MongodbIcon = ({ className }: Props) => {\n\treturn (\n\t\t<svg\n\t\t\twidth=\"40\"\n\t\t\theight=\"40\"\n\t\t\tviewBox=\"8.738 -5.03622834 17.45992422 39.40619484\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\tclassName={className}\n\t\t>\n\t\t\t<path\n\t\t\t\td=\"m15.9.087.854 1.604c.192.296.4.558.645.802a22.406 22.406 0 0 1 2.004 2.266c1.447 1.9 2.423 4.01 3.12 6.292.418 1.394.645 2.824.662 4.27.07 4.323-1.412 8.035-4.4 11.12a12.7 12.7 0 0 1 -1.57 1.342c-.296 0-.436-.227-.558-.436a3.589 3.589 0 0 1 -.436-1.255c-.105-.523-.174-1.046-.14-1.586v-.244c-.024-.052-.285-24.052-.181-24.175z\"\n\t\t\t\tfill=\"#599636\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td=\"m15.9.034c-.035-.07-.07-.017-.105.017.017.35-.105.662-.296.96-.21.296-.488.523-.767.767-1.55 1.342-2.77 2.963-3.747 4.776-1.3 2.44-1.97 5.055-2.16 7.808-.087.993.314 4.497.627 5.508.854 2.684 2.388 4.933 4.375 6.885.488.47 1.01.906 1.55 1.325.157 0 .174-.14.21-.244a4.78 4.78 0 0 0 .157-.68l.35-2.614z\"\n\t\t\t\tfill=\"#6cac48\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td=\"m16.754 28.845c.035-.4.227-.732.436-1.063-.21-.087-.366-.26-.488-.453a3.235 3.235 0 0 1 -.26-.575c-.244-.732-.296-1.5-.366-2.248v-.453c-.087.07-.105.662-.105.75a17.37 17.37 0 0 1 -.314 2.353c-.052.314-.087.627-.28.906 0 .035 0 .07.017.122.314.924.4 1.865.453 2.824v.35c0 .418-.017.33.33.47.14.052.296.07.436.174.105 0 .122-.087.122-.157l-.052-.575v-1.604c-.017-.28.035-.558.07-.82z\"\n\t\t\t\tfill=\"#c2bfbf\"\n\t\t\t/>\n\t\t</svg>\n\t);\n};\n\nexport const RedisIcon = ({ className }: Props) => {\n\treturn (\n\t\t<svg\n\t\t\twidth=\"40\"\n\t\t\theight=\"40\"\n\t\t\tviewBox=\"0 0 256 220\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\tpreserveAspectRatio=\"xMinYMin meet\"\n\t\t\tclassName={className}\n\t\t>\n\t\t\t<path\n\t\t\t\td=\"M245.97 168.943c-13.662 7.121-84.434 36.22-99.501 44.075-15.067 7.856-23.437 7.78-35.34 2.09-11.902-5.69-87.216-36.112-100.783-42.597C3.566 169.271 0 166.535 0 163.951v-25.876s98.05-21.345 113.879-27.024c15.828-5.679 21.32-5.884 34.79-.95 13.472 4.936 94.018 19.468 107.331 24.344l-.006 25.51c.002 2.558-3.07 5.364-10.024 8.988\"\n\t\t\t\tfill=\"#912626\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td=\"M245.965 143.22c-13.661 7.118-84.431 36.218-99.498 44.072-15.066 7.857-23.436 7.78-35.338 2.09-11.903-5.686-87.214-36.113-100.78-42.594-13.566-6.485-13.85-10.948-.524-16.166 13.326-5.22 88.224-34.605 104.055-40.284 15.828-5.677 21.319-5.884 34.789-.948 13.471 4.934 83.819 32.935 97.13 37.81 13.316 4.881 13.827 8.9.166 16.02\"\n\t\t\t\tfill=\"#C6302B\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td=\"M245.97 127.074c-13.662 7.122-84.434 36.22-99.501 44.078-15.067 7.853-23.437 7.777-35.34 2.087-11.903-5.687-87.216-36.112-100.783-42.597C3.566 127.402 0 124.67 0 122.085V96.206s98.05-21.344 113.879-27.023c15.828-5.679 21.32-5.885 34.79-.95C162.142 73.168 242.688 87.697 256 92.574l-.006 25.513c.002 2.557-3.07 5.363-10.024 8.987\"\n\t\t\t\tfill=\"#912626\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td=\"M245.965 101.351c-13.661 7.12-84.431 36.218-99.498 44.075-15.066 7.854-23.436 7.777-35.338 2.087-11.903-5.686-87.214-36.112-100.78-42.594-13.566-6.483-13.85-10.947-.524-16.167C23.151 83.535 98.05 54.148 113.88 48.47c15.828-5.678 21.319-5.884 34.789-.949 13.471 4.934 83.819 32.933 97.13 37.81 13.316 4.88 13.827 8.9.166 16.02\"\n\t\t\t\tfill=\"#C6302B\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td=\"M245.97 83.653c-13.662 7.12-84.434 36.22-99.501 44.078-15.067 7.854-23.437 7.777-35.34 2.087-11.903-5.687-87.216-36.113-100.783-42.595C3.566 83.98 0 81.247 0 78.665v-25.88s98.05-21.343 113.879-27.021c15.828-5.68 21.32-5.884 34.79-.95C162.142 29.749 242.688 44.278 256 49.155l-.006 25.512c.002 2.555-3.07 5.361-10.024 8.986\"\n\t\t\t\tfill=\"#912626\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td=\"M245.965 57.93c-13.661 7.12-84.431 36.22-99.498 44.074-15.066 7.854-23.436 7.777-35.338 2.09C99.227 98.404 23.915 67.98 10.35 61.497-3.217 55.015-3.5 50.55 9.825 45.331 23.151 40.113 98.05 10.73 113.88 5.05c15.828-5.679 21.319-5.883 34.789-.948 13.471 4.935 83.819 32.934 97.13 37.811 13.316 4.876 13.827 8.897.166 16.017\"\n\t\t\t\tfill=\"#C6302B\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td=\"M159.283 32.757l-22.01 2.285-4.927 11.856-7.958-13.23-25.415-2.284 18.964-6.839-5.69-10.498 17.755 6.944 16.738-5.48-4.524 10.855 17.067 6.391M131.032 90.275L89.955 73.238l58.86-9.035-17.783 26.072M74.082 39.347c17.375 0 31.46 5.46 31.46 12.194 0 6.736-14.085 12.195-31.46 12.195s-31.46-5.46-31.46-12.195c0-6.734 14.085-12.194 31.46-12.194\"\n\t\t\t\tfill=\"#FFF\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td=\"M185.295 35.998l34.836 13.766-34.806 13.753-.03-27.52\"\n\t\t\t\tfill=\"#621B1C\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td=\"M146.755 51.243l38.54-15.245.03 27.519-3.779 1.478-34.791-13.752\"\n\t\t\t\tfill=\"#9A2928\"\n\t\t\t/>\n\t\t</svg>\n\t);\n};\n\nexport const GitlabIcon = ({ className }: Props) => {\n\treturn (\n\t\t<svg\n\t\t\taria-label=\"gitlab\"\n\t\t\twidth=\"14\"\n\t\t\theight=\"14\"\n\t\t\tviewBox=\"0 0 14 14\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\tclassName={cn(\"text-white\", className)}\n\t\t>\n\t\t\t<path\n\t\t\t\td=\"m13.767 5.854-.02-.05L11.842.83a.5.5 0 0 0-.493-.312.5.5 0 0 0-.287.107.5.5 0 0 0-.169.257L9.607 4.819h-5.21L3.11.883A.5.5 0 0 0 2.162.83L.252 5.801l-.018.05a3.54 3.54 0 0 0 1.173 4.09l.007.005.017.012 2.903 2.174L5.77 13.22l.875.66a.59.59 0 0 0 .711 0l.875-.66 1.436-1.087 2.92-2.187.008-.006a3.54 3.54 0 0 0 1.172-4.085\"\n\t\t\t\tfill=\"#E24329\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td=\"m13.767 5.854-.02-.05a6.4 6.4 0 0 0-2.562 1.152L7 10.12l2.666 2.015 2.92-2.187.007-.006a3.54 3.54 0 0 0 1.174-4.088\"\n\t\t\t\tfill=\"#FC6D26\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td=\"m4.334 12.135 1.436 1.087.875.66a.59.59 0 0 0 .711 0l.875-.66 1.436-1.087S8.425 11.195 7 10.12c-1.425 1.075-2.666 2.015-2.666 2.015\"\n\t\t\t\tfill=\"#FCA326\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td=\"M2.814 6.956A6.4 6.4 0 0 0 .253 5.8l-.02.05a3.54 3.54 0 0 0 1.174 4.09l.007.005.017.012 2.903 2.174L7 10.117z\"\n\t\t\t\tfill=\"#FC6D26\"\n\t\t\t/>\n\t\t</svg>\n\t);\n};\n\nexport const GithubIcon = ({ className }: Props) => {\n\treturn (\n\t\t<svg\n\t\t\taria-label=\"github\"\n\t\t\theight=\"18\"\n\t\t\tviewBox=\"0 0 14 14\"\n\t\t\twidth=\"18\"\n\t\t\tclassName={className}\n\t\t>\n\t\t\t<path\n\t\t\t\td=\"M7 .175c-3.872 0-7 3.128-7 7 0 3.084 2.013 5.71 4.79 6.65.35.066.482-.153.482-.328v-1.181c-1.947.415-2.363-.941-2.363-.941-.328-.81-.787-1.028-.787-1.028-.634-.438.044-.416.044-.416.7.044 1.071.722 1.071.722.635 1.072 1.641.766 2.035.59.066-.459.24-.765.437-.94-1.553-.175-3.193-.787-3.193-3.456 0-.766.262-1.378.721-1.881-.065-.175-.306-.897.066-1.86 0 0 .59-.197 1.925.722a6.754 6.754 0 0 1 1.75-.24c.59 0 1.203.087 1.75.24 1.335-.897 1.925-.722 1.925-.722.372.963.131 1.685.066 1.86.46.48.722 1.115.722 1.88 0 2.691-1.641 3.282-3.194 3.457.24.219.481.634.481 1.29v1.926c0 .197.131.415.481.328C11.988 12.884 14 10.259 14 7.175c0-3.872-3.128-7-7-7z\"\n\t\t\t\tfill=\"currentColor\"\n\t\t\t\tfillRule=\"nonzero\"\n\t\t\t/>\n\t\t</svg>\n\t);\n};\n\nexport const BitbucketIcon = ({ className }: Props) => {\n\treturn (\n\t\t<svg\n\t\t\twidth=\"14\"\n\t\t\theight=\"13\"\n\t\t\tviewBox=\"0 0 14 13\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\tclassName={className}\n\t\t>\n\t\t\t<path\n\t\t\t\td=\"M.454 0a.448.448 0 0 0-.448.52l1.903 11.556a.61.61 0 0 0 .597.509h9.132a.45.45 0 0 0 .448-.377L13.994.525a.448.448 0 0 0-.448-.52zM8.47 8.352H5.555l-.79-4.121h4.411z\"\n\t\t\t\tfill=\"#2684FF\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td=\"M13.384 4.23H9.176L8.47 8.353H5.555L2.113 12.44c.11.095.248.147.393.148h9.134a.45.45 0 0 0 .448-.377z\"\n\t\t\t\tfill=\"url(#a)\"\n\t\t\t/>\n\t\t\t<defs>\n\t\t\t\t<linearGradient\n\t\t\t\t\tid=\"a\"\n\t\t\t\t\tx1=\"14.357\"\n\t\t\t\t\ty1=\"5.383\"\n\t\t\t\t\tx2=\"7.402\"\n\t\t\t\t\ty2=\"10.814\"\n\t\t\t\t\tgradientUnits=\"userSpaceOnUse\"\n\t\t\t\t>\n\t\t\t\t\t<stop offset=\".18\" stopColor=\"#0052CC\" />\n\t\t\t\t\t<stop offset=\"1\" stopColor=\"#2684FF\" />\n\t\t\t\t</linearGradient>\n\t\t\t</defs>\n\t\t</svg>\n\t);\n};\n\nexport const GiteaIcon = ({ className }: Props) => {\n\treturn (\n\t\t<svg\n\t\t\tclassName={className}\n\t\t\tversion=\"1.1\"\n\t\t\tid=\"main_outline\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\twidth=\"18\"\n\t\t\theight=\"18\"\n\t\t\tviewBox=\"5.67 143.05 628.65 387.55\"\n\t\t\tenableBackground=\"new 0 0 640 640\"\n\t\t>\n\t\t\t<g>\n\t\t\t\t<path\n\t\t\t\t\tid=\"teabag\"\n\t\t\t\t\tstyle={{ fill: \"#FFFFFF\" }}\n\t\t\t\t\td=\"M395.9,484.2l-126.9-61c-12.5-6-17.9-21.2-11.8-33.8l61-126.9c6-12.5,21.2-17.9,33.8-11.8c17.2,8.3,27.1,13,27.1,13l-0.1-109.2l16.7-0.1l0.1,117.1c0,0,57.4,24.2,83.1,40.1c3.7,2.3,10.2,6.8,12.9,14.4c2.1,6.1,2,13.1-1,19.3l-61,126.9C423.6,484.9,408.4,490.3,395.9,484.2z\"\n\t\t\t\t/>\n\t\t\t\t<g>\n\t\t\t\t\t<g>\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\tstyle={{ fill: \"#609926\" }}\n\t\t\t\t\t\t\td=\"M622.7,149.8c-4.1-4.1-9.6-4-9.6-4s-117.2,6.6-177.9,8c-13.3,0.3-26.5,0.6-39.6,0.7c0,39.1,0,78.2,0,117.2c-5.5-2.6-11.1-5.3-16.6-7.9c0-36.4-0.1-109.2-0.1-109.2c-29,0.4-89.2-2.2-89.2-2.2s-141.4-7.1-156.8-8.5c-9.8-0.6-22.5-2.1-39,1.5c-8.7,1.8-33.5,7.4-53.8,26.9C-4.9,212.4,6.6,276.2,8,285.8c1.7,11.7,6.9,44.2,31.7,72.5c45.8,56.1,144.4,54.8,144.4,54.8s12.1,28.9,30.6,55.5c25,33.1,50.7,58.9,75.7,62c63,0,188.9-0.1,188.9-0.1s12,0.1,28.3-10.3c14-8.5,26.5-23.4,26.5-23.4s12.9-13.8,30.9-45.3c5.5-9.7,10.1-19.1,14.1-28c0,0,55.2-117.1,55.2-231.1C633.2,157.9,624.7,151.8,622.7,149.8z M125.6,353.9c-25.9-8.5-36.9-18.7-36.9-18.7S69.6,321.8,60,295.4c-16.5-44.2-1.4-71.2-1.4-71.2s8.4-22.5,38.5-30c13.8-3.7,31-3.1,31-3.1s7.1,59.4,15.7,94.2c7.2,29.2,24.8,77.7,24.8,77.7S142.5,359.9,125.6,353.9z M425.9,461.5c0,0-6.1,14.5-19.6,15.4c-5.8,0.4-10.3-1.2-10.3-1.2s-0.3-0.1-5.3-2.1l-112.9-55c0,0-10.9-5.7-12.8-15.6c-2.2-8.1,2.7-18.1,2.7-18.1L322,273c0,0,4.8-9.7,12.2-13c0.6-0.3,2.3-1,4.5-1.5c8.1-2.1,18,2.8,18,2.8l110.7,53.7c0,0,12.6,5.7,15.3,16.2c1.9,7.4-0.5,14-1.8,17.2C474.6,363.8,425.9,461.5,425.9,461.5z\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\tstyle={{ fill: \"#609926\" }}\n\t\t\t\t\t\t\td=\"M326.8,380.1c-8.2,0.1-15.4,5.8-17.3,13.8c-1.9,8,2,16.3,9.1,20c7.7,4,17.5,1.8,22.7-5.4c5.1-7.1,4.3-16.9-1.8-23.1l24-49.1c1.5,0.1,3.7,0.2,6.2-0.5c4.1-0.9,7.1-3.6,7.1-3.6c4.2,1.8,8.6,3.8,13.2,6.1c4.8,2.4,9.3,4.9,13.4,7.3c0.9,0.5,1.8,1.1,2.8,1.9c1.6,1.3,3.4,3.1,4.7,5.5c1.9,5.5-1.9,14.9-1.9,14.9c-2.3,7.6-18.4,40.6-18.4,40.6c-8.1-0.2-15.3,5-17.7,12.5c-2.6,8.1,1.1,17.3,8.9,21.3c7.8,4,17.4,1.7,22.5-5.3c5-6.8,4.6-16.3-1.1-22.6c1.9-3.7,3.7-7.4,5.6-11.3c5-10.4,13.5-30.4,13.5-30.4c0.9-1.7,5.7-10.3,2.7-21.3c-2.5-11.4-12.6-16.7-12.6-16.7c-12.2-7.9-29.2-15.2-29.2-15.2s0-4.1-1.1-7.1c-1.1-3.1-2.8-5.1-3.9-6.3c4.7-9.7,9.4-19.3,14.1-29c-4.1-2-8.1-4-12.2-6.1c-4.8,9.8-9.7,19.7-14.5,29.5c-6.7-0.1-12.9,3.5-16.1,9.4c-3.4,6.3-2.7,14.1,1.9,19.8C343.2,346.5,335,363.3,326.8,380.1z\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</g>\n\t\t\t\t</g>\n\t\t\t</g>\n\t\t</svg>\n\t);\n};\n\nexport const DockerIcon = ({ className }: Props) => {\n\treturn (\n\t\t<svg\n\t\t\theight=\"24\"\n\t\t\tviewBox=\"-.557 117.607 598.543 423.631\"\n\t\t\twidth=\"24\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\tclassName={className}\n\t\t>\n\t\t\t<g fill=\"#0091e2\">\n\t\t\t\t<path d=\"m592.162 277.804c-1.664-1.37-16.642-12.597-48.815-12.597-8.321 0-16.92.822-25.24 2.191-6.102-41.898-41.327-62.162-42.714-63.257l-8.598-4.93-5.547 7.942c-6.934 10.68-12.204 22.729-15.255 35.052-5.824 23.824-2.219 46.279 9.985 65.447-14.7 8.216-38.553 10.133-43.545 10.406h-393.853c-10.262 0-18.583 8.216-18.583 18.348-.554 33.956 5.27 67.912 17.197 99.951 13.59 35.052 33.838 61.067 59.91 76.95 29.4 17.799 77.383 27.931 131.468 27.931 24.408 0 48.815-2.19 72.946-6.572 33.56-6.025 65.734-17.526 95.412-34.23a260.485 260.485 0 0 0 64.902-52.577c31.342-34.778 49.925-73.663 63.515-108.167h5.547c34.116 0 55.195-13.418 66.844-24.92 7.766-7.12 13.59-15.882 17.751-25.74l2.497-7.12z\" />\n\t\t\t\t<path d=\"m55.193 306.83h52.698c2.497 0 4.716-1.916 4.716-4.654v-46.553c0-2.465-1.942-4.655-4.716-4.655h-52.698c-2.496 0-4.715 1.916-4.715 4.655v46.553c.277 2.738 2.219 4.655 4.715 4.655zm72.668 0h52.699c2.496 0 4.715-1.916 4.715-4.654v-46.553c0-2.465-1.942-4.655-4.715-4.655h-52.7c-2.496 0-4.715 1.916-4.715 4.655v46.553c.278 2.738 2.22 4.655 4.715 4.655m74.055 0h52.699c2.496 0 4.715-1.917 4.715-4.655v-46.553c0-2.465-1.942-4.655-4.715-4.655h-52.699c-2.496 0-4.715 1.916-4.715 4.655v46.553c0 2.738 1.942 4.655 4.715 4.655zm72.946 0h52.699c2.496 0 4.715-1.917 4.715-4.655v-46.553c0-2.465-1.942-4.655-4.715-4.655h-52.699c-2.496 0-4.715 1.916-4.715 4.655v46.553c0 2.738 2.219 4.655 4.715 4.655zm-147-66.543h52.698c2.496 0 4.715-2.19 4.715-4.655v-46.553c0-2.465-1.942-4.656-4.715-4.656h-52.699c-2.496 0-4.715 1.917-4.715 4.656v46.553c.278 2.464 2.22 4.655 4.715 4.655m74.055 0h52.699c2.496 0 4.715-2.19 4.715-4.655v-46.553c0-2.465-1.942-4.656-4.715-4.656h-52.699c-2.496 0-4.715 1.917-4.715 4.656v46.553c0 2.464 1.942 4.655 4.715 4.655m72.946 0h52.699c2.496 0 4.715-2.19 4.715-4.655v-46.553c0-2.465-2.22-4.656-4.715-4.656h-52.699c-2.496 0-4.715 1.917-4.715 4.656v46.553c0 2.464 2.219 4.655 4.715 4.655m0-66.817h52.699c2.496 0 4.715-1.917 4.715-4.655v-46.553c0-2.465-2.22-4.656-4.715-4.656h-52.699c-2.496 0-4.715 1.917-4.715 4.656v46.553c0 2.464 2.219 4.655 4.715 4.655m73.5 133.36h52.699c2.496 0 4.715-1.917 4.715-4.655v-46.553c0-2.465-1.941-4.655-4.715-4.655h-52.698c-2.497 0-4.716 1.916-4.716 4.655v46.553c.278 2.738 2.22 4.655 4.716 4.655\" />\n\t\t\t</g>\n\t\t</svg>\n\t);\n};\n\nexport const GitIcon = ({ className }: Props) => {\n\treturn (\n\t\t<svg\n\t\t\twidth=\"20\"\n\t\t\theight=\"20\"\n\t\t\tviewBox=\"0 0 256 256\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\tpreserveAspectRatio=\"xMinYMin meet\"\n\t\t\tclassName={className}\n\t\t>\n\t\t\t<path\n\t\t\t\td=\"M251.172 116.594L139.4 4.828c-6.433-6.437-16.873-6.437-23.314 0l-23.21 23.21 29.443 29.443c6.842-2.312 14.688-.761 20.142 4.693 5.48 5.489 7.02 13.402 4.652 20.266l28.375 28.376c6.865-2.365 14.786-.835 20.269 4.657 7.663 7.66 7.663 20.075 0 27.74-7.665 7.666-20.08 7.666-27.749 0-5.764-5.77-7.188-14.235-4.27-21.336l-26.462-26.462-.003 69.637a19.82 19.82 0 0 1 5.188 3.71c7.663 7.66 7.663 20.076 0 27.747-7.665 7.662-20.086 7.662-27.74 0-7.663-7.671-7.663-20.086 0-27.746a19.654 19.654 0 0 1 6.421-4.281V94.196a19.378 19.378 0 0 1-6.421-4.281c-5.806-5.798-7.202-14.317-4.227-21.446L81.47 39.442l-76.64 76.635c-6.44 6.443-6.44 16.884 0 23.322l111.774 111.768c6.435 6.438 16.873 6.438 23.316 0l111.251-111.249c6.438-6.44 6.438-16.887 0-23.324\"\n\t\t\t\tfill=\"#DE4C36\"\n\t\t\t/>\n\t\t</svg>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/icons/notification-icons.tsx",
    "content": "import { cn } from \"@/lib/utils\";\n\ninterface Props {\n\tclassName?: string;\n}\nexport const SlackIcon = ({ className }: Props) => {\n\treturn (\n\t\t<svg\n\t\t\tviewBox=\"0 0 2447.6 2452.5\"\n\t\t\tclassName={cn(\"size-8\", className)}\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t>\n\t\t\t<g clipRule=\"evenodd\" fillRule=\"evenodd\">\n\t\t\t\t<path\n\t\t\t\t\td=\"m897.4 0c-135.3.1-244.8 109.9-244.7 245.2-.1 135.3 109.5 245.1 244.8 245.2h244.8v-245.1c.1-135.3-109.5-245.1-244.9-245.3.1 0 .1 0 0 0m0 654h-652.6c-135.3.1-244.9 109.9-244.8 245.2-.2 135.3 109.4 245.1 244.7 245.3h652.7c135.3-.1 244.9-109.9 244.8-245.2.1-135.4-109.5-245.2-244.8-245.3z\"\n\t\t\t\t\tfill=\"#36c5f0\"\n\t\t\t\t/>\n\t\t\t\t<path\n\t\t\t\t\td=\"m2447.6 899.2c.1-135.3-109.5-245.1-244.8-245.2-135.3.1-244.9 109.9-244.8 245.2v245.3h244.8c135.3-.1 244.9-109.9 244.8-245.3zm-652.7 0v-654c.1-135.2-109.4-245-244.7-245.2-135.3.1-244.9 109.9-244.8 245.2v654c-.2 135.3 109.4 245.1 244.7 245.3 135.3-.1 244.9-109.9 244.8-245.3z\"\n\t\t\t\t\tfill=\"#2eb67d\"\n\t\t\t\t/>\n\t\t\t\t<path\n\t\t\t\t\td=\"m1550.1 2452.5c135.3-.1 244.9-109.9 244.8-245.2.1-135.3-109.5-245.1-244.8-245.2h-244.8v245.2c-.1 135.2 109.5 245 244.8 245.2zm0-654.1h652.7c135.3-.1 244.9-109.9 244.8-245.2.2-135.3-109.4-245.1-244.7-245.3h-652.7c-135.3.1-244.9 109.9-244.8 245.2-.1 135.4 109.4 245.2 244.7 245.3z\"\n\t\t\t\t\tfill=\"#ecb22e\"\n\t\t\t\t/>\n\t\t\t\t<path\n\t\t\t\t\td=\"m0 1553.2c-.1 135.3 109.5 245.1 244.8 245.2 135.3-.1 244.9-109.9 244.8-245.2v-245.2h-244.8c-135.3.1-244.9 109.9-244.8 245.2zm652.7 0v654c-.2 135.3 109.4 245.1 244.7 245.3 135.3-.1 244.9-109.9 244.8-245.2v-653.9c.2-135.3-109.4-245.1-244.7-245.3-135.4 0-244.9 109.8-244.8 245.1 0 0 0 .1 0 0\"\n\t\t\t\t\tfill=\"#e01e5a\"\n\t\t\t\t/>\n\t\t\t</g>\n\t\t</svg>\n\t);\n};\n\nexport const TelegramIcon = ({ className }: Props) => {\n\treturn (\n\t\t<svg\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\tviewBox=\"0 0 48 48\"\n\t\t\twidth=\"48px\"\n\t\t\theight=\"48px\"\n\t\t\tclassName={cn(\"size-9\", className)}\n\t\t>\n\t\t\t<linearGradient\n\t\t\t\tid=\"BiF7D16UlC0RZ_VqXJHnXa\"\n\t\t\t\tx1=\"9.858\"\n\t\t\t\tx2=\"38.142\"\n\t\t\t\ty1=\"9.858\"\n\t\t\t\ty2=\"38.142\"\n\t\t\t\tgradientUnits=\"userSpaceOnUse\"\n\t\t\t>\n\t\t\t\t<stop offset=\"0\" stopColor=\"#33bef0\" />\n\t\t\t\t<stop offset=\"1\" stopColor=\"#0a85d9\" />\n\t\t\t</linearGradient>\n\t\t\t<path\n\t\t\t\tfill=\"url(#BiF7D16UlC0RZ_VqXJHnXa)\"\n\t\t\t\td=\"M44,24c0,11.045-8.955,20-20,20S4,35.045,4,24S12.955,4,24,4S44,12.955,44,24z\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td=\"M10.119,23.466c8.155-3.695,17.733-7.704,19.208-8.284c3.252-1.279,4.67,0.028,4.448,2.113\tc-0.273,2.555-1.567,9.99-2.363,15.317c-0.466,3.117-2.154,4.072-4.059,2.863c-1.445-0.917-6.413-4.17-7.72-5.282\tc-0.891-0.758-1.512-1.608-0.88-2.474c0.185-0.253,0.658-0.763,0.921-1.017c1.319-1.278,1.141-1.553-0.454-0.412\tc-0.19,0.136-1.292,0.935-1.745,1.237c-1.11,0.74-2.131,0.78-3.862,0.192c-1.416-0.481-2.776-0.852-3.634-1.223\tC8.794,25.983,8.34,24.272,10.119,23.466z\"\n\t\t\t\topacity=\".05\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td=\"M10.836,23.591c7.572-3.385,16.884-7.264,18.246-7.813c3.264-1.318,4.465-0.536,4.114,2.011\tc-0.326,2.358-1.483,9.654-2.294,14.545c-0.478,2.879-1.874,3.513-3.692,2.337c-1.139-0.734-5.723-3.754-6.835-4.633\tc-0.86-0.679-1.751-1.463-0.71-2.598c0.348-0.379,2.27-2.234,3.707-3.614c0.833-0.801,0.536-1.196-0.469-0.508\tc-1.843,1.263-4.858,3.262-5.396,3.625c-1.025,0.69-1.988,0.856-3.664,0.329c-1.321-0.416-2.597-0.819-3.262-1.078\tC9.095,25.618,9.075,24.378,10.836,23.591z\"\n\t\t\t\topacity=\".07\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\tfill=\"#fff\"\n\t\t\t\td=\"M11.553,23.717c6.99-3.075,16.035-6.824,17.284-7.343c3.275-1.358,4.28-1.098,3.779,1.91\tc-0.36,2.162-1.398,9.319-2.226,13.774c-0.491,2.642-1.593,2.955-3.325,1.812c-0.833-0.55-5.038-3.331-5.951-3.984\tc-0.833-0.595-1.982-1.311-0.541-2.721c0.513-0.502,3.874-3.712,6.493-6.21c0.343-0.328-0.088-0.867-0.484-0.604\tc-3.53,2.341-8.424,5.59-9.047,6.013c-0.941,0.639-1.845,0.932-3.467,0.466c-1.226-0.352-2.423-0.772-2.889-0.932\tC9.384,25.282,9.81,24.484,11.553,23.717z\"\n\t\t\t/>\n\t\t</svg>\n\t);\n};\n\nexport const DiscordIcon = ({ className }: Props) => {\n\treturn (\n\t\t<svg\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\tviewBox=\"0 0 48 48\"\n\t\t\twidth=\"48px\"\n\t\t\theight=\"48px\"\n\t\t\tclassName={cn(\"size-9\", className)}\n\t\t>\n\t\t\t<path\n\t\t\t\tfill=\"#536dfe\"\n\t\t\t\td=\"M39.248,10.177c-2.804-1.287-5.812-2.235-8.956-2.778c-0.057-0.01-0.114,0.016-0.144,0.068\tc-0.387,0.688-0.815,1.585-1.115,2.291c-3.382-0.506-6.747-0.506-10.059,0c-0.3-0.721-0.744-1.603-1.133-2.291\tc-0.03-0.051-0.087-0.077-0.144-0.068c-3.143,0.541-6.15,1.489-8.956,2.778c-0.024,0.01-0.045,0.028-0.059,0.051\tc-5.704,8.522-7.267,16.835-6.5,25.044c0.003,0.04,0.026,0.079,0.057,0.103c3.763,2.764,7.409,4.442,10.987,5.554\tc0.057,0.017,0.118-0.003,0.154-0.051c0.846-1.156,1.601-2.374,2.248-3.656c0.038-0.075,0.002-0.164-0.076-0.194\tc-1.197-0.454-2.336-1.007-3.432-1.636c-0.087-0.051-0.094-0.175-0.014-0.234c0.231-0.173,0.461-0.353,0.682-0.534\tc0.04-0.033,0.095-0.04,0.142-0.019c7.201,3.288,14.997,3.288,22.113,0c0.047-0.023,0.102-0.016,0.144,0.017\tc0.22,0.182,0.451,0.363,0.683,0.536c0.08,0.059,0.075,0.183-0.012,0.234c-1.096,0.641-2.236,1.182-3.434,1.634\tc-0.078,0.03-0.113,0.12-0.075,0.196c0.661,1.28,1.415,2.498,2.246,3.654c0.035,0.049,0.097,0.07,0.154,0.052\tc3.595-1.112,7.241-2.79,11.004-5.554c0.033-0.024,0.054-0.061,0.057-0.101c0.917-9.491-1.537-17.735-6.505-25.044\tC39.293,10.205,39.272,10.187,39.248,10.177z M16.703,30.273c-2.168,0-3.954-1.99-3.954-4.435s1.752-4.435,3.954-4.435\tc2.22,0,3.989,2.008,3.954,4.435C20.658,28.282,18.906,30.273,16.703,30.273z M31.324,30.273c-2.168,0-3.954-1.99-3.954-4.435\ts1.752-4.435,3.954-4.435c2.22,0,3.989,2.008,3.954,4.435C35.278,28.282,33.544,30.273,31.324,30.273z\"\n\t\t\t/>\n\t\t</svg>\n\t);\n};\nexport const TeamsIcon = ({ className }: Props) => {\n\treturn (\n\t\t<svg\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\twidth=\"26\"\n\t\t\theight=\"36\"\n\t\t\tviewBox=\"0 0 512 476\"\n\t\t\tclassName={cn(\"size-9\", className)}\n\t\t>\n\t\t\t<g>\n\t\t\t\t<rect x=\"116\" y=\"50\" width=\"280\" height=\"276\" rx=\"64\" fill=\"#6264A7\" />\n\t\t\t\t<rect x=\"236\" y=\"138\" width=\"180\" height=\"224\" rx=\"60\" fill=\"#5059C9\" />\n\t\t\t\t<circle cx=\"122\" cy=\"332\" r=\"80\" fill=\"#B2B4D3\" />\n\t\t\t\t<circle cx=\"370\" cy=\"364\" r=\"64\" fill=\"#A6A7DC\" />\n\t\t\t\t<text\n\t\t\t\t\tx=\"180\"\n\t\t\t\t\ty=\"270\"\n\t\t\t\t\tfill=\"#fff\"\n\t\t\t\t\tfont-family=\"Segoe UI, Arial, sans-serif\"\n\t\t\t\t\tfont-size=\"110\"\n\t\t\t\t\tfont-weight=\"bold\"\n\t\t\t\t>\n\t\t\t\t\tT\n\t\t\t\t</text>\n\t\t\t</g>\n\t\t</svg>\n\t);\n};\n\nexport const LarkIcon = ({ className }: Props) => {\n\treturn (\n\t\t<svg\n\t\t\twidth=\"1em\"\n\t\t\theight=\"1em\"\n\t\t\tviewBox=\"0 0 24 24\"\n\t\t\tfill=\"none\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\tdata-icon=\"LarkLogoColorful\"\n\t\t\tclassName={cn(\"size-9\", className)}\n\t\t>\n\t\t\t<path\n\t\t\t\td=\"m12.924 12.803.056-.054c.038-.034.076-.072.11-.11l.077-.076.23-.227 1.334-1.319.335-.331c.063-.063.13-.123.195-.183a7.777 7.777 0 0 1 1.823-1.24 7.607 7.607 0 0 1 1.014-.4 13.177 13.177 0 0 0-2.5-5.013 1.203 1.203 0 0 0-.94-.448h-9.65c-.173 0-.246.224-.107.325a28.23 28.23 0 0 1 8 9.098c.007-.006.016-.013.023-.022Z\"\n\t\t\t\tfill=\"#00D6B9\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td=\"M9.097 21.299a13.258 13.258 0 0 0 11.82-7.247 5.576 5.576 0 0 1-.731 1.076 5.315 5.315 0 0 1-.745.7 5.117 5.117 0 0 1-.615.404 4.626 4.626 0 0 1-.726.331 5.312 5.312 0 0 1-1.883.312 5.892 5.892 0 0 1-.524-.031 6.509 6.509 0 0 1-.729-.126c-.06-.016-.12-.029-.18-.044-.166-.044-.33-.092-.494-.14-.082-.024-.164-.046-.246-.072-.123-.038-.247-.072-.366-.11l-.3-.095-.284-.094-.192-.067c-.08-.025-.155-.053-.234-.082a3.49 3.49 0 0 1-.167-.06c-.11-.04-.221-.079-.328-.12-.063-.025-.126-.047-.19-.072l-.252-.098c-.088-.035-.18-.07-.268-.107l-.174-.07c-.072-.028-.141-.06-.214-.088l-.164-.07c-.057-.024-.114-.05-.17-.075l-.149-.066-.135-.06-.14-.063a90.183 90.183 0 0 1-.141-.066 4.808 4.808 0 0 0-.18-.083c-.063-.028-.123-.06-.186-.088a5.697 5.697 0 0 1-.199-.098 27.762 27.762 0 0 1-8.067-5.969.18.18 0 0 0-.312.123l.006 9.21c0 .4.199.779.533 1a13.177 13.177 0 0 0 7.326 2.205Z\"\n\t\t\t\tfill=\"#3370FF\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td=\"M23.732 9.295a7.55 7.55 0 0 0-3.35-.776 7.521 7.521 0 0 0-2.284.35c-.054.016-.107.035-.158.05a8.297 8.297 0 0 0-.855.35 7.14 7.14 0 0 0-.552.297 6.716 6.716 0 0 0-.533.347c-.123.089-.243.18-.363.275-.13.104-.252.211-.375.321-.067.06-.13.123-.196.184l-.334.328-1.338 1.321-.23.228-.076.075c-.038.038-.076.073-.11.11l-.057.054a1.914 1.914 0 0 1-.085.08c-.032.028-.063.06-.095.088a13.286 13.286 0 0 1-2.748 1.946c.06.028.12.057.18.082l.142.066c.044.022.091.041.139.063l.135.06.149.067.17.075.164.07c.073.031.142.06.215.088.056.025.116.047.173.07.088.034.177.072.268.107.085.031.168.066.253.098l.189.072c.11.041.218.082.328.12.057.019.11.041.167.06.08.028.155.053.234.082l.192.066.284.095.3.095c.123.037.243.075.366.11l.246.072c.164.048.331.095.495.14.06.015.12.03.18.043.114.029.227.05.34.07.13.022.26.04.389.057a5.815 5.815 0 0 0 .994.019 5.172 5.172 0 0 0 1.413-.3 5.405 5.405 0 0 0 .726-.334c.06-.035.122-.07.182-.108a7.96 7.96 0 0 0 .432-.297 5.362 5.362 0 0 0 .577-.517 5.285 5.285 0 0 0 .37-.429 5.797 5.797 0 0 0 .527-.827l.13-.258 1.166-2.325-.003.006a7.391 7.391 0 0 1 1.527-2.186Z\"\n\t\t\t\tfill=\"#133C9A\"\n\t\t\t/>\n\t\t</svg>\n\t);\n};\nexport const GotifyIcon = ({ className }: Props) => {\n\treturn (\n\t\t<svg\n\t\t\tviewBox=\"0 0 500 500\"\n\t\t\tclassName={cn(\"size-8\", className)}\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t>\n\t\t\t<defs>\n\t\t\t\t<style>\n\t\t\t\t\t{`\n\t\t\t\t\t\t.gotify-st0{fill:#DDCBA2;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}\n\t\t\t\t\t\t.gotify-st1{fill:#71CAEE;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}\n\t\t\t\t\t\t.gotify-st2{fill:#FFFFFF;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}\n\t\t\t\t\t\t.gotify-st3{fill:#888E93;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}\n\t\t\t\t\t\t.gotify-st4{fill:#F0F0F0;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}\n\t\t\t\t\t\t.gotify-st5{fill:none;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}\n\t\t\t\t\t\t.gotify-st8{fill:#FFFFFF;}\n\t\t\t\t\t`}\n\t\t\t\t</style>\n\t\t\t\t<linearGradient\n\t\t\t\t\tid=\"gotify-gradient\"\n\t\t\t\t\tx1=\"265\"\n\t\t\t\t\ty1=\"280\"\n\t\t\t\t\tx2=\"275\"\n\t\t\t\t\ty2=\"302\"\n\t\t\t\t\tgradientUnits=\"userSpaceOnUse\"\n\t\t\t\t>\n\t\t\t\t\t<stop offset=\"0\" stopColor=\"#71CAEE\" />\n\t\t\t\t\t<stop offset=\"0.04\" stopColor=\"#83CAE2\" />\n\t\t\t\t\t<stop offset=\"0.12\" stopColor=\"#9FCACE\" />\n\t\t\t\t\t<stop offset=\"0.21\" stopColor=\"#B6CBBE\" />\n\t\t\t\t\t<stop offset=\"0.31\" stopColor=\"#C7CBB1\" />\n\t\t\t\t\t<stop offset=\"0.44\" stopColor=\"#D4CBA8\" />\n\t\t\t\t\t<stop offset=\"0.61\" stopColor=\"#DBCBA3\" />\n\t\t\t\t\t<stop offset=\"1\" stopColor=\"#DDCBA2\" />\n\t\t\t\t</linearGradient>\n\t\t\t</defs>\n\t\t\t<g transform=\"matrix(2.33,0,0,2.33,-432,-323)\">\n\t\t\t\t<g transform=\"translate(-25,26)\">\n\t\t\t\t\t<path\n\t\t\t\t\t\tclassName=\"gotify-st1\"\n\t\t\t\t\t\td=\"m258.9,119.7c-3,-0.9-6,-1.8-9,-2.7-4.6,-1.4-9.2,-2.8-14,-2.5-2.8,0.2-6.1,1.3-6.9,4-0.6,2-1.6,7.3-1.3,7.9 1.5,3.4 13.9,6.7 18.3,6.7\"\n\t\t\t\t\t/>\n\t\t\t\t\t<path d=\"m392.6,177.9c-1.4,1.4-2.2,3.5-2.5,5.5-0.2,1.4-0.1,3 0.5,4.3 0.6,1.3 1.8,2.3 3.1,3 1.3,0.6 2.8,0.9 4.3,0.9 1.1,0 2.3,-0.1 3.1,-0.9 0.6,-0.7 0.8,-1.6 0.9,-2.5 0.2,-2.3-0.1,-4.7-0.9,-6.9-0.4,-1.1-0.9,-2.3-1.8,-3.1-1.7,-1.8-4.5,-2.2-6.4,-0.5-0.1,0-0.2,0.1-0.3,0.2z\" />\n\t\t\t\t\t<path\n\t\t\t\t\t\tclassName=\"gotify-st2\"\n\t\t\t\t\t\td=\"m358.5,164.2c-1,-1 0,-2.7 1,-3.7 5.8,-5.2 15.1,-4.6 21.8,-0.6 10.9,6.6 15.6,19.9 17.2,32.5 0.6,5.2 0.9,10.6-0.5,15.7-1.4,5.1-4.6,9.9-9.3,12.1-1.1,0.5-2.3,0.9-3.4,0.5-1.1,-0.4-1.9,-1.8-1.2,-2.8-9.4,-13.6-19,-26.8-20.9,-43.2-0.5,-4.1-1.8,-7.4-4.7,-10.5z\"\n\t\t\t\t\t/>\n\t\t\t\t\t<path\n\t\t\t\t\t\tclassName=\"gotify-st1\"\n\t\t\t\t\t\td=\"m220.1,133c34.6,-18 79.3,-19.6 112.2,-8.7 23.7,7.9 41.3,26.7 49.5,50 7.1,20.6 7.1,43.6 3,65.7-7.5,40.2-26.2,77.9-49,112.6-12.6,19-24.6,36-44.2,48.5-38.7,24.6-88.9,22.1-129.3,11.5-19.5,-5.1-38.4,-17.3-44.3,-37.3-3.8,-12.8-2.1,-27.6 4.6,-40 13.5,-24.8 46.2,-38.4 50.8,-67.9 1.4,-8.7-0.3,-17.3-1.6,-25.7-3.8,-23.4-5.4,-45.8 6.7,-68.7 9.5,-17.7 24.3,-31 41.7,-40z\"\n\t\t\t\t\t/>\n\t\t\t\t\t<path\n\t\t\t\t\t\tclassName=\"gotify-st2\"\n\t\t\t\t\t\td=\"m264.5,174.9c-0.5,0.5-0.9,1-1.3,1.6-9,11.6-12,27.9-9.3,42.1 1.7,9 5.9,17.9 13.2,23.4 19.3,14.6 51.5,13.5 68.4,-1.5 24.4,-21.7 13,-67.6-14,-78.8-17.6,-7.2-43.7,-1.6-57,13.2z\"\n\t\t\t\t\t/>\n\t\t\t\t\t<path\n\t\t\t\t\t\tclassName=\"gotify-st2\"\n\t\t\t\t\t\td=\"m382.1,237.1c1.4,-0.1 2.9,-0.1 4.3,0.1 0.3,0 0.7,0.1 1,0.4 0.2,0.3 0.4,0.7 0.5,1.1 1,3.9 0.5,8.2 0.1,12.4-0.1,0.9-0.2,1.8-0.6,2.6-1,2.1-3.1,2.7-4.7,2.7-0.1,0-0.2,0-0.3,-0.1-0.3,-0.2-0.3,-0.7-0.2,-1.2 0.3,-5.9-0.1,-11.9-0.1,-18z\"\n\t\t\t\t\t/>\n\t\t\t\t\t<path\n\t\t\t\t\t\tclassName=\"gotify-st2\"\n\t\t\t\t\t\td=\"m378.7,236.8c-1.4,0.4-2.5,2-2.8,4.4-0.5,4.4-0.7,8.9-0.5,13.4 0,0.9 0.1,1.9 0.5,2.4 0.2,0.3 0.5,0.4 0.8,0.4 1.6,0.3 4.1,-0.6 5.6,-1 0,0 0,-5.2-0.1,-8-0.1,-2.8-0.1,-6.1-0.2,-8.9 0,-0.6 0,-1.5 0,-2.2 0.1,-0.7-2.6,-0.7-3.3,-0.5z\"\n\t\t\t\t\t/>\n\t\t\t\t\t<path\n\t\t\t\t\t\tclassName=\"gotify-st0\"\n\t\t\t\t\t\td=\"m358.3,231.8c-0.3,2.2 0.1,4.7 1.7,7.4 2.6,4.4 7,6.1 11.9,5.8 8.9,-0.6 25.3,-5.4 27.5,-15.7 0.6,-3-0.3,-6.1-2.2,-8.5-6.2,-7.8-17.8,-5.7-25.6,-2-5.9,2.7-12.4,7-13.3,13z\"\n\t\t\t\t\t/>\n\t\t\t\t\t<path\n\t\t\t\t\t\tclassName=\"gotify-st3\"\n\t\t\t\t\t\td=\"m386.4,208.6c2.2,1.4 3.7,3.8 4,7 0.3,3.6-1.4,7.5-5,8.8-2.9,1.1-6.2,0.6-9.1,-0.4-2.9,-1-5.8,-2.8-6.8,-5.7-0.7,-2-0.3,-4.3 0.7,-6.1 1.1,-1.8 2.8,-3.2 4.7,-4.1 3.9,-1.8 8.4,-1.6 11.5,0.5z\"\n\t\t\t\t\t/>\n\t\t\t\t\t<path\n\t\t\t\t\t\tclassName=\"gotify-st0\"\n\t\t\t\t\t\td=\"m414.7,262.6c2.4,0.6 4.8,2.1 5.6,4.4 0.8,2.3 0.1,4.9-1.6,6.7-1.7,1.8-4.2,2.5-6.6,2.5-0.8,0-1.7,-0.1-2.4,-0.5-2.5,-1.1-3.5,-4-4.2,-6.6-1.8,-6.8 3.6,-7.8 9.2,-6.5z\"\n\t\t\t\t\t/>\n\t\t\t\t\t<path\n\t\t\t\t\t\tclassName=\"gotify-st4\"\n\t\t\t\t\t\td=\"m267.1,284.7c2.3,-4.5 141.3,-36.2 144.7,-31.6 3.4,4.5 15.8,88.2 9,90.4-6.8,2.3-119.8,37.3-126.6,35-6.8,-2.3-29.4,-89.3-27.1,-93.8z\"\n\t\t\t\t\t/>\n\t\t\t\t\t<path\n\t\t\t\t\t\tclassName=\"gotify-st5\"\n\t\t\t\t\t\td=\"m294.2,378.5c0,0 54.3,-74.6 59.9,-76.9 5.7,-2.3 67.3,41.3 67.3,41.3\"\n\t\t\t\t\t/>\n\t\t\t\t\t<path\n\t\t\t\t\t\tclassName=\"gotify-st4\"\n\t\t\t\t\t\td=\"m267,287.7c0,0 86,38.8 91.6,36.6 5.7,-2.3 53.1,-71.2 53.1,-71.2\"\n\t\t\t\t\t/>\n\t\t\t\t\t<path\n\t\t\t\t\t\tfill=\"url(#gotify-gradient)\"\n\t\t\t\t\t\td=\"m261.9,283.5c-0.1,4.2 4.3,7.3 8.4,7.6 4.1,0.3 8.2,-1.3 12.2,-2.6 1.4,-0.4 2.9,-0.8 4.2,-0.2 1.8,0.9 2.7,4.1 1.8,5.9-0.9,1.8-3.4,3.5-5.3,4.4-6.5,3-12.9,3.6-19.9,2-5.3,-1.2-11.3,-4.3-13,-13.5\"\n\t\t\t\t\t/>\n\t\t\t\t\t<path d=\"m318.4,198.4c-2,-0.3-4.1,0.1-5.9,1.3-3.2,2.1-4.7,6.2-4.7,9.9 0,1.9 0.4,3.8 1.4,5.3 1.2,1.7 3.1,2.9 5.2,3.4 3.4,0.8 8.2,0.7 10.5,-2.5 1,-1.5 1.4,-3.3 1.5,-5.1 0.5,-5.7-1.8,-11.4-8,-12.3z\" />\n\t\t\t\t\t<path\n\t\t\t\t\t\tclassName=\"gotify-st8\"\n\t\t\t\t\t\td=\"m320.4,203.3c0.9,0.3 1.7,0.8 2.1,1.7 0.4,0.8 0.4,1.7 0.3,2.5-0.1,1-0.6,2-1.5,2.7-0.7,0.5-1.7,0.7-2.6,0.5-0.9,-0.2-1.7,-0.8-2.2,-1.6-1.1,-1.6-0.9,-4.4 0.9,-5.5 0.9,-0.4 2,-0.6 3,-0.3z\"\n\t\t\t\t\t/>\n\t\t\t\t</g>\n\t\t\t</g>\n\t\t</svg>\n\t);\n};\n\nexport const NtfyIcon = ({ className }: Props) => {\n\treturn (\n\t\t<svg\n\t\t\tviewBox=\"0 0 24 24\"\n\t\t\tclassName={cn(\"size-8\", className)}\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t>\n\t\t\t<path\n\t\t\t\tfill=\"currentColor\"\n\t\t\t\td=\"M12.597 13.693v2.156h6.205v-2.156ZM5.183 6.549v2.363l3.591 1.901 0.023 0.01 -0.023 0.009 -3.591 1.901v2.35l0.386 -0.211 5.456 -2.969V9.729ZM3.659 2.037C1.915 2.037 0.42 3.41 0.42 5.154v0.002L0.438 18.73 0 21.963l5.956 -1.583h14.806c1.744 0 3.238 -1.374 3.238 -3.118V5.154c0 -1.744 -1.493 -3.116 -3.237 -3.117h-0.001zm0 2.2h17.104c0.613 0.001 1.037 0.447 1.037 0.917v12.108c0 0.47 -0.424 0.916 -1.038 0.916H5.633l-3.026 0.915 0.031 -0.179 -0.017 -13.76c0 -0.47 0.424 -0.917 1.038 -0.917z\"\n\t\t\t/>\n\t\t</svg>\n\t);\n};\n\nexport const PushoverIcon = ({ className }: Props) => {\n\treturn (\n\t\t<svg\n\t\t\tviewBox=\"0 0 600 600\"\n\t\t\tclassName={cn(\"size-8\", className)}\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t>\n\t\t\t<g stroke=\"none\" strokeWidth=\"1\">\n\t\t\t\t<ellipse\n\t\t\t\t\tstyle={{ fillRule: \"evenodd\" }}\n\t\t\t\t\tfill=\"#249DF1\"\n\t\t\t\t\ttransform=\"matrix(-0.674571, 0.73821, -0.73821, -0.674571, 556.833239, 241.613465)\"\n\t\t\t\t\tcx=\"216.308\"\n\t\t\t\t\tcy=\"152.076\"\n\t\t\t\t\trx=\"296.855\"\n\t\t\t\t\try=\"296.855\"\n\t\t\t\t/>\n\t\t\t\t<path\n\t\t\t\t\tfill=\"#FFFFFF\"\n\t\t\t\t\td=\"M 280.949 172.514 L 355.429 162.714 L 282.909 326.374 L 282.909 326.374 C 295.649 325.394 308.142 321.067 320.389 313.394 L 320.389 313.394 L 320.389 313.394 C 332.642 305.714 343.916 296.077 354.209 284.484 L 354.209 284.484 L 354.209 284.484 C 364.496 272.884 373.396 259.981 380.909 245.774 L 380.909 245.774 L 380.909 245.774 C 388.422 231.561 393.812 217.594 397.079 203.874 L 397.079 203.874 L 397.079 203.874 C 399.039 195.381 399.939 187.214 399.779 179.374 L 399.779 179.374 L 399.779 179.374 C 399.612 171.534 397.569 164.674 393.649 158.794 L 393.649 158.794 L 393.649 158.794 C 389.729 152.914 383.766 148.177 375.759 144.584 L 375.759 144.584 L 375.759 144.584 C 367.759 140.991 356.899 139.194 343.179 139.194 L 343.179 139.194 L 343.179 139.194 C 327.172 139.194 311.409 141.807 295.889 147.034 L 295.889 147.034 L 295.889 147.034 C 280.376 152.261 266.002 159.857 252.769 169.824 L 252.769 169.824 L 252.769 169.824 C 239.542 179.784 228.029 192.197 218.229 207.064 L 218.229 207.064 L 218.229 207.064 C 208.429 221.924 201.406 238.827 197.159 257.774 L 197.159 257.774 L 197.159 257.774 C 195.526 263.981 194.546 268.961 194.219 272.714 L 194.219 272.714 L 194.219 272.714 C 193.892 276.474 193.812 279.577 193.979 282.024 L 193.979 282.024 L 193.979 282.024 C 194.139 284.477 194.462 286.357 194.949 287.664 L 194.949 287.664 L 194.949 287.664 C 195.442 288.971 195.852 290.277 196.179 291.584 L 196.179 291.584 L 196.179 291.584 C 179.519 291.584 167.349 288.234 159.669 281.534 L 159.669 281.534 L 159.669 281.534 C 151.996 274.841 150.119 263.164 154.039 246.504 L 154.039 246.504 L 154.039 246.504 C 157.959 229.191 166.862 212.694 180.749 197.014 L 180.749 197.014 L 180.749 197.014 C 194.629 181.334 211.122 167.531 230.229 155.604 L 230.229 155.604 L 230.229 155.604 C 249.342 143.684 270.249 134.214 292.949 127.194 L 292.949 127.194 L 292.949 127.194 C 315.656 120.167 337.789 116.654 359.349 116.654 L 359.349 116.654 L 359.349 116.654 C 378.296 116.654 394.219 119.347 407.119 124.734 L 407.119 124.734 L 407.119 124.734 C 420.026 130.127 430.072 137.234 437.259 146.054 L 437.259 146.054 L 437.259 146.054 C 444.446 154.874 448.936 165.164 450.729 176.924 L 450.729 176.924 L 450.729 176.924 C 452.529 188.684 451.959 200.934 449.019 213.674 L 449.019 213.674 L 449.019 213.674 C 445.426 229.027 438.646 244.464 428.679 259.984 L 428.679 259.984 L 428.679 259.984 C 418.719 275.497 406.226 289.544 391.199 302.124 L 391.199 302.124 L 391.199 302.124 C 376.172 314.697 358.939 324.904 339.499 332.744 L 339.499 332.744 L 339.499 332.744 C 320.066 340.584 299.406 344.504 277.519 344.504 L 277.519 344.504 L 275.069 344.504 L 212.839 484.154 L 142.279 484.154 L 280.949 172.514 Z\"\n\t\t\t\t/>\n\t\t\t</g>\n\t\t</svg>\n\t);\n};\n\nexport const ResendIcon = ({ className }: Props) => {\n\treturn (\n\t\t<svg\n\t\t\tviewBox=\"0 0 24 24\"\n\t\t\tclassName={cn(\"size-8\", className)}\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t>\n\t\t\t<circle cx=\"12\" cy=\"12\" r=\"10\" fill=\"currentColor\" opacity=\"0.12\" />\n\t\t\t<path\n\t\t\t\td=\"M8 17V7h6a3 3 0 0 1 0 6H8m6 0 2 4\"\n\t\t\t\tstroke=\"currentColor\"\n\t\t\t\tstrokeWidth=\"1.6\"\n\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t\tfill=\"none\"\n\t\t\t/>\n\t\t</svg>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/layouts/dashboard-layout.tsx",
    "content": "import { api } from \"@/utils/api\";\nimport { ImpersonationBar } from \"../dashboard/impersonation/impersonation-bar\";\nimport { HubSpotWidget } from \"../shared/HubSpotWidget\";\nimport Page from \"./side\";\n\ninterface Props {\n\tchildren: React.ReactNode;\n\tmetaName?: string;\n}\n\nexport const DashboardLayout = ({ children }: Props) => {\n\tconst { data: haveRootAccess } = api.user.haveRootAccess.useQuery();\n\tconst { data: isCloud } = api.settings.isCloud.useQuery();\n\tconst { data: currentPlan } = api.stripe.getCurrentPlan.useQuery(undefined, {\n\t\tenabled: isCloud === true,\n\t\trefetchOnWindowFocus: false,\n\t\trefetchOnMount: false,\n\t\trefetchOnReconnect: false,\n\t});\n\n\tconst isChatEnabled = isCloud === true && currentPlan === \"startup\";\n\n\treturn (\n\t\t<>\n\t\t\t<Page>{children}</Page>\n\t\t\t{isChatEnabled && (\n\t\t\t\t<>\n\t\t\t\t\t<HubSpotWidget />\n\t\t\t\t</>\n\t\t\t)}\n\n\t\t\t{haveRootAccess === true && <ImpersonationBar />}\n\t\t</>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/layouts/onboarding-layout.tsx",
    "content": "import Link from \"next/link\";\nimport type React from \"react\";\nimport { cn } from \"@/lib/utils\";\nimport { useWhitelabelingPublic } from \"@/utils/hooks/use-whitelabeling\";\nimport { GithubIcon } from \"../icons/data-tools-icons\";\nimport { Logo } from \"../shared/logo\";\nimport { Button } from \"../ui/button\";\n\ninterface Props {\n\tchildren: React.ReactNode;\n}\nexport const OnboardingLayout = ({ children }: Props) => {\n\tconst { config: whitelabeling } = useWhitelabelingPublic();\n\tconst appName = whitelabeling?.appName || \"Dokploy\";\n\tconst appDescription =\n\t\twhitelabeling?.appDescription ||\n\t\t\"\\u201CThe Open Source alternative to Netlify, Vercel, Heroku.\\u201D\";\n\tconst logoUrl =\n\t\twhitelabeling?.loginLogoUrl || whitelabeling?.logoUrl || undefined;\n\n\treturn (\n\t\t<div className=\"container relative min-h-svh flex-col items-center justify-center flex lg:max-w-none lg:grid lg:grid-cols-2 lg:px-0 w-full\">\n\t\t\t<div className=\"relative hidden h-full flex-col  p-10 text-primary dark:border-r lg:flex\">\n\t\t\t\t<div className=\"absolute inset-0 bg-muted\" />\n\t\t\t\t<Link\n\t\t\t\t\thref=\"/\"\n\t\t\t\t\tclassName=\"relative z-20 flex items-center text-lg font-medium gap-4  text-primary\"\n\t\t\t\t>\n\t\t\t\t\t<Logo className=\"size-10\" logoUrl={logoUrl} />\n\t\t\t\t\t{appName}\n\t\t\t\t</Link>\n\t\t\t\t<div className=\"relative z-20 mt-auto\">\n\t\t\t\t\t<blockquote className=\"space-y-2\">\n\t\t\t\t\t\t<p className=\"text-lg text-primary\">{appDescription}</p>\n\t\t\t\t\t</blockquote>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div className=\"w-full\">\n\t\t\t\t<div className=\"flex w-full flex-col justify-center space-y-6 max-w-lg mx-auto\">\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t\t<div className=\"flex items-center gap-4 justify-center absolute bottom-4 right-4 text-muted-foreground\">\n\t\t\t\t\t<Button variant=\"ghost\" size=\"icon\">\n\t\t\t\t\t\t<Link href=\"https://github.com/dokploy/dokploy\">\n\t\t\t\t\t\t\t<GithubIcon />\n\t\t\t\t\t\t</Link>\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button variant=\"ghost\" size=\"icon\">\n\t\t\t\t\t\t<Link href=\"https://x.com/getdokploy\">\n\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t\t\t\tstrokeWidth=\"0\"\n\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\t\tclassName=\"size-5\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<path d=\"M10.4883 14.651L15.25 21H22.25L14.3917 10.5223L20.9308 3H18.2808L13.1643 8.88578L8.75 3H1.75L9.26086 13.0145L2.31915 21H4.96917L10.4883 14.651ZM16.25 19L5.75 5H7.75L18.25 19H16.25Z\" />\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t</Link>\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button variant=\"ghost\" size=\"icon\">\n\t\t\t\t\t\t<Link href=\"https://discord.com/invite/2tBnJ3jDJc\">\n\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\t\tviewBox=\"0 0 48 48\"\n\t\t\t\t\t\t\t\twidth=\"48px\"\n\t\t\t\t\t\t\t\theight=\"48px\"\n\t\t\t\t\t\t\t\tclassName={cn(\"size-6\")}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t\t\t\t\td=\"M39.248,10.177c-2.804-1.287-5.812-2.235-8.956-2.778c-0.057-0.01-0.114,0.016-0.144,0.068\tc-0.387,0.688-0.815,1.585-1.115,2.291c-3.382-0.506-6.747-0.506-10.059,0c-0.3-0.721-0.744-1.603-1.133-2.291\tc-0.03-0.051-0.087-0.077-0.144-0.068c-3.143,0.541-6.15,1.489-8.956,2.778c-0.024,0.01-0.045,0.028-0.059,0.051\tc-5.704,8.522-7.267,16.835-6.5,25.044c0.003,0.04,0.026,0.079,0.057,0.103c3.763,2.764,7.409,4.442,10.987,5.554\tc0.057,0.017,0.118-0.003,0.154-0.051c0.846-1.156,1.601-2.374,2.248-3.656c0.038-0.075,0.002-0.164-0.076-0.194\tc-1.197-0.454-2.336-1.007-3.432-1.636c-0.087-0.051-0.094-0.175-0.014-0.234c0.231-0.173,0.461-0.353,0.682-0.534\tc0.04-0.033,0.095-0.04,0.142-0.019c7.201,3.288,14.997,3.288,22.113,0c0.047-0.023,0.102-0.016,0.144,0.017\tc0.22,0.182,0.451,0.363,0.683,0.536c0.08,0.059,0.075,0.183-0.012,0.234c-1.096,0.641-2.236,1.182-3.434,1.634\tc-0.078,0.03-0.113,0.12-0.075,0.196c0.661,1.28,1.415,2.498,2.246,3.654c0.035,0.049,0.097,0.07,0.154,0.052\tc3.595-1.112,7.241-2.79,11.004-5.554c0.033-0.024,0.054-0.061,0.057-0.101c0.917-9.491-1.537-17.735-6.505-25.044\tC39.293,10.205,39.272,10.187,39.248,10.177z M16.703,30.273c-2.168,0-3.954-1.99-3.954-4.435s1.752-4.435,3.954-4.435\tc2.22,0,3.989,2.008,3.954,4.435C20.658,28.282,18.906,30.273,16.703,30.273z M31.324,30.273c-2.168,0-3.954-1.99-3.954-4.435\ts1.752-4.435,3.954-4.435c2.22,0,3.989,2.008,3.954,4.435C35.278,28.282,33.544,30.273,31.324,30.273z\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t</Link>\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/layouts/side.tsx",
    "content": "\"use client\";\nimport type { inferRouterOutputs } from \"@trpc/server\";\nimport {\n\tActivity,\n\tBarChartHorizontalBigIcon,\n\tBell,\n\tBlocksIcon,\n\tBookIcon,\n\tBotIcon,\n\tBoxes,\n\tChevronRight,\n\tChevronsUpDown,\n\tCircleHelp,\n\tClipboardList,\n\tClock,\n\tCreditCard,\n\tDatabase,\n\tFolder,\n\tForward,\n\tGalleryVerticalEnd,\n\tGitBranch,\n\tKey,\n\tKeyRound,\n\tLoader2,\n\tLogIn,\n\ttype LucideIcon,\n\tPackage,\n\tPalette,\n\tPieChart,\n\tRocket,\n\tServer,\n\tShieldCheck,\n\tStar,\n\tTags,\n\tTrash2,\n\tUser,\n\tUsers,\n} from \"lucide-react\";\nimport Link from \"next/link\";\nimport { usePathname } from \"next/navigation\";\nimport { useEffect, useState } from \"react\";\nimport { toast } from \"sonner\";\nimport {\n\tBreadcrumb,\n\tBreadcrumbItem,\n\tBreadcrumbLink,\n\tBreadcrumbList,\n} from \"@/components/ui/breadcrumb\";\nimport {\n\tCollapsible,\n\tCollapsibleContent,\n\tCollapsibleTrigger,\n} from \"@/components/ui/collapsible\";\nimport {\n\tDropdownMenu,\n\tDropdownMenuContent,\n\tDropdownMenuItem,\n\tDropdownMenuLabel,\n\tDropdownMenuSeparator,\n\tDropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\nimport { Separator } from \"@/components/ui/separator\";\nimport {\n\tSIDEBAR_COOKIE_NAME,\n\tSidebar,\n\tSidebarContent,\n\tSidebarFooter,\n\tSidebarGroup,\n\tSidebarGroupLabel,\n\tSidebarHeader,\n\tSidebarInset,\n\tSidebarMenu,\n\tSidebarMenuButton,\n\tSidebarMenuItem,\n\tSidebarMenuSub,\n\tSidebarMenuSubButton,\n\tSidebarMenuSubItem,\n\tSidebarProvider,\n\tSidebarRail,\n\tSidebarTrigger,\n\tuseSidebar,\n} from \"@/components/ui/sidebar\";\nimport { authClient } from \"@/lib/auth-client\";\nimport { cn } from \"@/lib/utils\";\nimport type { AppRouter } from \"@/server/api/root\";\nimport { api } from \"@/utils/api\";\nimport { AddOrganization } from \"../dashboard/organization/handle-organization\";\nimport { DialogAction } from \"../shared/dialog-action\";\nimport { Logo } from \"../shared/logo\";\nimport { Button } from \"../ui/button\";\nimport { TimeBadge } from \"../ui/time-badge\";\nimport { UpdateServerButton } from \"./update-server\";\nimport { UserNav } from \"./user-nav\";\n\n// The types of the queries we are going to use\ntype AuthQueryOutput = inferRouterOutputs<AppRouter>[\"user\"][\"get\"];\ntype PermissionsOutput =\n\tinferRouterOutputs<AppRouter>[\"user\"][\"getPermissions\"];\n\ntype EnabledOpts = {\n\tauth?: AuthQueryOutput;\n\tpermissions?: PermissionsOutput;\n\tisCloud: boolean;\n};\n\ntype SingleNavItem = {\n\tisSingle?: true;\n\ttitle: string;\n\turl: string;\n\ticon?: LucideIcon;\n\tisEnabled?: (opts: EnabledOpts) => boolean;\n};\n\n// NavItem type\n// Consists of a single item or a group of items\n// If `isSingle` is true or undefined, the item is a single item\n// If `isSingle` is false, the item is a group of items\ntype NavItem =\n\t| SingleNavItem\n\t| {\n\t\t\tisSingle: false;\n\t\t\ttitle: string;\n\t\t\ticon: LucideIcon;\n\t\t\titems: SingleNavItem[];\n\t\t\tisEnabled?: (opts: EnabledOpts) => boolean;\n\t  };\n\n// ExternalLink type\n// Represents an external link item (used for the help section)\ntype ExternalLink = {\n\tname: string;\n\turl: string;\n\ticon: React.ComponentType<{ className?: string }>;\n\tisEnabled?: (opts: EnabledOpts) => boolean;\n};\n\n// Menu type\n// Consists of home, settings, and help items\ntype Menu = {\n\thome: NavItem[];\n\tsettings: NavItem[];\n\thelp: ExternalLink[];\n};\n\n// Menu items\n// Consists of unfiltered home, settings, and help items\n// The items are filtered based on the user's role and permissions\n// The `isEnabled` function is called to determine if the item should be displayed\nconst MENU: Menu = {\n\thome: [\n\t\t{\n\t\t\tisSingle: true,\n\t\t\ttitle: \"Projects\",\n\t\t\turl: \"/dashboard/projects\",\n\t\t\ticon: Folder,\n\t\t},\n\t\t{\n\t\t\tisSingle: true,\n\t\t\ttitle: \"Deployments\",\n\t\t\turl: \"/dashboard/deployments\",\n\t\t\ticon: Rocket,\n\t\t\tisEnabled: ({ permissions }) => !!permissions?.deployment.read,\n\t\t},\n\t\t{\n\t\t\tisSingle: true,\n\t\t\ttitle: \"Monitoring\",\n\t\t\turl: \"/dashboard/monitoring\",\n\t\t\ticon: BarChartHorizontalBigIcon,\n\t\t\t// Only enabled in non-cloud environments and if user has monitoring.read\n\t\t\tisEnabled: ({ isCloud, permissions }) =>\n\t\t\t\t!isCloud && !!permissions?.monitoring.read,\n\t\t},\n\t\t{\n\t\t\tisSingle: true,\n\t\t\ttitle: \"Schedules\",\n\t\t\turl: \"/dashboard/schedules\",\n\t\t\ticon: Clock,\n\t\t\t// Only enabled in non-cloud environments\n\t\t\tisEnabled: ({ isCloud, permissions }) =>\n\t\t\t\t!isCloud && !!permissions?.organization.update,\n\t\t},\n\t\t{\n\t\t\tisSingle: true,\n\t\t\ttitle: \"Traefik File System\",\n\t\t\turl: \"/dashboard/traefik\",\n\t\t\ticon: GalleryVerticalEnd,\n\t\t\t// Only enabled for users with access to Traefik files in non-cloud environments\n\t\t\tisEnabled: ({ permissions, isCloud }) =>\n\t\t\t\t!!(permissions?.traefikFiles.read && !isCloud),\n\t\t},\n\t\t{\n\t\t\tisSingle: true,\n\t\t\ttitle: \"Docker\",\n\t\t\turl: \"/dashboard/docker\",\n\t\t\ticon: BlocksIcon,\n\t\t\t// Only enabled for users with access to Docker in non-cloud environments\n\t\t\tisEnabled: ({ permissions, isCloud }) =>\n\t\t\t\t!!(permissions?.docker.read && !isCloud),\n\t\t},\n\t\t{\n\t\t\tisSingle: true,\n\t\t\ttitle: \"Swarm\",\n\t\t\turl: \"/dashboard/swarm\",\n\t\t\ticon: PieChart,\n\t\t\t// Only enabled for users with access to Docker in non-cloud environments\n\t\t\tisEnabled: ({ permissions, isCloud }) =>\n\t\t\t\t!!(permissions?.docker.read && !isCloud),\n\t\t},\n\t\t{\n\t\t\tisSingle: true,\n\t\t\ttitle: \"Requests\",\n\t\t\turl: \"/dashboard/requests\",\n\t\t\ticon: Forward,\n\t\t\t// Only enabled for users with access to Docker in non-cloud environments\n\t\t\tisEnabled: ({ permissions, isCloud }) =>\n\t\t\t\t!!(permissions?.docker.read && !isCloud),\n\t\t},\n\n\t\t// Legacy unused menu, adjusted to the new structure\n\t\t// {\n\t\t// \tisSingle: true,\n\t\t// \ttitle: \"Projects\",\n\t\t// \turl: \"/dashboard/projects\",\n\t\t// \ticon: Folder,\n\t\t// },\n\t\t// {\n\t\t// \tisSingle: true,\n\t\t// \ttitle: \"Monitoring\",\n\t\t// \ticon: BarChartHorizontalBigIcon,\n\t\t// \turl: \"/dashboard/settings/monitoring\",\n\t\t// },\n\t\t// {\n\t\t//   isSingle: false,\n\t\t//   title: \"Settings\",\n\t\t//   icon: Settings2,\n\t\t//   items: [\n\t\t//     {\n\t\t//       title: \"Profile\",\n\t\t//       url: \"/dashboard/settings/profile\",\n\t\t//     },\n\t\t//     {\n\t\t//       title: \"Users\",\n\t\t//       url: \"/dashboard/settings/users\",\n\t\t//     },\n\t\t//     {\n\t\t//       title: \"SSH Key\",\n\t\t//       url: \"/dashboard/settings/ssh-keys\",\n\t\t//     },\n\t\t//     {\n\t\t//       title: \"Git\",\n\t\t//       url: \"/dashboard/settings/git-providers\",\n\t\t//     },\n\t\t//   ],\n\t\t// },\n\t\t// {\n\t\t//   isSingle: false,\n\t\t//   title: \"Integrations\",\n\t\t//   icon: BlocksIcon,\n\t\t//   items: [\n\t\t//     {\n\t\t//       title: \"S3 Destinations\",\n\t\t//       url: \"/dashboard/settings/destinations\",\n\t\t//     },\n\t\t//     {\n\t\t//       title: \"Registry\",\n\t\t//       url: \"/dashboard/settings/registry\",\n\t\t//     },\n\t\t//     {\n\t\t//       title: \"Notifications\",\n\t\t//       url: \"/dashboard/settings/notifications\",\n\t\t//     },\n\t\t//   ],\n\t\t// },\n\t],\n\n\tsettings: [\n\t\t{\n\t\t\tisSingle: true,\n\t\t\ttitle: \"Web Server\",\n\t\t\turl: \"/dashboard/settings/server\",\n\t\t\ticon: Activity,\n\t\t\t// Only enabled for admins in non-cloud environments\n\t\t\tisEnabled: ({ permissions, isCloud }) =>\n\t\t\t\t!!(permissions?.organization.update && !isCloud),\n\t\t},\n\t\t{\n\t\t\tisSingle: true,\n\t\t\ttitle: \"Profile\",\n\t\t\turl: \"/dashboard/settings/profile\",\n\t\t\ticon: User,\n\t\t},\n\t\t{\n\t\t\tisSingle: true,\n\t\t\ttitle: \"Remote Servers\",\n\t\t\turl: \"/dashboard/settings/servers\",\n\t\t\ticon: Server,\n\t\t\tisEnabled: ({ permissions }) => !!permissions?.server.read,\n\t\t},\n\t\t{\n\t\t\tisSingle: true,\n\t\t\ttitle: \"Users\",\n\t\t\ticon: Users,\n\t\t\turl: \"/dashboard/settings/users\",\n\t\t\t// Only enabled for users with member.read permission\n\t\t\tisEnabled: ({ permissions }) => !!permissions?.member.read,\n\t\t},\n\t\t{\n\t\t\tisSingle: true,\n\t\t\ttitle: \"Audit Logs\",\n\t\t\ticon: ClipboardList,\n\t\t\turl: \"/dashboard/settings/audit-logs\",\n\t\t\tisEnabled: ({ permissions }) => !!permissions?.auditLog.read,\n\t\t},\n\t\t{\n\t\t\tisSingle: true,\n\t\t\ttitle: \"SSH Keys\",\n\t\t\ticon: KeyRound,\n\t\t\turl: \"/dashboard/settings/ssh-keys\",\n\t\t\t// Only enabled for users with access to SSH keys\n\t\t\tisEnabled: ({ permissions }) => !!permissions?.sshKeys.read,\n\t\t},\n\t\t{\n\t\t\ttitle: \"AI\",\n\t\t\ticon: BotIcon,\n\t\t\turl: \"/dashboard/settings/ai\",\n\t\t\tisSingle: true,\n\t\t\tisEnabled: ({ permissions }) => !!permissions?.organization.update,\n\t\t},\n\t\t{\n\t\t\tisSingle: true,\n\t\t\ttitle: \"Tags\",\n\t\t\turl: \"/dashboard/settings/tags\",\n\t\t\ticon: Tags,\n\t\t\tisEnabled: ({ permissions }) => !!permissions?.tag.read,\n\t\t},\n\t\t{\n\t\t\tisSingle: true,\n\t\t\ttitle: \"Git\",\n\t\t\turl: \"/dashboard/settings/git-providers\",\n\t\t\ticon: GitBranch,\n\t\t\t// Only enabled for users with access to Git providers\n\t\t\tisEnabled: ({ permissions }) => !!permissions?.gitProviders.read,\n\t\t},\n\t\t{\n\t\t\tisSingle: true,\n\t\t\ttitle: \"Registry\",\n\t\t\turl: \"/dashboard/settings/registry\",\n\t\t\ticon: Package,\n\t\t\tisEnabled: ({ permissions }) => !!permissions?.registry.read,\n\t\t},\n\t\t{\n\t\t\tisSingle: true,\n\t\t\ttitle: \"S3 Destinations\",\n\t\t\turl: \"/dashboard/settings/destinations\",\n\t\t\ticon: Database,\n\t\t\tisEnabled: ({ permissions }) => !!permissions?.destination.read,\n\t\t},\n\n\t\t{\n\t\t\tisSingle: true,\n\t\t\ttitle: \"Certificates\",\n\t\t\turl: \"/dashboard/settings/certificates\",\n\t\t\ticon: ShieldCheck,\n\t\t\tisEnabled: ({ permissions }) => !!permissions?.certificate.read,\n\t\t},\n\t\t{\n\t\t\tisSingle: true,\n\t\t\ttitle: \"Cluster\",\n\t\t\turl: \"/dashboard/settings/cluster\",\n\t\t\ticon: Boxes,\n\t\t\t// Only enabled for admins in non-cloud environments\n\t\t\tisEnabled: ({ permissions, isCloud }) =>\n\t\t\t\t!!(permissions?.organization.update && !isCloud),\n\t\t},\n\t\t{\n\t\t\tisSingle: true,\n\t\t\ttitle: \"Notifications\",\n\t\t\turl: \"/dashboard/settings/notifications\",\n\t\t\ticon: Bell,\n\t\t\t// Only enabled for users with access to notifications\n\t\t\tisEnabled: ({ permissions }) => !!permissions?.notification.read,\n\t\t},\n\t\t{\n\t\t\tisSingle: true,\n\t\t\ttitle: \"Billing\",\n\t\t\turl: \"/dashboard/settings/billing\",\n\t\t\ticon: CreditCard,\n\t\t\t// Only enabled for owners in cloud environments\n\t\t\tisEnabled: ({ auth, isCloud }) => !!(auth?.role === \"owner\" && isCloud),\n\t\t},\n\t\t{\n\t\t\tisSingle: true,\n\t\t\ttitle: \"License\",\n\t\t\turl: \"/dashboard/settings/license\",\n\t\t\ticon: Key,\n\t\t\t// Only enabled for owners\n\t\t\tisEnabled: ({ auth }) => !!(auth?.role === \"owner\"),\n\t\t},\n\t\t{\n\t\t\tisSingle: true,\n\t\t\ttitle: \"SSO\",\n\t\t\turl: \"/dashboard/settings/sso\",\n\t\t\ticon: LogIn,\n\t\t\t// Enabled for admins in both cloud and self-hosted (enterprise)\n\t\t\tisEnabled: ({ permissions }) => !!permissions?.organization.update,\n\t\t},\n\t\t{\n\t\t\tisSingle: true,\n\t\t\ttitle: \"Whitelabeling\",\n\t\t\turl: \"/dashboard/settings/whitelabeling\",\n\t\t\ticon: Palette,\n\t\t\t// Only enabled for owners in non-cloud environments (enterprise)\n\t\t\tisEnabled: ({ auth, isCloud }) => !!(auth?.role === \"owner\" && !isCloud),\n\t\t},\n\t],\n\n\thelp: [\n\t\t{\n\t\t\tname: \"Documentation\",\n\t\t\turl: \"https://docs.dokploy.com/docs/core\",\n\t\t\ticon: BookIcon,\n\t\t},\n\t\t{\n\t\t\tname: \"Support\",\n\t\t\turl: \"https://discord.gg/2tBnJ3jDJc\",\n\t\t\ticon: CircleHelp,\n\t\t},\n\t],\n} as const;\n\n/**\n * Creates a menu based on the current user's role and permissions\n * @returns a menu object with the home, settings, and help items\n */\nfunction createMenuForAuthUser(opts: {\n\tauth?: AuthQueryOutput;\n\tpermissions?: PermissionsOutput;\n\tisCloud: boolean;\n\twhitelabeling?: {\n\t\tdocsUrl?: string | null;\n\t\tsupportUrl?: string | null;\n\t} | null;\n}): Menu {\n\tconst filterEnabled = <\n\t\tT extends {\n\t\t\tisEnabled?: (o: EnabledOpts) => boolean;\n\t\t},\n\t>(\n\t\titems: readonly T[],\n\t): T[] =>\n\t\titems.filter((item) =>\n\t\t\t!item.isEnabled\n\t\t\t\t? true\n\t\t\t\t: item.isEnabled({\n\t\t\t\t\t\tauth: opts.auth,\n\t\t\t\t\t\tpermissions: opts.permissions,\n\t\t\t\t\t\tisCloud: opts.isCloud,\n\t\t\t\t\t}),\n\t\t) as T[];\n\n\t// Apply whitelabeling URL overrides to help items\n\tconst helpItems = filterEnabled(MENU.help).map((item) => {\n\t\tif (opts.whitelabeling?.docsUrl && item.name === \"Documentation\") {\n\t\t\treturn { ...item, url: opts.whitelabeling.docsUrl };\n\t\t}\n\t\tif (opts.whitelabeling?.supportUrl && item.name === \"Support\") {\n\t\t\treturn { ...item, url: opts.whitelabeling.supportUrl };\n\t\t}\n\t\treturn item;\n\t});\n\n\treturn {\n\t\thome: filterEnabled(MENU.home),\n\t\tsettings: filterEnabled(MENU.settings),\n\t\thelp: helpItems,\n\t};\n}\n\n/**\n * Determines if an item url is active based on the current pathname\n * @returns true if the item url is active, false otherwise\n */\nfunction isActiveRoute(opts: {\n\t/** The url of the item. Usually obtained from `item.url` */\n\titemUrl: string;\n\t/** The current pathname. Usually obtained from `usePathname()` */\n\tpathname: string;\n}): boolean {\n\tconst normalizedItemUrl = opts.itemUrl?.replace(\"/projects\", \"/project\");\n\tconst normalizedPathname = opts.pathname?.replace(\"/projects\", \"/project\");\n\n\tif (!normalizedPathname) return false;\n\n\tif (normalizedPathname === normalizedItemUrl) return true;\n\n\tif (normalizedPathname.startsWith(normalizedItemUrl)) {\n\t\tconst nextChar = normalizedPathname.charAt(normalizedItemUrl.length);\n\t\treturn nextChar === \"/\";\n\t}\n\n\treturn false;\n}\n\n/**\n * Finds the active nav item based on the current pathname\n * @returns the active nav item with `SingleNavItem` type or undefined if none is active\n */\nfunction findActiveNavItem(\n\tnavItems: NavItem[],\n\tpathname: string,\n): SingleNavItem | undefined {\n\tconst found = navItems.find((item) =>\n\t\titem.isSingle !== false\n\t\t\t? // The current item is single, so check if the item url is active\n\t\t\t\tisActiveRoute({ itemUrl: item.url, pathname })\n\t\t\t: // The current item is not single, so check if any of the sub items are active\n\t\t\t\titem.items.some((item) =>\n\t\t\t\t\tisActiveRoute({ itemUrl: item.url, pathname }),\n\t\t\t\t),\n\t);\n\n\tif (found?.isSingle !== false) {\n\t\t// The found item is single, so return it\n\t\treturn found;\n\t}\n\n\t// The found item is not single, so find the active sub item\n\treturn found?.items.find((item) =>\n\t\tisActiveRoute({ itemUrl: item.url, pathname }),\n\t);\n}\n\ninterface Props {\n\tchildren: React.ReactNode;\n}\n\nfunction LogoWrapper() {\n\treturn <SidebarLogo />;\n}\n\nfunction SidebarLogo() {\n\tconst { state } = useSidebar();\n\tconst { data: isCloud } = api.settings.isCloud.useQuery();\n\tconst { data: user } = api.user.get.useQuery();\n\tconst { data: session } = api.user.session.useQuery();\n\tconst {\n\t\tdata: organizations,\n\t\trefetch,\n\t\tisLoading,\n\t} = api.organization.all.useQuery();\n\tconst { mutateAsync: deleteOrganization, isPending: isRemoving } =\n\t\tapi.organization.delete.useMutation();\n\tconst { mutateAsync: setDefaultOrganization, isPending: isSettingDefault } =\n\t\tapi.organization.setDefault.useMutation();\n\tconst { isMobile } = useSidebar();\n\tconst isCollapsed = state === \"collapsed\" && !isMobile;\n\tconst { data: activeOrganization } = api.organization.active.useQuery();\n\n\tconst { data: invitations, refetch: refetchInvitations } =\n\t\tapi.user.getInvitations.useQuery();\n\n\tconst [_activeTeam, setActiveTeam] = useState<\n\t\ttypeof activeOrganization | null\n\t>(null);\n\n\tuseEffect(() => {\n\t\tif (activeOrganization) {\n\t\t\tsetActiveTeam(activeOrganization);\n\t\t}\n\t}, [activeOrganization]);\n\n\treturn (\n\t\t<>\n\t\t\t{isLoading ? (\n\t\t\t\t<div className=\"flex flex-row gap-2 items-center justify-center text-sm text-muted-foreground min-h-[5vh] pt-4\">\n\t\t\t\t\t<Loader2 className=\"animate-spin size-4\" />\n\t\t\t\t</div>\n\t\t\t) : (\n\t\t\t\t<SidebarMenu\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\"flex gap-2\",\n\t\t\t\t\t\tisCollapsed ? \"flex-col\" : \"flex-row justify-between items-center\",\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t{/* Organization Logo and Selector */}\n\t\t\t\t\t<SidebarMenuItem className={\"w-full\"}>\n\t\t\t\t\t\t<DropdownMenu>\n\t\t\t\t\t\t\t<DropdownMenuTrigger asChild>\n\t\t\t\t\t\t\t\t<SidebarMenuButton\n\t\t\t\t\t\t\t\t\tsize={isCollapsed ? \"sm\" : \"lg\"}\n\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\"data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground\",\n\t\t\t\t\t\t\t\t\t\tisCollapsed &&\n\t\t\t\t\t\t\t\t\t\t\t\"flex justify-center items-center p-2 h-10 w-10 mx-auto\",\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\"flex items-center gap-2\",\n\t\t\t\t\t\t\t\t\t\t\tisCollapsed && \"justify-center\",\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\"flex items-center justify-center rounded-sm border\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"size-6\",\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<Logo\n\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"transition-all\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tisCollapsed ? \"size-4\" : \"size-5\",\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\tlogoUrl={activeOrganization?.logo || undefined}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\"flex flex-col items-start\",\n\t\t\t\t\t\t\t\t\t\t\t\tisCollapsed && \"hidden\",\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-sm font-medium leading-none\">\n\t\t\t\t\t\t\t\t\t\t\t\t{activeOrganization?.name ?? \"Select Organization\"}\n\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<ChevronsUpDown\n\t\t\t\t\t\t\t\t\t\tclassName={cn(\"ml-auto\", isCollapsed && \"hidden\")}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</SidebarMenuButton>\n\t\t\t\t\t\t\t</DropdownMenuTrigger>\n\t\t\t\t\t\t\t<DropdownMenuContent\n\t\t\t\t\t\t\t\tclassName=\"rounded-lg max-h-[min(70vh,28rem)] flex flex-col\"\n\t\t\t\t\t\t\t\talign=\"start\"\n\t\t\t\t\t\t\t\tside={isMobile ? \"bottom\" : \"right\"}\n\t\t\t\t\t\t\t\tsideOffset={4}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<DropdownMenuLabel className=\"text-xs text-muted-foreground shrink-0\">\n\t\t\t\t\t\t\t\t\tOrganizations\n\t\t\t\t\t\t\t\t</DropdownMenuLabel>\n\t\t\t\t\t\t\t\t<div className=\"overflow-y-auto overflow-x-hidden min-h-0 -mx-1 px-1\">\n\t\t\t\t\t\t\t\t\t{organizations?.map((org) => {\n\t\t\t\t\t\t\t\t\t\tconst isDefault = org.members?.[0]?.isDefault ?? false;\n\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex flex-row justify-between\"\n\t\t\t\t\t\t\t\t\t\t\t\tkey={org.name}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait authClient.organization.setActive({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torganizationId: org.id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twindow.location.reload();\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-full gap-2 p-2\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{org.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex size-6 items-center justify-center rounded-sm border\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Logo\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"transition-all\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstate === \"collapsed\" ? \"size-6\" : \"size-10\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlogoUrl={org.logo ?? undefined}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</DropdownMenuItem>\n\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"group\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisDefault\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"hover:bg-yellow-500/10\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"hover:bg-blue-500/10\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tisLoading={isSettingDefault && !isDefault}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisabled={isDefault}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={async (e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (isDefault) return;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait setDefaultOrganization({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torganizationId: org.id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Default organization updated\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.catch((error) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\terror?.message ||\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Error setting default organization\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitle={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisDefault\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"Default organization\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Set as default\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{isDefault ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Star\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfill=\"#eab308\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstroke=\"#eab308\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"size-4 text-yellow-500\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Star\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"size-4 text-gray-400 group-hover:text-blue-500 transition-colors\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{org.ownerId === session?.user?.id && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<AddOrganization organizationId={org.id} />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"Delete Organization\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to delete this organization?\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"destructive\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait deleteOrganization({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torganizationId: org.id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Organization deleted successfully\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.catch((error) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\terror?.message ||\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Error deleting organization\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"group hover:bg-red-500/10\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisLoading={isRemoving}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Trash2 className=\"size-4 text-primary group-hover:text-red-500\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t{(user?.role === \"owner\" ||\n\t\t\t\t\t\t\t\t\tuser?.role === \"admin\" ||\n\t\t\t\t\t\t\t\t\tisCloud) && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<DropdownMenuSeparator />\n\t\t\t\t\t\t\t\t\t\t<AddOrganization />\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</DropdownMenuContent>\n\t\t\t\t\t\t</DropdownMenu>\n\t\t\t\t\t</SidebarMenuItem>\n\n\t\t\t\t\t{/* Notification Bell */}\n\t\t\t\t\t<SidebarMenuItem className={cn(isCollapsed && \"mt-2\")}>\n\t\t\t\t\t\t<DropdownMenu>\n\t\t\t\t\t\t\t<DropdownMenuTrigger asChild>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\"relative\",\n\t\t\t\t\t\t\t\t\t\tisCollapsed && \"h-8 w-8 p-1.5 mx-auto\",\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Bell className=\"size-4\" />\n\t\t\t\t\t\t\t\t\t{invitations && invitations.length > 0 && (\n\t\t\t\t\t\t\t\t\t\t<span className=\"absolute -top-0 -right-0 flex size-4 items-center justify-center rounded-full bg-blue-500 text-xs text-white\">\n\t\t\t\t\t\t\t\t\t\t\t{invitations.length}\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</DropdownMenuTrigger>\n\t\t\t\t\t\t\t<DropdownMenuContent\n\t\t\t\t\t\t\t\talign=\"start\"\n\t\t\t\t\t\t\t\tside={\"right\"}\n\t\t\t\t\t\t\t\tclassName=\"w-80\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<DropdownMenuLabel>Pending Invitations</DropdownMenuLabel>\n\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t\t{invitations && invitations.length > 0 ? (\n\t\t\t\t\t\t\t\t\t\tinvitations.map((invitation) => (\n\t\t\t\t\t\t\t\t\t\t\t<div key={invitation.id} className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex flex-col items-start gap-1 p-3\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tonSelect={(e) => e.preventDefault()}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"font-medium\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{invitation?.organization?.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"text-xs text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tExpires:{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{new Date(invitation.expiresAt).toLocaleString()}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"text-xs text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tRole: {invitation.role}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"Accept Invitation\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to accept this invitation?\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"default\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst { error } =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait authClient.organization.acceptInvitation({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tinvitationId: invitation.id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (error) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\terror.message || \"Error accepting invitation\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Invitation accepted successfully\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait refetchInvitations();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait refetch();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Button size=\"sm\" variant=\"secondary\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tAccept Invitation\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t))\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t<DropdownMenuItem disabled>\n\t\t\t\t\t\t\t\t\t\t\tNo pending invitations\n\t\t\t\t\t\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</DropdownMenuContent>\n\t\t\t\t\t\t</DropdownMenu>\n\t\t\t\t\t</SidebarMenuItem>\n\t\t\t\t</SidebarMenu>\n\t\t\t)}\n\t\t</>\n\t);\n}\n\nexport default function Page({ children }: Props) {\n\tconst [defaultOpen, setDefaultOpen] = useState<boolean | undefined>(\n\t\tundefined,\n\t);\n\tconst [isLoaded, setIsLoaded] = useState(false);\n\n\tuseEffect(() => {\n\t\tconst cookieValue = document.cookie\n\t\t\t.split(\"; \")\n\t\t\t.find((row) => row.startsWith(`${SIDEBAR_COOKIE_NAME}=`))\n\t\t\t?.split(\"=\")[1];\n\n\t\tsetDefaultOpen(cookieValue === undefined ? true : cookieValue === \"true\");\n\t\tsetIsLoaded(true);\n\t}, []);\n\n\tconst pathname = usePathname();\n\tconst { data: auth } = api.user.get.useQuery();\n\tconst { data: permissions } = api.user.getPermissions.useQuery();\n\tconst { data: dokployVersion } = api.settings.getDokployVersion.useQuery();\n\tconst { data: whitelabeling } = api.whitelabeling.get.useQuery(undefined, {\n\t\tstaleTime: 5 * 60 * 1000,\n\t\trefetchOnWindowFocus: false,\n\t});\n\n\tconst includesProjects = pathname?.includes(\"/dashboard/project\");\n\tconst { data: isCloud } = api.settings.isCloud.useQuery();\n\n\tconst {\n\t\thome: filteredHome,\n\t\tsettings: filteredSettings,\n\t\thelp,\n\t} = createMenuForAuthUser({\n\t\tauth,\n\t\tpermissions,\n\t\tisCloud: !!isCloud,\n\t\twhitelabeling,\n\t});\n\n\tconst activeItem = findActiveNavItem(\n\t\t[...filteredHome, ...filteredSettings],\n\t\tpathname,\n\t);\n\n\tif (!isLoaded) {\n\t\treturn <div className=\"w-full h-screen bg-background\" />; // Placeholder mientras se carga\n\t}\n\n\treturn (\n\t\t<SidebarProvider\n\t\t\tdefaultOpen={defaultOpen}\n\t\t\topen={defaultOpen}\n\t\t\tonOpenChange={(open) => {\n\t\t\t\tsetDefaultOpen(open);\n\n\t\t\t\t// biome-ignore lint/suspicious/noDocumentCookie: this sets the cookie to keep the sidebar state.\n\t\t\t\tdocument.cookie = `${SIDEBAR_COOKIE_NAME}=${open}`;\n\t\t\t}}\n\t\t\tstyle={\n\t\t\t\t{\n\t\t\t\t\t\"--sidebar-width\": \"19.5rem\",\n\t\t\t\t\t\"--sidebar-width-mobile\": \"19.5rem\",\n\t\t\t\t} as React.CSSProperties\n\t\t\t}\n\t\t>\n\t\t\t<Sidebar collapsible=\"icon\" variant=\"floating\">\n\t\t\t\t<SidebarHeader>\n\t\t\t\t\t{/* <SidebarMenuButton\n\t\t\t\t\t\tclassName=\"group-data-[collapsible=icon]:!p-0\"\n\t\t\t\t\t\tsize=\"lg\"\n\t\t\t\t\t> */}\n\t\t\t\t\t<LogoWrapper />\n\t\t\t\t\t{/* </SidebarMenuButton> */}\n\t\t\t\t</SidebarHeader>\n\t\t\t\t<SidebarContent>\n\t\t\t\t\t<SidebarGroup>\n\t\t\t\t\t\t<SidebarGroupLabel>Home</SidebarGroupLabel>\n\t\t\t\t\t\t<SidebarMenu>\n\t\t\t\t\t\t\t{filteredHome.map((item) => {\n\t\t\t\t\t\t\t\tconst isSingle = item.isSingle !== false;\n\t\t\t\t\t\t\t\tconst isActive = isSingle\n\t\t\t\t\t\t\t\t\t? isActiveRoute({ itemUrl: item.url, pathname })\n\t\t\t\t\t\t\t\t\t: item.items.some((item) =>\n\t\t\t\t\t\t\t\t\t\t\tisActiveRoute({ itemUrl: item.url, pathname }),\n\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<Collapsible\n\t\t\t\t\t\t\t\t\t\tkey={item.title}\n\t\t\t\t\t\t\t\t\t\tasChild\n\t\t\t\t\t\t\t\t\t\tdefaultOpen={isActive}\n\t\t\t\t\t\t\t\t\t\tclassName=\"group/collapsible\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<SidebarMenuItem>\n\t\t\t\t\t\t\t\t\t\t\t{isSingle ? (\n\t\t\t\t\t\t\t\t\t\t\t\t<SidebarMenuButton\n\t\t\t\t\t\t\t\t\t\t\t\t\tasChild\n\t\t\t\t\t\t\t\t\t\t\t\t\ttooltip={item.title}\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(isActive && \"bg-border\")}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\t\t\thref={item.url}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex w-full items-center gap-2\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{item.icon && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<item.icon\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(isActive && \"text-primary\")}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>{item.title}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t\t\t</SidebarMenuButton>\n\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CollapsibleTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SidebarMenuButton\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttooltip={item.title}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisActive={isActive}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{item.icon && <item.icon />}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>{item.title}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{item.items?.length && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ChevronRight className=\"ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SidebarMenuButton>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</CollapsibleTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CollapsibleContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SidebarMenuSub>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{item.items?.map((subItem) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SidebarMenuSubItem key={subItem.title}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SidebarMenuSubButton\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tasChild\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(isActive && \"bg-border\")}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thref={subItem.url}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex w-full items-center\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{subItem.icon && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"mr-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<subItem.icon\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"h-4 w-4 text-muted-foreground\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisActive && \"text-primary\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>{subItem.title}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SidebarMenuSubButton>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SidebarMenuSubItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SidebarMenuSub>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</CollapsibleContent>\n\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t</SidebarMenuItem>\n\t\t\t\t\t\t\t\t\t</Collapsible>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t</SidebarMenu>\n\t\t\t\t\t</SidebarGroup>\n\t\t\t\t\t<SidebarGroup>\n\t\t\t\t\t\t<SidebarGroupLabel>Settings</SidebarGroupLabel>\n\t\t\t\t\t\t<SidebarMenu className=\"gap-1\">\n\t\t\t\t\t\t\t{filteredSettings.map((item) => {\n\t\t\t\t\t\t\t\tconst isSingle = item.isSingle !== false;\n\t\t\t\t\t\t\t\tconst isActive = isSingle\n\t\t\t\t\t\t\t\t\t? isActiveRoute({ itemUrl: item.url, pathname })\n\t\t\t\t\t\t\t\t\t: item.items.some((item) =>\n\t\t\t\t\t\t\t\t\t\t\tisActiveRoute({ itemUrl: item.url, pathname }),\n\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<Collapsible\n\t\t\t\t\t\t\t\t\t\tkey={item.title}\n\t\t\t\t\t\t\t\t\t\tasChild\n\t\t\t\t\t\t\t\t\t\tdefaultOpen={isActive}\n\t\t\t\t\t\t\t\t\t\tclassName=\"group/collapsible\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<SidebarMenuItem>\n\t\t\t\t\t\t\t\t\t\t\t{isSingle ? (\n\t\t\t\t\t\t\t\t\t\t\t\t<SidebarMenuButton\n\t\t\t\t\t\t\t\t\t\t\t\t\tasChild\n\t\t\t\t\t\t\t\t\t\t\t\t\ttooltip={item.title}\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(isActive && \"bg-border\")}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\t\t\thref={item.url}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex w-full items-center gap-2\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{item.icon && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<item.icon\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(isActive && \"text-primary\")}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>{item.title}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t\t\t</SidebarMenuButton>\n\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CollapsibleTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SidebarMenuButton\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttooltip={item.title}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisActive={isActive}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{item.icon && <item.icon />}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>{item.title}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{item.items?.length && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ChevronRight className=\"ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SidebarMenuButton>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</CollapsibleTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CollapsibleContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SidebarMenuSub>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{item.items?.map((subItem) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SidebarMenuSubItem key={subItem.title}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SidebarMenuSubButton\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tasChild\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(isActive && \"bg-border\")}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thref={subItem.url}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex w-full items-center\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{subItem.icon && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"mr-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<subItem.icon\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"h-4 w-4 text-muted-foreground\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisActive && \"text-primary\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>{subItem.title}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SidebarMenuSubButton>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SidebarMenuSubItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SidebarMenuSub>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</CollapsibleContent>\n\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t</SidebarMenuItem>\n\t\t\t\t\t\t\t\t\t</Collapsible>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t</SidebarMenu>\n\t\t\t\t\t</SidebarGroup>\n\t\t\t\t\t<SidebarGroup className=\"group-data-[collapsible=icon]:hidden\">\n\t\t\t\t\t\t<SidebarGroupLabel>Extra</SidebarGroupLabel>\n\t\t\t\t\t\t<SidebarMenu>\n\t\t\t\t\t\t\t{help.map((item: ExternalLink) => (\n\t\t\t\t\t\t\t\t<SidebarMenuItem key={item.name}>\n\t\t\t\t\t\t\t\t\t<SidebarMenuButton asChild>\n\t\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\t\thref={item.url}\n\t\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex w-full items-center gap-2\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"mr-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t<item.icon className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t<span>{item.name}</span>\n\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t</SidebarMenuButton>\n\t\t\t\t\t\t\t\t</SidebarMenuItem>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</SidebarMenu>\n\t\t\t\t\t</SidebarGroup>\n\t\t\t\t</SidebarContent>\n\t\t\t\t<SidebarFooter>\n\t\t\t\t\t<SidebarMenu className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t{!isCloud && permissions?.organization.update && (\n\t\t\t\t\t\t\t<SidebarMenuItem>\n\t\t\t\t\t\t\t\t<UpdateServerButton />\n\t\t\t\t\t\t\t</SidebarMenuItem>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<SidebarMenuItem>\n\t\t\t\t\t\t\t<UserNav />\n\t\t\t\t\t\t</SidebarMenuItem>\n\t\t\t\t\t\t{whitelabeling?.footerText && (\n\t\t\t\t\t\t\t<div className=\"px-3 text-xs text-muted-foreground text-center group-data-[collapsible=icon]:hidden\">\n\t\t\t\t\t\t\t\t{whitelabeling.footerText}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{dokployVersion && (\n\t\t\t\t\t\t\t<div className=\"px-3 text-xs text-muted-foreground text-center group-data-[collapsible=icon]:hidden\">\n\t\t\t\t\t\t\t\tVersion {dokployVersion}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</SidebarMenu>\n\t\t\t\t</SidebarFooter>\n\t\t\t\t<SidebarRail />\n\t\t\t</Sidebar>\n\t\t\t<SidebarInset>\n\t\t\t\t{!includesProjects && (\n\t\t\t\t\t<header className=\"flex h-16 shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-[[data-collapsible=icon]]/sidebar-wrapper:h-12\">\n\t\t\t\t\t\t<div className=\"flex items-center justify-between w-full px-4\">\n\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t<SidebarTrigger className=\"-ml-1\" />\n\t\t\t\t\t\t\t\t<Separator orientation=\"vertical\" className=\"mr-2 h-4\" />\n\t\t\t\t\t\t\t\t<Breadcrumb>\n\t\t\t\t\t\t\t\t\t<BreadcrumbList>\n\t\t\t\t\t\t\t\t\t\t<BreadcrumbItem className=\"block\">\n\t\t\t\t\t\t\t\t\t\t\t<BreadcrumbLink asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\t\thref={activeItem?.url || \"/\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1.5\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{activeItem?.title}\n\t\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t\t</BreadcrumbLink>\n\t\t\t\t\t\t\t\t\t\t</BreadcrumbItem>\n\t\t\t\t\t\t\t\t\t</BreadcrumbList>\n\t\t\t\t\t\t\t\t</Breadcrumb>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t{!isCloud && <TimeBadge />}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</header>\n\t\t\t\t)}\n\n\t\t\t\t<div className=\"flex flex-col w-full p-4 pt-0\">{children}</div>\n\t\t\t</SidebarInset>\n\t\t</SidebarProvider>\n\t);\n}\n"
  },
  {
    "path": "apps/dokploy/components/layouts/update-server.tsx",
    "content": "import type { IUpdateData } from \"@dokploy/server/index\";\nimport { Download } from \"lucide-react\";\nimport { useEffect, useRef, useState } from \"react\";\nimport { api } from \"@/utils/api\";\nimport UpdateServer from \"../dashboard/settings/web-server/update-server\";\nimport { Button } from \"../ui/button\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"../ui/tooltip\";\n\nconst AUTO_CHECK_UPDATES_INTERVAL_MINUTES = 7;\n\nexport const UpdateServerButton = () => {\n\tconst [updateData, setUpdateData] = useState<IUpdateData>({\n\t\tlatestVersion: null,\n\t\tupdateAvailable: false,\n\t});\n\tconst { data: isCloud } = api.settings.isCloud.useQuery();\n\tconst { mutateAsync: getUpdateData } =\n\t\tapi.settings.getUpdateData.useMutation();\n\tconst [isOpen, setIsOpen] = useState(false);\n\n\tconst checkUpdatesIntervalRef = useRef<null | NodeJS.Timeout>(null);\n\n\tuseEffect(() => {\n\t\t// Handling of automatic check for server updates\n\t\tif (isCloud) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!localStorage.getItem(\"enableAutoCheckUpdates\")) {\n\t\t\t// Enable auto update checking by default if user didn't change it\n\t\t\tlocalStorage.setItem(\"enableAutoCheckUpdates\", \"true\");\n\t\t}\n\n\t\tconst clearUpdatesInterval = () => {\n\t\t\tif (checkUpdatesIntervalRef.current) {\n\t\t\t\tclearInterval(checkUpdatesIntervalRef.current);\n\t\t\t}\n\t\t};\n\n\t\tconst checkUpdates = async () => {\n\t\t\ttry {\n\t\t\t\tif (localStorage.getItem(\"enableAutoCheckUpdates\") !== \"true\") {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst fetchedUpdateData = await getUpdateData();\n\n\t\t\t\tif (fetchedUpdateData?.updateAvailable) {\n\t\t\t\t\t// Stop interval when update is available\n\t\t\t\t\tclearUpdatesInterval();\n\t\t\t\t\tsetUpdateData(fetchedUpdateData);\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(\"Error auto-checking for updates:\", error);\n\t\t\t}\n\t\t};\n\n\t\tcheckUpdatesIntervalRef.current = setInterval(\n\t\t\tcheckUpdates,\n\t\t\tAUTO_CHECK_UPDATES_INTERVAL_MINUTES * 60000,\n\t\t);\n\n\t\t// Also check for updates on initial page load\n\t\tcheckUpdates();\n\n\t\treturn () => {\n\t\t\tclearUpdatesInterval();\n\t\t};\n\t}, []);\n\n\treturn !isCloud && updateData.updateAvailable ? (\n\t\t<div className=\"border-t pt-4\">\n\t\t\t<UpdateServer\n\t\t\t\tupdateData={updateData}\n\t\t\t\tisOpen={isOpen}\n\t\t\t\tonOpenChange={setIsOpen}\n\t\t\t>\n\t\t\t\t<TooltipProvider delayDuration={0}>\n\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant={updateData ? \"outline\" : \"secondary\"}\n\t\t\t\t\t\t\t\tclassName=\"w-full\"\n\t\t\t\t\t\t\t\tonClick={() => setIsOpen(true)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Download className=\"h-4 w-4 flex-shrink-0\" />\n\t\t\t\t\t\t\t\t{updateData ? (\n\t\t\t\t\t\t\t\t\t<span className=\"font-medium truncate group-data-[collapsible=icon]:hidden\">\n\t\t\t\t\t\t\t\t\t\tUpdate Available\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<span className=\"font-medium truncate group-data-[collapsible=icon]:hidden\">\n\t\t\t\t\t\t\t\t\t\tCheck for updates\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{updateData && (\n\t\t\t\t\t\t\t\t\t<span className=\"absolute right-2 flex h-2 w-2 group-data-[collapsible=icon]:hidden\">\n\t\t\t\t\t\t\t\t\t\t<span className=\"animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75\" />\n\t\t\t\t\t\t\t\t\t\t<span className=\"relative inline-flex rounded-full h-2 w-2 bg-emerald-500\" />\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t{updateData && (\n\t\t\t\t\t\t\t<TooltipContent side=\"right\" sideOffset={10}>\n\t\t\t\t\t\t\t\t<p>Update Available</p>\n\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Tooltip>\n\t\t\t\t</TooltipProvider>\n\t\t\t</UpdateServer>\n\t\t</div>\n\t) : null;\n};\n"
  },
  {
    "path": "apps/dokploy/components/layouts/user-nav.tsx",
    "content": "import { ChevronsUpDown } from \"lucide-react\";\nimport { useRouter } from \"next/router\";\nimport { Avatar, AvatarFallback, AvatarImage } from \"@/components/ui/avatar\";\nimport {\n\tDropdownMenu,\n\tDropdownMenuContent,\n\tDropdownMenuGroup,\n\tDropdownMenuItem,\n\tDropdownMenuLabel,\n\tDropdownMenuSeparator,\n\tDropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\nimport { authClient } from \"@/lib/auth-client\";\nimport { getFallbackAvatarInitials } from \"@/lib/utils\";\nimport { api } from \"@/utils/api\";\nimport { ModeToggle } from \"../ui/modeToggle\";\nimport { SidebarMenuButton } from \"../ui/sidebar\";\n\nconst _AUTO_CHECK_UPDATES_INTERVAL_MINUTES = 7;\n\nexport const UserNav = () => {\n\tconst router = useRouter();\n\tconst { data } = api.user.get.useQuery();\n\tconst { data: permissions } = api.user.getPermissions.useQuery();\n\tconst { data: isCloud } = api.settings.isCloud.useQuery();\n\n\t// const { mutateAsync } = api.auth.logout.useMutation();\n\n\treturn (\n\t\t<DropdownMenu>\n\t\t\t<DropdownMenuTrigger asChild>\n\t\t\t\t<SidebarMenuButton\n\t\t\t\t\tsize=\"lg\"\n\t\t\t\t\tclassName=\"data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground\"\n\t\t\t\t>\n\t\t\t\t\t<Avatar className=\"h-8 w-8 rounded-lg\">\n\t\t\t\t\t\t<AvatarImage\n\t\t\t\t\t\t\tclassName=\"object-cover\"\n\t\t\t\t\t\t\tsrc={data?.user?.image || \"\"}\n\t\t\t\t\t\t\talt={data?.user?.image || \"\"}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<AvatarFallback className=\"rounded-lg\">\n\t\t\t\t\t\t\t{getFallbackAvatarInitials(\n\t\t\t\t\t\t\t\t`${data?.user?.firstName} ${data?.user?.lastName}`.trim(),\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</AvatarFallback>\n\t\t\t\t\t</Avatar>\n\t\t\t\t\t<div className=\"grid flex-1 text-left text-sm leading-tight\">\n\t\t\t\t\t\t<span className=\"truncate font-semibold\">Account</span>\n\t\t\t\t\t\t<span className=\"truncate text-xs\">{data?.user?.email}</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<ChevronsUpDown className=\"ml-auto size-4\" />\n\t\t\t\t</SidebarMenuButton>\n\t\t\t</DropdownMenuTrigger>\n\t\t\t<DropdownMenuContent\n\t\t\t\tclassName=\"w-[--radix-dropdown-menu-trigger-width] min-w-56 rounded-lg\"\n\t\t\t\tside=\"bottom\"\n\t\t\t\talign=\"end\"\n\t\t\t\tsideOffset={4}\n\t\t\t>\n\t\t\t\t<div className=\"flex items-center justify-between px-2 py-1.5\">\n\t\t\t\t\t<DropdownMenuLabel className=\"flex flex-col\">\n\t\t\t\t\t\tMy Account\n\t\t\t\t\t\t<span className=\"text-xs font-normal text-muted-foreground\">\n\t\t\t\t\t\t\t{data?.user?.email}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</DropdownMenuLabel>\n\t\t\t\t\t<ModeToggle />\n\t\t\t\t</div>\n\t\t\t\t<DropdownMenuSeparator />\n\t\t\t\t<DropdownMenuGroup>\n\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\tclassName=\"cursor-pointer\"\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\trouter.push(\"/dashboard/settings/profile\");\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tProfile\n\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\tclassName=\"cursor-pointer\"\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\trouter.push(\"/dashboard/projects\");\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tProjects\n\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t{!isCloud ? (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\t\t\tclassName=\"cursor-pointer\"\n\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\trouter.push(\"/dashboard/monitoring\");\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tMonitoring\n\t\t\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t\t\t{permissions?.traefikFiles.read && (\n\t\t\t\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\t\t\t\tclassName=\"cursor-pointer\"\n\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\trouter.push(\"/dashboard/traefik\");\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tTraefik\n\t\t\t\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{permissions?.docker.read && (\n\t\t\t\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\t\t\t\tclassName=\"cursor-pointer\"\n\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\trouter.push(\"/dashboard/docker\", undefined, {\n\t\t\t\t\t\t\t\t\t\t\tshallow: true,\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tDocker\n\t\t\t\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</>\n\t\t\t\t\t) : (\n\t\t\t\t\t\tpermissions?.organization.update && (\n\t\t\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\t\t\tclassName=\"cursor-pointer\"\n\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\trouter.push(\"/dashboard/settings/servers\");\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tServers\n\t\t\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t\t)\n\t\t\t\t\t)}\n\t\t\t\t</DropdownMenuGroup>\n\t\t\t\t{isCloud && data?.role === \"owner\" && (\n\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\tclassName=\"cursor-pointer\"\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\trouter.push(\"/dashboard/settings/billing\");\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tBilling\n\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t)}\n\t\t\t\t<DropdownMenuSeparator />\n\t\t\t\t<DropdownMenuItem\n\t\t\t\t\tclassName=\"cursor-pointer\"\n\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\tawait authClient.signOut().then(() => {\n\t\t\t\t\t\t\trouter.push(\"/\");\n\t\t\t\t\t\t});\n\t\t\t\t\t\t// await mutateAsync().then(() => {\n\t\t\t\t\t\t// \trouter.push(\"/\");\n\t\t\t\t\t\t// });\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\tLog out\n\t\t\t\t</DropdownMenuItem>\n\t\t\t</DropdownMenuContent>\n\t\t</DropdownMenu>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/proprietary/audit-logs/columns.tsx",
    "content": "\"use client\";\n\nimport type { AuditLog } from \"@dokploy/server/db/schema\";\nimport type { ColumnDef } from \"@tanstack/react-table\";\nimport { format } from \"date-fns\";\nimport {\n\tArrowUpDown,\n\tFileJson,\n\tLogIn,\n\tLogOut,\n\tPlusCircle,\n\tRefreshCw,\n\tRotateCcw,\n\tTrash2,\n\tUpload,\n\tXCircle,\n} from \"lucide-react\";\nimport React from \"react\";\nimport { CodeEditor } from \"@/components/shared/code-editor\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\n\nconst ACTION_CONFIG: Record<\n\tstring,\n\t{ label: string; icon: React.ElementType; className: string }\n> = {\n\tcreate: {\n\t\tlabel: \"Created\",\n\t\ticon: PlusCircle,\n\t\tclassName:\n\t\t\t\"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 border-emerald-500/20\",\n\t},\n\tupdate: {\n\t\tlabel: \"Updated\",\n\t\ticon: RefreshCw,\n\t\tclassName:\n\t\t\t\"bg-blue-500/10 text-blue-600 dark:text-blue-400 border-blue-500/20\",\n\t},\n\tdelete: {\n\t\tlabel: \"Deleted\",\n\t\ticon: Trash2,\n\t\tclassName: \"bg-red-500/10 text-red-600 dark:text-red-400 border-red-500/20\",\n\t},\n\tdeploy: {\n\t\tlabel: \"Deployed\",\n\t\ticon: Upload,\n\t\tclassName:\n\t\t\t\"bg-violet-500/10 text-violet-600 dark:text-violet-400 border-violet-500/20\",\n\t},\n\tcancel: {\n\t\tlabel: \"Cancelled\",\n\t\ticon: XCircle,\n\t\tclassName:\n\t\t\t\"bg-orange-500/10 text-orange-600 dark:text-orange-400 border-orange-500/20\",\n\t},\n\tredeploy: {\n\t\tlabel: \"Redeployed\",\n\t\ticon: RotateCcw,\n\t\tclassName:\n\t\t\t\"bg-violet-500/10 text-violet-600 dark:text-violet-400 border-violet-500/20\",\n\t},\n\tlogin: {\n\t\tlabel: \"Login\",\n\t\ticon: LogIn,\n\t\tclassName:\n\t\t\t\"bg-teal-500/10 text-teal-600 dark:text-teal-400 border-teal-500/20\",\n\t},\n\tlogout: {\n\t\tlabel: \"Logout\",\n\t\ticon: LogOut,\n\t\tclassName:\n\t\t\t\"bg-slate-500/10 text-slate-600 dark:text-slate-400 border-slate-500/20\",\n\t},\n};\n\nconst RESOURCE_LABELS: Record<string, string> = {\n\tproject: \"Project\",\n\tservice: \"Service\",\n\tenvironment: \"Environment\",\n\tdeployment: \"Deployment\",\n\tuser: \"User\",\n\tcustomRole: \"Custom Role\",\n\tdomain: \"Domain\",\n\tcertificate: \"Certificate\",\n\tregistry: \"Registry\",\n\tserver: \"Server\",\n\tsshKey: \"SSH Key\",\n\tgitProvider: \"Git Provider\",\n\tnotification: \"Notification\",\n\tsettings: \"Settings\",\n\tsession: \"Session\",\n};\n\nfunction MetadataCell({ metadata }: { metadata: string | null }) {\n\tif (!metadata)\n\t\treturn <span className=\"text-muted-foreground text-sm\">—</span>;\n\n\tconst formatted = React.useMemo(() => {\n\t\ttry {\n\t\t\treturn JSON.stringify(JSON.parse(metadata), null, 2);\n\t\t} catch {\n\t\t\treturn metadata;\n\t\t}\n\t}, [metadata]);\n\n\treturn (\n\t\t<Dialog>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t<Button variant=\"ghost\" size=\"sm\" className=\"h-7 gap-1.5 text-xs\">\n\t\t\t\t\t<FileJson className=\"h-3.5 w-3.5\" />\n\t\t\t\t\tView\n\t\t\t\t</Button>\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"max-w-lg\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Metadata</DialogTitle>\n\t\t\t\t</DialogHeader>\n\t\t\t\t<CodeEditor\n\t\t\t\t\tvalue={formatted}\n\t\t\t\t\tlanguage=\"json\"\n\t\t\t\t\tlineNumbers={false}\n\t\t\t\t\treadOnly\n\t\t\t\t\tclassName=\"min-h-[200px] max-h-[400px] overflow-auto rounded-md\"\n\t\t\t\t/>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n}\n\nexport const columns: ColumnDef<AuditLog>[] = [\n\t{\n\t\taccessorKey: \"createdAt\",\n\t\theader: ({ column }) => (\n\t\t\t<Button\n\t\t\t\tvariant=\"ghost\"\n\t\t\t\tonClick={() => column.toggleSorting(column.getIsSorted() === \"asc\")}\n\t\t\t>\n\t\t\t\tDate\n\t\t\t\t<ArrowUpDown className=\"ml-2 h-4 w-4\" />\n\t\t\t</Button>\n\t\t),\n\t\tcell: ({ row }) => (\n\t\t\t<span className=\"text-sm text-muted-foreground whitespace-nowrap\">\n\t\t\t\t{format(new Date(row.getValue(\"createdAt\")), \"MMM d, yyyy HH:mm\")}\n\t\t\t</span>\n\t\t),\n\t},\n\t{\n\t\taccessorKey: \"userEmail\",\n\t\theader: ({ column }) => (\n\t\t\t<Button\n\t\t\t\tvariant=\"ghost\"\n\t\t\t\tonClick={() => column.toggleSorting(column.getIsSorted() === \"asc\")}\n\t\t\t>\n\t\t\t\tUser\n\t\t\t\t<ArrowUpDown className=\"ml-2 h-4 w-4\" />\n\t\t\t</Button>\n\t\t),\n\t\tcell: ({ row }) => (\n\t\t\t<span className=\"text-sm\">{row.getValue(\"userEmail\")}</span>\n\t\t),\n\t},\n\t{\n\t\taccessorKey: \"action\",\n\t\theader: ({ column }) => (\n\t\t\t<Button\n\t\t\t\tvariant=\"ghost\"\n\t\t\t\tonClick={() => column.toggleSorting(column.getIsSorted() === \"asc\")}\n\t\t\t>\n\t\t\t\tAction\n\t\t\t\t<ArrowUpDown className=\"ml-2 h-4 w-4\" />\n\t\t\t</Button>\n\t\t),\n\t\tcell: ({ row }) => {\n\t\t\tconst action = row.getValue(\"action\") as string;\n\t\t\tconst config = ACTION_CONFIG[action];\n\t\t\tif (!config) {\n\t\t\t\treturn <span className=\"text-xs text-muted-foreground\">{action}</span>;\n\t\t\t}\n\t\t\tconst Icon = config.icon;\n\t\t\treturn (\n\t\t\t\t<span\n\t\t\t\t\tclassName={`inline-flex items-center gap-1.5 rounded-full border px-2.5 py-0.5 text-xs font-medium ${config.className}`}\n\t\t\t\t>\n\t\t\t\t\t<Icon className=\"size-3\" />\n\t\t\t\t\t{config.label}\n\t\t\t\t</span>\n\t\t\t);\n\t\t},\n\t},\n\t{\n\t\taccessorKey: \"resourceType\",\n\t\theader: \"Resource\",\n\t\tcell: ({ row }) => (\n\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t{RESOURCE_LABELS[row.getValue(\"resourceType\") as string] ??\n\t\t\t\t\trow.getValue(\"resourceType\")}\n\t\t\t</span>\n\t\t),\n\t},\n\t{\n\t\taccessorKey: \"resourceName\",\n\t\theader: \"Name\",\n\t\tcell: ({ row }) => (\n\t\t\t<span className=\"text-sm font-medium\">\n\t\t\t\t{(row.getValue(\"resourceName\") as string) ?? \"—\"}\n\t\t\t</span>\n\t\t),\n\t},\n\t{\n\t\taccessorKey: \"userRole\",\n\t\theader: \"Role\",\n\t\tcell: ({ row }) => (\n\t\t\t<span className=\"text-sm text-muted-foreground capitalize\">\n\t\t\t\t{row.getValue(\"userRole\")}\n\t\t\t</span>\n\t\t),\n\t},\n\t{\n\t\taccessorKey: \"metadata\",\n\t\theader: \"Metadata\",\n\t\tcell: ({ row }) => <MetadataCell metadata={row.getValue(\"metadata\")} />,\n\t},\n];\n"
  },
  {
    "path": "apps/dokploy/components/proprietary/audit-logs/data-table.tsx",
    "content": "\"use client\";\n\nimport type { AuditLog } from \"@dokploy/server/db/schema\";\nimport { DropdownMenuTrigger } from \"@radix-ui/react-dropdown-menu\";\nimport {\n\ttype ColumnDef,\n\tflexRender,\n\tgetCoreRowModel,\n\tgetSortedRowModel,\n\ttype SortingState,\n\tuseReactTable,\n\ttype VisibilityState,\n} from \"@tanstack/react-table\";\nimport { format } from \"date-fns\";\nimport { CalendarIcon, ChevronDown, X } from \"lucide-react\";\nimport React from \"react\";\nimport type { DateRange } from \"react-day-picker\";\nimport { Button } from \"@/components/ui/button\";\nimport { Calendar } from \"@/components/ui/calendar\";\nimport {\n\tDropdownMenu,\n\tDropdownMenuCheckboxItem,\n\tDropdownMenuContent,\n} from \"@/components/ui/dropdown-menu\";\nimport { Input } from \"@/components/ui/input\";\nimport {\n\tPopover,\n\tPopoverContent,\n\tPopoverTrigger,\n} from \"@/components/ui/popover\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport {\n\tTable,\n\tTableBody,\n\tTableCell,\n\tTableHead,\n\tTableHeader,\n\tTableRow,\n} from \"@/components/ui/table\";\n\nconst ACTION_OPTIONS = [\n\t{ value: \"create\", label: \"Created\" },\n\t{ value: \"update\", label: \"Updated\" },\n\t{ value: \"delete\", label: \"Deleted\" },\n\t{ value: \"deploy\", label: \"Deployed\" },\n\t{ value: \"cancel\", label: \"Cancelled\" },\n\t{ value: \"redeploy\", label: \"Redeployed\" },\n\t{ value: \"login\", label: \"Login\" },\n\t{ value: \"logout\", label: \"Logout\" },\n];\n\nconst RESOURCE_OPTIONS = [\n\t{ value: \"project\", label: \"Projects\" },\n\t{ value: \"service\", label: \"Applications / Services\" },\n\t{ value: \"environment\", label: \"Environments\" },\n\t{ value: \"deployment\", label: \"Deployments\" },\n\t{ value: \"user\", label: \"Users\" },\n\t{ value: \"customRole\", label: \"Custom Roles\" },\n\t{ value: \"domain\", label: \"Domains\" },\n\t{ value: \"certificate\", label: \"Certificates\" },\n\t{ value: \"registry\", label: \"Registries\" },\n\t{ value: \"server\", label: \"Remote Servers\" },\n\t{ value: \"sshKey\", label: \"SSH Keys\" },\n\t{ value: \"gitProvider\", label: \"Git Providers\" },\n\t{ value: \"notification\", label: \"Notifications\" },\n\t{ value: \"settings\", label: \"Settings\" },\n\t{ value: \"session\", label: \"Sessions (Login/Logout)\" },\n];\n\nconst PAGE_SIZE_OPTIONS = [25, 50, 100, 200];\n\ntype AuditAction =\n\t| \"create\"\n\t| \"update\"\n\t| \"delete\"\n\t| \"deploy\"\n\t| \"cancel\"\n\t| \"redeploy\"\n\t| \"login\"\n\t| \"logout\";\ntype AuditResourceType =\n\t| \"project\"\n\t| \"service\"\n\t| \"environment\"\n\t| \"deployment\"\n\t| \"user\"\n\t| \"customRole\"\n\t| \"domain\"\n\t| \"certificate\"\n\t| \"registry\"\n\t| \"server\"\n\t| \"sshKey\"\n\t| \"gitProvider\"\n\t| \"notification\"\n\t| \"settings\"\n\t| \"session\";\n\nexport interface AuditLogFilters {\n\tuserEmail: string;\n\tresourceName: string;\n\taction: AuditAction | \"\";\n\tresourceType: AuditResourceType | \"\";\n\tdateRange: DateRange | undefined;\n}\n\ninterface DataTableProps {\n\tcolumns: ColumnDef<AuditLog>[];\n\tdata: AuditLog[];\n\ttotal: number;\n\tpageIndex: number;\n\tpageSize: number;\n\tfilters: AuditLogFilters;\n\tonPageChange: (page: number) => void;\n\tonPageSizeChange: (size: number) => void;\n\tonFilterChange: <K extends keyof AuditLogFilters>(\n\t\tkey: K,\n\t\tvalue: AuditLogFilters[K],\n\t) => void;\n\tisLoading?: boolean;\n}\n\nexport function DataTable({\n\tcolumns,\n\tdata,\n\ttotal,\n\tpageIndex,\n\tpageSize,\n\tfilters,\n\tonPageChange,\n\tonPageSizeChange,\n\tonFilterChange,\n\tisLoading,\n}: DataTableProps) {\n\tconst [sorting, setSorting] = React.useState<SortingState>([\n\t\t{ id: \"createdAt\", desc: true },\n\t]);\n\tconst [columnVisibility, setColumnVisibility] =\n\t\tReact.useState<VisibilityState>({});\n\n\tconst table = useReactTable({\n\t\tdata,\n\t\tcolumns,\n\t\tonSortingChange: setSorting,\n\t\tgetCoreRowModel: getCoreRowModel(),\n\t\tgetSortedRowModel: getSortedRowModel(),\n\t\tonColumnVisibilityChange: setColumnVisibility,\n\t\tmanualPagination: true,\n\t\tmanualFiltering: true,\n\t\trowCount: total,\n\t\tstate: {\n\t\t\tsorting,\n\t\t\tcolumnVisibility,\n\t\t},\n\t});\n\n\tconst pageCount = Math.ceil(total / pageSize);\n\tconst hasFilters =\n\t\tfilters.userEmail ||\n\t\tfilters.resourceName ||\n\t\tfilters.action ||\n\t\tfilters.resourceType ||\n\t\tfilters.dateRange;\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4 w-full\">\n\t\t\t<div className=\"flex items-center gap-2 flex-wrap\">\n\t\t\t\t<Input\n\t\t\t\t\tplaceholder=\"Filter by user...\"\n\t\t\t\t\tvalue={filters.userEmail}\n\t\t\t\t\tonChange={(e) => onFilterChange(\"userEmail\", e.target.value)}\n\t\t\t\t\tclassName=\"max-w-xs\"\n\t\t\t\t/>\n\t\t\t\t<Input\n\t\t\t\t\tplaceholder=\"Filter by name...\"\n\t\t\t\t\tvalue={filters.resourceName}\n\t\t\t\t\tonChange={(e) => onFilterChange(\"resourceName\", e.target.value)}\n\t\t\t\t\tclassName=\"max-w-xs\"\n\t\t\t\t/>\n\t\t\t\t<Select\n\t\t\t\t\tvalue={filters.action || \"__all__\"}\n\t\t\t\t\tonValueChange={(value) =>\n\t\t\t\t\t\tonFilterChange(\n\t\t\t\t\t\t\t\"action\",\n\t\t\t\t\t\t\tvalue === \"__all__\" ? \"\" : (value as AuditAction),\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t<SelectTrigger className=\"w-[160px]\">\n\t\t\t\t\t\t<SelectValue placeholder=\"All actions\" />\n\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t<SelectItem value=\"__all__\">All actions</SelectItem>\n\t\t\t\t\t\t{ACTION_OPTIONS.map((opt) => (\n\t\t\t\t\t\t\t<SelectItem key={opt.value} value={opt.value}>\n\t\t\t\t\t\t\t\t{opt.label}\n\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</SelectContent>\n\t\t\t\t</Select>\n\t\t\t\t<Select\n\t\t\t\t\tvalue={filters.resourceType || \"__all__\"}\n\t\t\t\t\tonValueChange={(value) =>\n\t\t\t\t\t\tonFilterChange(\n\t\t\t\t\t\t\t\"resourceType\",\n\t\t\t\t\t\t\tvalue === \"__all__\" ? \"\" : (value as AuditResourceType),\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t<SelectTrigger className=\"w-[200px]\">\n\t\t\t\t\t\t<SelectValue placeholder=\"All resources\" />\n\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t<SelectItem value=\"__all__\">All resources</SelectItem>\n\t\t\t\t\t\t{RESOURCE_OPTIONS.map((opt) => (\n\t\t\t\t\t\t\t<SelectItem key={opt.value} value={opt.value}>\n\t\t\t\t\t\t\t\t{opt.label}\n\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</SelectContent>\n\t\t\t\t</Select>\n\t\t\t\t<Popover>\n\t\t\t\t\t<PopoverTrigger asChild>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\tclassName=\"h-9 gap-1.5 text-sm font-normal\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<CalendarIcon className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t{filters.dateRange?.from ? (\n\t\t\t\t\t\t\t\tfilters.dateRange.to ? (\n\t\t\t\t\t\t\t\t\t`${format(filters.dateRange.from, \"MMM d\")} – ${format(filters.dateRange.to, \"MMM d, yyyy\")}`\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\tformat(filters.dateRange.from, \"MMM d, yyyy\")\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground\">Date range</span>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</PopoverTrigger>\n\t\t\t\t\t<PopoverContent className=\"w-auto p-0\" align=\"start\">\n\t\t\t\t\t\t<Calendar\n\t\t\t\t\t\t\tmode=\"range\"\n\t\t\t\t\t\t\tselected={filters.dateRange}\n\t\t\t\t\t\t\tonSelect={(range) => onFilterChange(\"dateRange\", range)}\n\t\t\t\t\t\t\tnumberOfMonths={2}\n\t\t\t\t\t\t\tinitialFocus\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PopoverContent>\n\t\t\t\t</Popover>\n\t\t\t\t{hasFilters && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tonFilterChange(\"userEmail\", \"\");\n\t\t\t\t\t\t\tonFilterChange(\"resourceName\", \"\");\n\t\t\t\t\t\t\tonFilterChange(\"action\", \"\");\n\t\t\t\t\t\t\tonFilterChange(\"resourceType\", \"\");\n\t\t\t\t\t\t\tonFilterChange(\"dateRange\", undefined);\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tclassName=\"text-muted-foreground\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<X className=\"h-4 w-4 mr-1\" />\n\t\t\t\t\t\tClear\n\t\t\t\t\t</Button>\n\t\t\t\t)}\n\t\t\t\t<DropdownMenu>\n\t\t\t\t\t<DropdownMenuTrigger asChild>\n\t\t\t\t\t\t<Button variant=\"outline\" className=\"ml-auto\">\n\t\t\t\t\t\t\tColumns <ChevronDown className=\"ml-2 h-4 w-4\" />\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</DropdownMenuTrigger>\n\t\t\t\t\t<DropdownMenuContent align=\"end\">\n\t\t\t\t\t\t{table\n\t\t\t\t\t\t\t.getAllColumns()\n\t\t\t\t\t\t\t.filter((col) => col.getCanHide())\n\t\t\t\t\t\t\t.map((col) => (\n\t\t\t\t\t\t\t\t<DropdownMenuCheckboxItem\n\t\t\t\t\t\t\t\t\tkey={col.id}\n\t\t\t\t\t\t\t\t\tclassName=\"capitalize\"\n\t\t\t\t\t\t\t\t\tchecked={col.getIsVisible()}\n\t\t\t\t\t\t\t\t\tonCheckedChange={(value) => col.toggleVisibility(!!value)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{col.id}\n\t\t\t\t\t\t\t\t</DropdownMenuCheckboxItem>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t</DropdownMenuContent>\n\t\t\t\t</DropdownMenu>\n\t\t\t</div>\n\n\t\t\t<div className=\"rounded-md border overflow-auto\">\n\t\t\t\t<Table>\n\t\t\t\t\t<TableHeader>\n\t\t\t\t\t\t{table.getHeaderGroups().map((headerGroup) => (\n\t\t\t\t\t\t\t<TableRow key={headerGroup.id}>\n\t\t\t\t\t\t\t\t{headerGroup.headers.map((header) => (\n\t\t\t\t\t\t\t\t\t<TableHead key={header.id}>\n\t\t\t\t\t\t\t\t\t\t{header.isPlaceholder\n\t\t\t\t\t\t\t\t\t\t\t? null\n\t\t\t\t\t\t\t\t\t\t\t: flexRender(\n\t\t\t\t\t\t\t\t\t\t\t\t\theader.column.columnDef.header,\n\t\t\t\t\t\t\t\t\t\t\t\t\theader.getContext(),\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</TableHead>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</TableHeader>\n\t\t\t\t\t<TableBody>\n\t\t\t\t\t\t{isLoading ? (\n\t\t\t\t\t\t\t<TableRow>\n\t\t\t\t\t\t\t\t<TableCell\n\t\t\t\t\t\t\t\t\tcolSpan={columns.length}\n\t\t\t\t\t\t\t\t\tclassName=\"h-24 text-center text-muted-foreground\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tLoading...\n\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t) : table.getRowModel().rows.length ? (\n\t\t\t\t\t\t\ttable.getRowModel().rows.map((row) => (\n\t\t\t\t\t\t\t\t<TableRow key={row.id}>\n\t\t\t\t\t\t\t\t\t{row.getVisibleCells().map((cell) => (\n\t\t\t\t\t\t\t\t\t\t<TableCell key={cell.id}>\n\t\t\t\t\t\t\t\t\t\t\t{flexRender(\n\t\t\t\t\t\t\t\t\t\t\t\tcell.column.columnDef.cell,\n\t\t\t\t\t\t\t\t\t\t\t\tcell.getContext(),\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t\t))\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<TableRow>\n\t\t\t\t\t\t\t\t<TableCell\n\t\t\t\t\t\t\t\t\tcolSpan={columns.length}\n\t\t\t\t\t\t\t\t\tclassName=\"h-24 text-center text-muted-foreground\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tNo audit logs found.\n\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</TableBody>\n\t\t\t\t</Table>\n\t\t\t</div>\n\n\t\t\t<div className=\"flex items-center justify-between text-sm text-muted-foreground\">\n\t\t\t\t<span>\n\t\t\t\t\t{total} {total === 1 ? \"entry\" : \"entries\"} total\n\t\t\t\t</span>\n\t\t\t\t<div className=\"flex items-center gap-3\">\n\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t<span className=\"text-sm whitespace-nowrap\">Rows per page</span>\n\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\tvalue={String(pageSize)}\n\t\t\t\t\t\t\tonValueChange={(value) => onPageSizeChange(Number(value))}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<SelectTrigger className=\"w-[80px] h-8\">\n\t\t\t\t\t\t\t\t<SelectValue />\n\t\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t{PAGE_SIZE_OPTIONS.map((size) => (\n\t\t\t\t\t\t\t\t\t<SelectItem key={size} value={String(size)}>\n\t\t\t\t\t\t\t\t\t\t{size}\n\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t</Select>\n\t\t\t\t\t</div>\n\t\t\t\t\t<span className=\"whitespace-nowrap\">\n\t\t\t\t\t\tPage {pageIndex + 1} of {Math.max(1, pageCount)}\n\t\t\t\t\t</span>\n\t\t\t\t\t<div className=\"flex gap-2\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\tonClick={() => onPageChange(pageIndex - 1)}\n\t\t\t\t\t\t\tdisabled={pageIndex === 0}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tPrevious\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\tonClick={() => onPageChange(pageIndex + 1)}\n\t\t\t\t\t\t\tdisabled={pageIndex + 1 >= pageCount}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tNext\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"
  },
  {
    "path": "apps/dokploy/components/proprietary/audit-logs/show-audit-logs.tsx",
    "content": "import { ClipboardList } from \"lucide-react\";\nimport React from \"react\";\nimport { EnterpriseFeatureGate } from \"@/components/proprietary/enterprise-feature-gate\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport { api } from \"@/utils/api\";\nimport { columns } from \"./columns\";\nimport { type AuditLogFilters, DataTable } from \"./data-table\";\n\nfunction AuditLogsContent() {\n\tconst [pageIndex, setPageIndex] = React.useState(0);\n\tconst [pageSize, setPageSize] = React.useState(50);\n\tconst [filters, setFilters] = React.useState<AuditLogFilters>({\n\t\tuserEmail: \"\",\n\t\tresourceName: \"\",\n\t\taction: \"\",\n\t\tresourceType: \"\",\n\t\tdateRange: undefined,\n\t});\n\n\tconst [debouncedText, setDebouncedText] = React.useState({\n\t\tuserEmail: \"\",\n\t\tresourceName: \"\",\n\t});\n\n\tReact.useEffect(() => {\n\t\tconst t = setTimeout(() => {\n\t\t\tsetDebouncedText({\n\t\t\t\tuserEmail: filters.userEmail,\n\t\t\t\tresourceName: filters.resourceName,\n\t\t\t});\n\t\t\tsetPageIndex(0);\n\t\t}, 400);\n\t\treturn () => clearTimeout(t);\n\t}, [filters.userEmail, filters.resourceName]);\n\n\tconst handleFilterChange = <K extends keyof AuditLogFilters>(\n\t\tkey: K,\n\t\tvalue: AuditLogFilters[K],\n\t) => {\n\t\tsetFilters((prev) => ({ ...prev, [key]: value }));\n\t\tif (key !== \"userEmail\" && key !== \"resourceName\") {\n\t\t\tsetPageIndex(0);\n\t\t}\n\t};\n\n\tconst handlePageSizeChange = (size: number) => {\n\t\tsetPageSize(size);\n\t\tsetPageIndex(0);\n\t};\n\n\tconst { data, isLoading } = api.auditLog.all.useQuery({\n\t\tuserEmail: debouncedText.userEmail || undefined,\n\t\tresourceName: debouncedText.resourceName || undefined,\n\t\taction: filters.action || undefined,\n\t\tresourceType: filters.resourceType || undefined,\n\t\tfrom: filters.dateRange?.from,\n\t\tto: filters.dateRange?.to,\n\t\tlimit: pageSize,\n\t\toffset: pageIndex * pageSize,\n\t});\n\n\treturn (\n\t\t<DataTable\n\t\t\tcolumns={columns}\n\t\t\tdata={data?.logs ?? []}\n\t\t\ttotal={data?.total ?? 0}\n\t\t\tpageIndex={pageIndex}\n\t\t\tpageSize={pageSize}\n\t\t\tfilters={filters}\n\t\t\tonPageChange={setPageIndex}\n\t\t\tonPageSizeChange={handlePageSizeChange}\n\t\t\tonFilterChange={handleFilterChange}\n\t\t\tisLoading={isLoading}\n\t\t/>\n\t);\n}\n\nexport function ShowAuditLogs() {\n\treturn (\n\t\t<Card className=\"h-full bg-sidebar p-2.5 rounded-xl max-w-6xl w-full mx-auto\">\n\t\t\t<div className=\"rounded-xl bg-background shadow-md \">\n\t\t\t\t<EnterpriseFeatureGate\n\t\t\t\t\tlockedProps={{\n\t\t\t\t\t\ttitle: \"Audit Logs\",\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\"Get full visibility into every action performed across your organization. Audit logs are available as part of Dokploy Enterprise.\",\n\t\t\t\t\t\tctaLabel: \"Manage License\",\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t<CardTitle className=\"text-xl flex flex-row gap-2\">\n\t\t\t\t\t\t\t<ClipboardList className=\"h-5 w-5 text-muted-foreground self-center\" />\n\t\t\t\t\t\t\tAudit Logs\n\t\t\t\t\t\t</CardTitle>\n\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\tTrack all actions performed by members in your organization.\n\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<CardContent className=\"space-y-2 py-8 border-t\">\n\t\t\t\t\t\t<AuditLogsContent />\n\t\t\t\t\t</CardContent>\n\t\t\t\t</EnterpriseFeatureGate>\n\t\t\t</div>\n\t\t</Card>\n\t);\n}\n"
  },
  {
    "path": "apps/dokploy/components/proprietary/auth/sign-in-with-github.tsx",
    "content": "\"use client\";\n\nimport { useState } from \"react\";\nimport { toast } from \"sonner\";\nimport { Button } from \"@/components/ui/button\";\nimport { authClient } from \"@/lib/auth-client\";\n\nexport function SignInWithGithub() {\n\tconst [isLoading, setIsLoading] = useState(false);\n\n\tconst handleClick = async () => {\n\t\tsetIsLoading(true);\n\t\ttry {\n\t\t\tconst { error } = await authClient.signIn.social({\n\t\t\t\tprovider: \"github\",\n\t\t\t});\n\t\t\tif (error) {\n\t\t\t\ttoast.error(error.message);\n\t\t\t\treturn;\n\t\t\t}\n\t\t} catch (err) {\n\t\t\ttoast.error(\"An error occurred while signing in with GitHub\", {\n\t\t\t\tdescription: err instanceof Error ? err.message : \"Unknown error\",\n\t\t\t});\n\t\t} finally {\n\t\t\tsetIsLoading(false);\n\t\t}\n\t};\n\n\treturn (\n\t\t<Button\n\t\t\tvariant=\"outline\"\n\t\t\ttype=\"button\"\n\t\t\tclassName=\"w-full mb-4\"\n\t\t\tonClick={handleClick}\n\t\t\tisLoading={isLoading}\n\t\t>\n\t\t\t<svg viewBox=\"0 0 438.549 438.549\" className=\"mr-2 size-4\">\n\t\t\t\t<path\n\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\td=\"M409.132 114.573c-19.608-33.596-46.205-60.194-79.798-79.8-33.598-19.607-70.277-29.408-110.063-29.408-39.781 0-76.472 9.804-110.063 29.408-33.596 19.605-60.192 46.204-79.8 79.8C9.803 148.168 0 184.854 0 224.63c0 47.78 13.94 90.745 41.827 128.906 27.884 38.164 63.906 64.572 108.063 79.227 5.14.954 8.945.283 11.419-1.996 2.475-2.282 3.711-5.14 3.711-8.562 0-.571-.049-5.708-.144-15.417a2549.81 2549.81 0 01-.144-25.406l-6.567 1.136c-4.187.767-9.469 1.092-15.846 1-6.374-.089-12.991-.757-19.842-1.999-6.854-1.231-13.229-4.086-19.13-8.559-5.898-4.473-10.085-10.328-12.56-17.556l-2.855-6.57c-1.903-4.374-4.899-9.233-8.992-14.559-4.093-5.331-8.232-8.945-12.419-10.848l-1.999-1.431c-1.332-.951-2.568-2.098-3.711-3.429-1.142-1.331-1.997-2.663-2.568-3.997-.572-1.335-.098-2.43 1.427-3.289 1.525-.859 4.281-1.276 8.28-1.276l5.708.853c3.807.763 8.516 3.042 14.133 6.851 5.614 3.806 10.229 8.754 13.846 14.842 4.38 7.806 9.657 13.754 15.846 17.847 6.184 4.093 12.419 6.136 18.699 6.136 6.28 0 11.704-.476 16.274-1.423 4.565-.952 8.848-2.383 12.847-4.285 1.713-12.758 6.377-22.559 13.988-29.41-10.848-1.14-20.601-2.857-29.264-5.14-8.658-2.286-17.605-5.996-26.835-11.14-9.235-5.137-16.896-11.516-22.985-19.126-6.09-7.614-11.088-17.61-14.987-29.979-3.901-12.374-5.852-26.648-5.852-42.826 0-23.035 7.52-42.637 22.557-58.817-7.044-17.318-6.379-36.732 1.997-58.24 5.52-1.715 13.706-.428 24.554 3.853 10.85 4.283 18.794 7.952 23.84 10.994 5.046 3.041 9.089 5.618 12.135 7.708 17.705-4.947 35.976-7.421 54.818-7.421s37.117 2.474 54.823 7.421l10.849-6.849c7.419-4.57 16.18-8.758 26.262-12.565 10.088-3.805 17.802-4.853 23.134-3.138 8.562 21.509 9.325 40.922 2.279 58.24 15.036 16.18 22.559 35.787 22.559 58.817 0 16.178-1.958 30.497-5.853 42.966-3.9 12.471-8.941 22.457-15.125 29.979-6.191 7.521-13.901 13.85-23.131 18.986-9.232 5.14-18.182 8.85-26.84 11.136-8.662 2.286-18.415 4.004-29.263 5.146 9.894 8.562 14.842 22.077 14.842 40.539v60.237c0 3.422 1.19 6.279 3.572 8.562 2.379 2.279 6.136 2.95 11.276 1.995 44.163-14.653 80.185-41.062 108.068-79.226 27.88-38.161 41.825-81.126 41.825-128.906-.01-39.771-9.818-76.454-29.414-110.049z\"\n\t\t\t\t/>\n\t\t\t</svg>\n\t\t\tSign in with GitHub\n\t\t</Button>\n\t);\n}\n"
  },
  {
    "path": "apps/dokploy/components/proprietary/auth/sign-in-with-google.tsx",
    "content": "\"use client\";\n\nimport { useState } from \"react\";\nimport { toast } from \"sonner\";\nimport { Button } from \"@/components/ui/button\";\nimport { authClient } from \"@/lib/auth-client\";\n\nexport function SignInWithGoogle() {\n\tconst [isLoading, setIsLoading] = useState(false);\n\n\tconst handleClick = async () => {\n\t\tsetIsLoading(true);\n\t\ttry {\n\t\t\tconst { error } = await authClient.signIn.social({\n\t\t\t\tprovider: \"google\",\n\t\t\t});\n\t\t\tif (error) {\n\t\t\t\ttoast.error(error.message);\n\t\t\t\treturn;\n\t\t\t}\n\t\t} catch (err) {\n\t\t\ttoast.error(\"An error occurred while signing in with Google\", {\n\t\t\t\tdescription: err instanceof Error ? err.message : \"Unknown error\",\n\t\t\t});\n\t\t} finally {\n\t\t\tsetIsLoading(false);\n\t\t}\n\t};\n\n\treturn (\n\t\t<Button\n\t\t\tvariant=\"outline\"\n\t\t\ttype=\"button\"\n\t\t\tclassName=\"w-full mb-4\"\n\t\t\tonClick={handleClick}\n\t\t\tisLoading={isLoading}\n\t\t>\n\t\t\t<svg viewBox=\"0 0 24 24\" className=\"mr-2 size-4\">\n\t\t\t\t<path\n\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\td=\"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z\"\n\t\t\t\t/>\n\t\t\t\t<path\n\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\td=\"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z\"\n\t\t\t\t/>\n\t\t\t\t<path\n\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\td=\"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z\"\n\t\t\t\t/>\n\t\t\t\t<path\n\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\td=\"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z\"\n\t\t\t\t/>\n\t\t\t</svg>\n\t\t\tSign in with Google\n\t\t</Button>\n\t);\n}\n"
  },
  {
    "path": "apps/dokploy/components/proprietary/enterprise-feature-gate.tsx",
    "content": "\"use client\";\n\nimport { Loader2, Lock } from \"lucide-react\";\nimport Link from \"next/link\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport { api } from \"@/utils/api\";\n\ninterface EnterpriseFeatureLockedProps {\n\t/** Optional title override */\n\ttitle?: string;\n\t/** Optional description override */\n\tdescription?: string;\n\t/** Optional custom CTA label */\n\tctaLabel?: string;\n\t/** Optional CTA href (default: /dashboard/settings/license) */\n\tctaHref?: string;\n\t/** Compact variant (less padding, smaller icon) */\n\tcompact?: boolean;\n}\n\n/**\n * Displays a locked state for enterprise features when the user has no valid license.\n * Use standalone or via EnterpriseFeatureGate.\n */\nexport function EnterpriseFeatureLocked({\n\ttitle = \"Enterprise feature\",\n\tdescription = \"This feature is part of Dokploy Enterprise. Add a valid license to use it.\",\n\tctaLabel = \"Go to License\",\n\tctaHref = \"/dashboard/settings/license\",\n\tcompact = false,\n}: EnterpriseFeatureLockedProps) {\n\treturn (\n\t\t<Card className=\"border-dashed bg-transparent\">\n\t\t\t<CardHeader className={compact ? \"pb-2\" : undefined}>\n\t\t\t\t<div className=\"flex flex-col items-center gap-3 text-center\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={\n\t\t\t\t\t\t\tcompact\n\t\t\t\t\t\t\t\t? \"rounded-full bg-muted p-3\"\n\t\t\t\t\t\t\t\t: \"rounded-full bg-muted p-4\"\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Lock\n\t\t\t\t\t\t\tclassName={\n\t\t\t\t\t\t\t\tcompact\n\t\t\t\t\t\t\t\t\t? \"size-6 text-muted-foreground\"\n\t\t\t\t\t\t\t\t\t: \"size-8 text-muted-foreground\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"space-y-1\">\n\t\t\t\t\t\t<CardTitle className=\"text-lg\">{title}</CardTitle>\n\t\t\t\t\t\t<CardDescription className=\"max-w-sm mx-auto\">\n\t\t\t\t\t\t\t{description}\n\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</CardHeader>\n\t\t\t<CardContent className={compact ? \"pt-0\" : undefined}>\n\t\t\t\t<div className=\"flex justify-center\">\n\t\t\t\t\t<Button asChild variant=\"secondary\" size={compact ? \"sm\" : \"default\"}>\n\t\t\t\t\t\t<Link href={ctaHref}>{ctaLabel}</Link>\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t</CardContent>\n\t\t</Card>\n\t);\n}\n\ninterface EnterpriseFeatureGateProps {\n\tchildren: React.ReactNode;\n\t/** Props for the locked state when license is invalid */\n\tlockedProps?: Omit<EnterpriseFeatureLockedProps, \"compact\">;\n\t/** Show loading spinner while checking license */\n\tfallback?: React.ReactNode;\n}\n\n/**\n * Renders children only when the instance has a valid enterprise license.\n * Otherwise shows EnterpriseFeatureLocked.\n */\nexport function EnterpriseFeatureGate({\n\tchildren,\n\tlockedProps,\n\tfallback,\n}: EnterpriseFeatureGateProps) {\n\tconst { data: haveValidLicense, isPending } =\n\t\tapi.licenseKey.haveValidLicenseKey.useQuery();\n\n\tif (isPending) {\n\t\tif (fallback) return <>{fallback}</>;\n\t\treturn (\n\t\t\t<div className=\"flex items-center gap-2 justify-center min-h-[25vh]\">\n\t\t\t\t<Loader2 className=\"size-6 text-muted-foreground animate-spin\" />\n\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\tChecking license...\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t);\n\t}\n\n\tif (!haveValidLicense) {\n\t\treturn <EnterpriseFeatureLocked {...lockedProps} />;\n\t}\n\n\treturn <>{children}</>;\n}\n"
  },
  {
    "path": "apps/dokploy/components/proprietary/license-keys/license-key.tsx",
    "content": "import { Key, Loader2, ShieldCheck } from \"lucide-react\";\nimport Link from \"next/link\";\nimport { useEffect, useState } from \"react\";\nimport { toast } from \"sonner\";\nimport { DialogAction } from \"@/components/shared/dialog-action\";\nimport { Button } from \"@/components/ui/button\";\nimport { CardTitle } from \"@/components/ui/card\";\nimport { Input } from \"@/components/ui/input\";\nimport { Switch } from \"@/components/ui/switch\";\nimport { api } from \"@/utils/api\";\n\nexport function LicenseKeySettings() {\n\tconst utils = api.useUtils();\n\tconst { data, isPending } = api.licenseKey.getEnterpriseSettings.useQuery();\n\tconst { mutateAsync: updateEnterpriseSettings, isPending: isSaving } =\n\t\tapi.licenseKey.updateEnterpriseSettings.useMutation();\n\tconst { mutateAsync: activateLicenseKey, isPending: isActivating } =\n\t\tapi.licenseKey.activate.useMutation();\n\tconst { mutateAsync: validateLicenseKey, isPending: isValidating } =\n\t\tapi.licenseKey.validate.useMutation();\n\tconst { mutateAsync: deactivateLicenseKey, isPending: isDeactivating } =\n\t\tapi.licenseKey.deactivate.useMutation();\n\tconst { data: haveValidLicenseKey, isPending: isCheckingLicenseKey } =\n\t\tapi.licenseKey.haveValidLicenseKey.useQuery();\n\tconst [licenseKey, setLicenseKey] = useState(\"\");\n\n\tuseEffect(() => {\n\t\tif (data?.licenseKey) {\n\t\t\tsetLicenseKey(data.licenseKey);\n\t\t}\n\t}, [data?.licenseKey]);\n\n\tconst enabled = !!data?.enableEnterpriseFeatures;\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4 rounded-lg border p-4\">\n\t\t\t{isCheckingLicenseKey ? (\n\t\t\t\t<div className=\"flex items-center gap-2 justify-center min-h-[25vh]\">\n\t\t\t\t\t<Loader2 className=\"size-6 text-muted-foreground animate-spin\" />\n\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\tChecking license key...\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t<div className=\"flex items-center justify-between gap-4\">\n\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t<Key className=\"size-6 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t<CardTitle className=\"text-xl\">License Key</CardTitle>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t{enabled && (\n\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t<span className=\"text-xs text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t{enabled ? \"Enabled\" : \"Disabled\"}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\tchecked={enabled}\n\t\t\t\t\t\t\t\t\t\tdisabled={isPending || isSaving || isDeactivating}\n\t\t\t\t\t\t\t\t\t\tonCheckedChange={async (next) => {\n\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\tawait updateEnterpriseSettings({\n\t\t\t\t\t\t\t\t\t\t\t\t\tenableEnterpriseFeatures: next,\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\tawait utils.licenseKey.getEnterpriseSettings.invalidate();\n\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Enterprise features updated\");\n\t\t\t\t\t\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\t\t\t\t\t\tconsole.error(error);\n\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"Failed to update enterprise features\");\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\tTo unlock extra features you need an enterprise license key.\n\t\t\t\t\t\t\tContact us{\" \"}\n\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\thref=\"https://dokploy.com/contact\"\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\trel=\"noreferrer\"\n\t\t\t\t\t\t\t\tclassName=\"underline underline-offset-4\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\there\n\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t.\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t\t{enabled ? (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<div className=\"grid gap-3 md:grid-cols-[1fr_auto] md:items-end\">\n\t\t\t\t\t\t\t\t<div className=\"space-y-2\">\n\t\t\t\t\t\t\t\t\t<label className=\"text-sm font-medium\" htmlFor=\"licenseKey\">\n\t\t\t\t\t\t\t\t\t\tLicense Key\n\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\tid=\"licenseKey\"\n\t\t\t\t\t\t\t\t\t\tplaceholder=\"Enter your enterprise license key\"\n\t\t\t\t\t\t\t\t\t\tvalue={licenseKey}\n\t\t\t\t\t\t\t\t\t\tonChange={(e) => setLicenseKey(e.target.value)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div className=\"md:justify-self-end flex gap-2\">\n\t\t\t\t\t\t\t\t\t{haveValidLicenseKey && (\n\t\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\t\ttitle=\"Deactivate License Key\"\n\t\t\t\t\t\t\t\t\t\t\tdescription=\"Are you sure you want to deactivate this license key? This will disable enterprise features.\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\tawait deactivateLicenseKey();\n\t\t\t\t\t\t\t\t\t\t\t\t\tawait utils.licenseKey.getEnterpriseSettings.invalidate();\n\t\t\t\t\t\t\t\t\t\t\t\t\tawait utils.licenseKey.haveValidLicenseKey.invalidate();\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetLicenseKey(\"\");\n\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"License key deactivated\");\n\t\t\t\t\t\t\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tconsole.error(error);\n\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\terror instanceof Error\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? error.message\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Failed to deactivate license key\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\tdisabled={isDeactivating || !haveValidLicenseKey}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"destructive\"\n\t\t\t\t\t\t\t\t\t\t\t\tdisabled={isDeactivating || !haveValidLicenseKey}\n\t\t\t\t\t\t\t\t\t\t\t\tisLoading={isDeactivating}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\tDeactivate\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t{haveValidLicenseKey && (\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\t\t\t\t\t\tisSaving || isCheckingLicenseKey || isDeactivating\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tisLoading={isValidating}\n\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst valid = await validateLicenseKey();\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (valid) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"License key is valid\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\"License key is invalid\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tconsole.error(error);\n\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\terror instanceof Error\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? error.message\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Failed to validate license key\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\tValidate\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t{!haveValidLicenseKey && (\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\t\t\t\t\t\tisSaving ||\n\t\t\t\t\t\t\t\t\t\t\t\tisValidating ||\n\t\t\t\t\t\t\t\t\t\t\t\tisDeactivating ||\n\t\t\t\t\t\t\t\t\t\t\t\t!licenseKey.trim()\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tisLoading={isActivating}\n\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\tawait activateLicenseKey({ licenseKey });\n\t\t\t\t\t\t\t\t\t\t\t\t\tawait utils.licenseKey.getEnterpriseSettings.invalidate();\n\t\t\t\t\t\t\t\t\t\t\t\t\tawait utils.licenseKey.haveValidLicenseKey.invalidate();\n\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"License key activated\");\n\t\t\t\t\t\t\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tconsole.error(error);\n\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\terror instanceof Error\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? error.message\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Failed to activate license key\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\tActivate\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<div className=\"flex flex-col items-center gap-4 justify-center min-h-[30vh] text-center\">\n\t\t\t\t\t\t\t<div className=\"flex flex-col items-center gap-2 max-w-[400px]\">\n\t\t\t\t\t\t\t\t<div className=\"rounded-full bg-muted p-4\">\n\t\t\t\t\t\t\t\t\t<ShieldCheck className=\"size-8 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div className=\"space-y-1\">\n\t\t\t\t\t\t\t\t\t<h3 className=\"text-lg font-semibold\">Enterprise Features</h3>\n\t\t\t\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\tUnlock advanced capabilities like SSO, Audit logs,\n\t\t\t\t\t\t\t\t\t\twhitelabeling and more.\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\tawait updateEnterpriseSettings({\n\t\t\t\t\t\t\t\t\t\t\tenableEnterpriseFeatures: true,\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\tawait utils.licenseKey.getEnterpriseSettings.invalidate();\n\t\t\t\t\t\t\t\t\t\ttoast.success(\"Enterprise features enabled\");\n\t\t\t\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\t\t\t\tconsole.error(error);\n\t\t\t\t\t\t\t\t\t\ttoast.error(\"Failed to enable enterprise features\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tisLoading={isSaving}\n\t\t\t\t\t\t\t\tdisabled={isPending || isDeactivating}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tEnable Enterprise Features\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n"
  },
  {
    "path": "apps/dokploy/components/proprietary/roles/manage-custom-roles.tsx",
    "content": "import { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport {\n\tLoader2,\n\tPlusIcon,\n\tShieldCheck,\n\tSparkles,\n\tTrashIcon,\n\tUsers,\n} from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { EnterpriseFeatureGate } from \"@/components/proprietary/enterprise-feature-gate\";\nimport { AlertBlock } from \"@/components/shared/alert-block\";\nimport { DialogAction } from \"@/components/shared/dialog-action\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport {\n\tPopover,\n\tPopoverContent,\n\tPopoverTrigger,\n} from \"@/components/ui/popover\";\nimport { Switch } from \"@/components/ui/switch\";\nimport { api } from \"@/utils/api\";\n\n/** Labels and descriptions for each resource */\nconst RESOURCE_META: Record<string, { label: string; description: string }> = {\n\tproject: {\n\t\tlabel: \"Projects\",\n\t\tdescription: \"Manage project creation and deletion\",\n\t},\n\tservice: {\n\t\tlabel: \"Services\",\n\t\tdescription:\n\t\t\t\"Manage services (applications, databases, compose) within projects\",\n\t},\n\tenvironment: {\n\t\tlabel: \"Environments\",\n\t\tdescription: \"Manage environment creation, viewing, and deletion\",\n\t},\n\tdocker: {\n\t\tlabel: \"Docker\",\n\t\tdescription: \"Access to Docker containers, images, and volumes management\",\n\t},\n\tsshKeys: {\n\t\tlabel: \"SSH Keys\",\n\t\tdescription: \"Manage SSH key configurations for servers and repositories\",\n\t},\n\tgitProviders: {\n\t\tlabel: \"Git Providers\",\n\t\tdescription: \"Access to Git providers (GitHub, GitLab, Bitbucket, Gitea)\",\n\t},\n\ttraefikFiles: {\n\t\tlabel: \"Traefik Files\",\n\t\tdescription: \"Access to the Traefik file system configuration\",\n\t},\n\tapi: {\n\t\tlabel: \"API / CLI\",\n\t\tdescription: \"Access to API keys and CLI usage\",\n\t},\n\t// Enterprise-only resources\n\tvolume: {\n\t\tlabel: \"Volumes\",\n\t\tdescription: \"Manage persistent volumes and mounts attached to services\",\n\t},\n\tdeployment: {\n\t\tlabel: \"Deployments\",\n\t\tdescription: \"Trigger, view, and cancel service deployments\",\n\t},\n\tenvVars: {\n\t\tlabel: \"Service Env Vars\",\n\t\tdescription: \"View and edit environment variables of services\",\n\t},\n\tprojectEnvVars: {\n\t\tlabel: \"Project Shared Env Vars\",\n\t\tdescription: \"View and edit shared environment variables at project level\",\n\t},\n\tenvironmentEnvVars: {\n\t\tlabel: \"Environment Shared Env Vars\",\n\t\tdescription:\n\t\t\t\"View and edit shared environment variables at environment level\",\n\t},\n\tserver: {\n\t\tlabel: \"Servers\",\n\t\tdescription: \"Manage remote servers and nodes\",\n\t},\n\tregistry: {\n\t\tlabel: \"Registries\",\n\t\tdescription: \"Manage Docker image registries\",\n\t},\n\tcertificate: {\n\t\tlabel: \"Certificates\",\n\t\tdescription: \"Manage SSL/TLS certificates\",\n\t},\n\tbackup: {\n\t\tlabel: \"Backups\",\n\t\tdescription: \"Manage database backups and restores\",\n\t},\n\tvolumeBackup: {\n\t\tlabel: \"Volume Backups\",\n\t\tdescription: \"Manage Docker volume backups and restores\",\n\t},\n\tschedule: {\n\t\tlabel: \"Schedules\",\n\t\tdescription: \"Manage scheduled jobs (commands, deployments, scripts)\",\n\t},\n\tdomain: {\n\t\tlabel: \"Domains\",\n\t\tdescription: \"Manage custom domains assigned to services\",\n\t},\n\tdestination: {\n\t\tlabel: \"S3 Destinations\",\n\t\tdescription:\n\t\t\t\"Manage S3-compatible backup destinations (AWS, Cloudflare R2, etc.)\",\n\t},\n\tnotification: {\n\t\tlabel: \"Notifications\",\n\t\tdescription:\n\t\t\t\"Manage notification providers (Slack, Discord, Telegram, etc.)\",\n\t},\n\ttag: {\n\t\tlabel: \"Tags\",\n\t\tdescription: \"Manage tags to organize and categorize projects\",\n\t},\n\tmember: {\n\t\tlabel: \"Users\",\n\t\tdescription: \"Manage organization members, invitations, and roles\",\n\t},\n\tlogs: {\n\t\tlabel: \"Logs\",\n\t\tdescription: \"View service and deployment logs\",\n\t},\n\tmonitoring: {\n\t\tlabel: \"Monitoring\",\n\t\tdescription: \"View server and service metrics (CPU, RAM, disk)\",\n\t},\n\tauditLog: {\n\t\tlabel: \"Audit Logs\",\n\t\tdescription: \"View the audit log of actions performed in the organization\",\n\t},\n};\n\n/** Descriptions for each action within a resource */\nconst ACTION_META: Record<\n\tstring,\n\tRecord<string, { label: string; description: string }>\n> = {\n\tproject: {\n\t\tcreate: { label: \"Create\", description: \"Create new projects\" },\n\t\tdelete: {\n\t\t\tlabel: \"Delete\",\n\t\t\tdescription: \"Delete projects and all their content\",\n\t\t},\n\t},\n\tservice: {\n\t\tcreate: {\n\t\t\tlabel: \"Create\",\n\t\t\tdescription: \"Create new services inside projects\",\n\t\t},\n\t\tread: {\n\t\t\tlabel: \"Read\",\n\t\t\tdescription: \"View services, logs, and deployments\",\n\t\t},\n\t\tdelete: {\n\t\t\tlabel: \"Delete\",\n\t\t\tdescription: \"Delete services from projects\",\n\t\t},\n\t},\n\tenvironment: {\n\t\tcreate: {\n\t\t\tlabel: \"Create\",\n\t\t\tdescription: \"Create new environments in projects\",\n\t\t},\n\t\tread: {\n\t\t\tlabel: \"Read\",\n\t\t\tdescription: \"View environments and their services\",\n\t\t},\n\t\tdelete: {\n\t\t\tlabel: \"Delete\",\n\t\t\tdescription: \"Delete environments and their content\",\n\t\t},\n\t},\n\tdocker: {\n\t\tread: {\n\t\t\tlabel: \"Read\",\n\t\t\tdescription: \"View Docker containers, images, networks, and volumes\",\n\t\t},\n\t},\n\tsshKeys: {\n\t\tread: {\n\t\t\tlabel: \"Read\",\n\t\t\tdescription: \"View SSH key configurations\",\n\t\t},\n\t\tcreate: {\n\t\t\tlabel: \"Create\",\n\t\t\tdescription: \"Create and edit SSH keys\",\n\t\t},\n\t\tdelete: {\n\t\t\tlabel: \"Delete\",\n\t\t\tdescription: \"Remove SSH keys\",\n\t\t},\n\t},\n\tgitProviders: {\n\t\tread: {\n\t\t\tlabel: \"Read\",\n\t\t\tdescription: \"View Git provider connections\",\n\t\t},\n\t\tcreate: {\n\t\t\tlabel: \"Create\",\n\t\t\tdescription: \"Create and update Git provider connections\",\n\t\t},\n\t\tdelete: {\n\t\t\tlabel: \"Delete\",\n\t\t\tdescription: \"Remove Git provider connections\",\n\t\t},\n\t},\n\ttraefikFiles: {\n\t\tread: {\n\t\t\tlabel: \"Read\",\n\t\t\tdescription: \"View Traefik configuration files\",\n\t\t},\n\t\twrite: {\n\t\t\tlabel: \"Write\",\n\t\t\tdescription: \"Edit and save Traefik configuration files\",\n\t\t},\n\t},\n\tapi: {\n\t\tread: {\n\t\t\tlabel: \"Read\",\n\t\t\tdescription: \"Create and manage API keys for CLI access\",\n\t\t},\n\t},\n\tvolume: {\n\t\tread: {\n\t\t\tlabel: \"Read\",\n\t\t\tdescription: \"View volumes and mounts attached to services\",\n\t\t},\n\t\tcreate: { label: \"Create\", description: \"Add and edit volumes and mounts\" },\n\t\tdelete: {\n\t\t\tlabel: \"Delete\",\n\t\t\tdescription: \"Remove volumes and mounts from services\",\n\t\t},\n\t},\n\tdeployment: {\n\t\tread: { label: \"Read\", description: \"View deployment history and status\" },\n\t\tcreate: {\n\t\t\tlabel: \"Deploy\",\n\t\t\tdescription: \"Trigger new deployments manually\",\n\t\t},\n\t\tcancel: { label: \"Cancel\", description: \"Cancel running deployments\" },\n\t},\n\tenvVars: {\n\t\tread: { label: \"Read\", description: \"View environment variable values\" },\n\t\twrite: {\n\t\t\tlabel: \"Write\",\n\t\t\tdescription: \"Create, update, and delete environment variables\",\n\t\t},\n\t},\n\tprojectEnvVars: {\n\t\tread: {\n\t\t\tlabel: \"Read\",\n\t\t\tdescription: \"View project-level shared environment variables\",\n\t\t},\n\t\twrite: {\n\t\t\tlabel: \"Write\",\n\t\t\tdescription: \"Edit project-level shared environment variables\",\n\t\t},\n\t},\n\tenvironmentEnvVars: {\n\t\tread: {\n\t\t\tlabel: \"Read\",\n\t\t\tdescription: \"View environment-level shared environment variables\",\n\t\t},\n\t\twrite: {\n\t\t\tlabel: \"Write\",\n\t\t\tdescription: \"Edit environment-level shared environment variables\",\n\t\t},\n\t},\n\tserver: {\n\t\tread: {\n\t\t\tlabel: \"Read\",\n\t\t\tdescription: \"View server list and connection details\",\n\t\t},\n\t\tcreate: { label: \"Create\", description: \"Add new remote servers\" },\n\t\tdelete: {\n\t\t\tlabel: \"Delete\",\n\t\t\tdescription: \"Remove servers from the organization\",\n\t\t},\n\t},\n\tregistry: {\n\t\tread: { label: \"Read\", description: \"View configured Docker registries\" },\n\t\tcreate: { label: \"Create\", description: \"Add new Docker registries\" },\n\t\tdelete: { label: \"Delete\", description: \"Remove Docker registries\" },\n\t},\n\tcertificate: {\n\t\tread: { label: \"Read\", description: \"View SSL/TLS certificates\" },\n\t\tcreate: {\n\t\t\tlabel: \"Create\",\n\t\t\tdescription: \"Issue and configure new certificates\",\n\t\t},\n\t\tdelete: { label: \"Delete\", description: \"Remove certificates\" },\n\t},\n\tbackup: {\n\t\tread: { label: \"Read\", description: \"View backup history and status\" },\n\t\tcreate: { label: \"Create\", description: \"Trigger manual backups\" },\n\t\tdelete: { label: \"Delete\", description: \"Delete backup files\" },\n\t\trestore: {\n\t\t\tlabel: \"Restore\",\n\t\t\tdescription: \"Restore a database from a backup\",\n\t\t},\n\t},\n\tvolumeBackup: {\n\t\tread: {\n\t\t\tlabel: \"Read\",\n\t\t\tdescription: \"View volume backup history and status\",\n\t\t},\n\t\tcreate: {\n\t\t\tlabel: \"Create\",\n\t\t\tdescription: \"Create and trigger volume backups\",\n\t\t},\n\t\tupdate: {\n\t\t\tlabel: \"Update\",\n\t\t\tdescription: \"Update volume backup configuration\",\n\t\t},\n\t\tdelete: { label: \"Delete\", description: \"Delete volume backup files\" },\n\t\trestore: {\n\t\t\tlabel: \"Restore\",\n\t\t\tdescription: \"Restore a Docker volume from a backup\",\n\t\t},\n\t},\n\tschedule: {\n\t\tread: {\n\t\t\tlabel: \"Read\",\n\t\t\tdescription: \"View scheduled jobs and their history\",\n\t\t},\n\t\tcreate: { label: \"Create\", description: \"Create and run scheduled jobs\" },\n\t\tupdate: {\n\t\t\tlabel: \"Update\",\n\t\t\tdescription: \"Update scheduled job configuration\",\n\t\t},\n\t\tdelete: { label: \"Delete\", description: \"Delete scheduled jobs\" },\n\t},\n\tdomain: {\n\t\tread: { label: \"Read\", description: \"View domains assigned to services\" },\n\t\tcreate: { label: \"Create\", description: \"Assign new domains to services\" },\n\t\tdelete: { label: \"Delete\", description: \"Remove domains from services\" },\n\t},\n\tdestination: {\n\t\tread: { label: \"Read\", description: \"View S3 backup destinations\" },\n\t\tcreate: { label: \"Create\", description: \"Add and edit S3 destinations\" },\n\t\tdelete: { label: \"Delete\", description: \"Remove S3 destinations\" },\n\t},\n\tnotification: {\n\t\tread: { label: \"Read\", description: \"View notification providers\" },\n\t\tcreate: {\n\t\t\tlabel: \"Create\",\n\t\t\tdescription: \"Add and edit notification providers\",\n\t\t},\n\t\tdelete: { label: \"Delete\", description: \"Remove notification providers\" },\n\t},\n\ttag: {\n\t\tread: { label: \"Read\", description: \"View tags\" },\n\t\tcreate: { label: \"Create\", description: \"Create new tags\" },\n\t\tupdate: { label: \"Update\", description: \"Edit existing tags\" },\n\t\tdelete: { label: \"Delete\", description: \"Delete tags\" },\n\t},\n\tmember: {\n\t\tread: {\n\t\t\tlabel: \"Read\",\n\t\t\tdescription: \"View the list of organization members\",\n\t\t},\n\t\tcreate: {\n\t\t\tlabel: \"Create\",\n\t\t\tdescription: \"Invite new members to the organization\",\n\t\t},\n\t\tupdate: {\n\t\t\tlabel: \"Update\",\n\t\t\tdescription: \"Change member roles and permissions\",\n\t\t},\n\t\tdelete: {\n\t\t\tlabel: \"Delete\",\n\t\t\tdescription: \"Remove members from the organization\",\n\t\t},\n\t},\n\tlogs: {\n\t\tread: { label: \"Read\", description: \"View real-time and historical logs\" },\n\t},\n\tmonitoring: {\n\t\tread: {\n\t\t\tlabel: \"Read\",\n\t\t\tdescription: \"View CPU, RAM, disk, and network metrics\",\n\t\t},\n\t},\n\tauditLog: {\n\t\tread: { label: \"Read\", description: \"View the audit log history\" },\n\t},\n};\n\n/** Resources that should be hidden from the custom role editor (better-auth internals) */\nconst HIDDEN_RESOURCES = [\"organization\", \"invitation\", \"team\", \"ac\"];\n\n/** Predefined role presets with sensible permission defaults */\nconst ROLE_PRESETS: {\n\tname: string;\n\tlabel: string;\n\tdescription: string;\n\tpermissions: Record<string, string[]>;\n}[] = [\n\t{\n\t\tname: \"viewer\",\n\t\tlabel: \"Viewer\",\n\t\tdescription: \"Read-only access across all resources\",\n\t\tpermissions: {\n\t\t\tservice: [\"read\"],\n\t\t\tenvironment: [\"read\"],\n\t\t\tdocker: [\"read\"],\n\t\t\tsshKeys: [\"read\"],\n\t\t\tgitProviders: [\"read\"],\n\t\t\ttraefikFiles: [\"read\"],\n\t\t\tapi: [\"read\"],\n\t\t\tvolume: [\"read\"],\n\t\t\tdeployment: [\"read\"],\n\t\t\tenvVars: [\"read\"],\n\t\t\tprojectEnvVars: [\"read\"],\n\t\t\tenvironmentEnvVars: [\"read\"],\n\t\t\tserver: [\"read\"],\n\t\t\tregistry: [\"read\"],\n\t\t\tcertificate: [\"read\"],\n\t\t\tbackup: [\"read\"],\n\t\t\tvolumeBackup: [\"read\"],\n\t\t\tschedule: [\"read\"],\n\t\t\tdomain: [\"read\"],\n\t\t\tdestination: [\"read\"],\n\t\t\tnotification: [\"read\"],\n\t\t\ttag: [\"read\"],\n\t\t\tmember: [\"read\"],\n\t\t\tlogs: [\"read\"],\n\t\t\tmonitoring: [\"read\"],\n\t\t\tauditLog: [\"read\"],\n\t\t},\n\t},\n\t{\n\t\tname: \"developer\",\n\t\tlabel: \"Developer\",\n\t\tdescription: \"Deploy services, manage env vars, domains, and view logs\",\n\t\tpermissions: {\n\t\t\tproject: [\"create\"],\n\t\t\tservice: [\"create\", \"read\"],\n\t\t\tenvironment: [\"create\", \"read\"],\n\t\t\tdocker: [\"read\"],\n\t\t\tgitProviders: [\"read\"],\n\t\t\tapi: [\"read\"],\n\t\t\tvolume: [\"read\", \"create\", \"delete\"],\n\t\t\tdeployment: [\"read\", \"create\", \"cancel\"],\n\t\t\tenvVars: [\"read\", \"write\"],\n\t\t\tprojectEnvVars: [\"read\"],\n\t\t\tenvironmentEnvVars: [\"read\"],\n\t\t\tdomain: [\"read\", \"create\", \"delete\"],\n\t\t\tschedule: [\"read\", \"create\", \"update\", \"delete\"],\n\t\t\tlogs: [\"read\"],\n\t\t\tmonitoring: [\"read\"],\n\t\t},\n\t},\n\t{\n\t\tname: \"deployer\",\n\t\tlabel: \"Deployer\",\n\t\tdescription: \"Trigger and manage deployments only\",\n\t\tpermissions: {\n\t\t\tservice: [\"read\"],\n\t\t\tenvironment: [\"read\"],\n\t\t\tdeployment: [\"read\", \"create\", \"cancel\"],\n\t\t\tlogs: [\"read\"],\n\t\t\tmonitoring: [\"read\"],\n\t\t},\n\t},\n\t{\n\t\tname: \"devops\",\n\t\tlabel: \"DevOps\",\n\t\tdescription:\n\t\t\t\"Full infrastructure access: servers, registries, certs, backups, and deployments\",\n\t\tpermissions: {\n\t\t\tproject: [\"create\", \"delete\"],\n\t\t\tservice: [\"create\", \"read\", \"delete\"],\n\t\t\tenvironment: [\"create\", \"read\", \"delete\"],\n\t\t\tdocker: [\"read\"],\n\t\t\tsshKeys: [\"read\", \"create\", \"delete\"],\n\t\t\tgitProviders: [\"read\", \"create\", \"delete\"],\n\t\t\ttraefikFiles: [\"read\", \"write\"],\n\t\t\tapi: [\"read\"],\n\t\t\tvolume: [\"read\", \"create\", \"delete\"],\n\t\t\tdeployment: [\"read\", \"create\", \"cancel\"],\n\t\t\tenvVars: [\"read\", \"write\"],\n\t\t\tprojectEnvVars: [\"read\", \"write\"],\n\t\t\tenvironmentEnvVars: [\"read\", \"write\"],\n\t\t\tserver: [\"read\", \"create\", \"delete\"],\n\t\t\tregistry: [\"read\", \"create\", \"delete\"],\n\t\t\tcertificate: [\"read\", \"create\", \"delete\"],\n\t\t\tbackup: [\"read\", \"create\", \"delete\", \"restore\"],\n\t\t\tvolumeBackup: [\"read\", \"create\", \"update\", \"delete\", \"restore\"],\n\t\t\tschedule: [\"read\", \"create\", \"update\", \"delete\"],\n\t\t\tdomain: [\"read\", \"create\", \"delete\"],\n\t\t\tdestination: [\"read\", \"create\", \"delete\"],\n\t\t\tnotification: [\"read\", \"create\", \"delete\"],\n\t\t\ttag: [\"read\", \"create\", \"update\", \"delete\"],\n\t\t\tlogs: [\"read\"],\n\t\t\tmonitoring: [\"read\"],\n\t\t\tauditLog: [\"read\"],\n\t\t},\n\t},\n];\n\nconst createRoleSchema = z.object({\n\troleName: z\n\t\t.string()\n\t\t.min(1, \"Role name is required\")\n\t\t.max(50, \"Role name must be 50 characters or less\")\n\t\t.regex(\n\t\t\t/^[a-zA-Z0-9_-]+$/,\n\t\t\t\"Only letters, numbers, hyphens, and underscores allowed\",\n\t\t),\n});\n\ntype CreateRoleSchema = z.infer<typeof createRoleSchema>;\n\nexport const ManageCustomRoles = () => {\n\treturn (\n\t\t<Card className=\"h-full bg-sidebar p-2.5 rounded-xl max-w-5xl mx-auto w-full\">\n\t\t\t<div className=\"rounded-xl bg-background shadow-md\">\n\t\t\t\t<CardHeader>\n\t\t\t\t\t<CardTitle className=\"text-xl flex flex-row gap-2\">\n\t\t\t\t\t\t<ShieldCheck className=\"size-6 text-muted-foreground self-center\" />\n\t\t\t\t\t\tCustom Roles\n\t\t\t\t\t</CardTitle>\n\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\tCreate and manage custom roles with fine-grained permissions\n\t\t\t\t\t</CardDescription>\n\t\t\t\t</CardHeader>\n\t\t\t\t<CardContent className=\"border-t pt-6\">\n\t\t\t\t\t<EnterpriseFeatureGate\n\t\t\t\t\t\tlockedProps={{\n\t\t\t\t\t\t\ttitle: \"Custom Roles\",\n\t\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\t\"Custom roles with fine-grained permissions are part of Dokploy Enterprise. Add a valid license to create and assign custom roles.\",\n\t\t\t\t\t\t\tctaLabel: \"Go to License\",\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<CustomRolesContent />\n\t\t\t\t\t</EnterpriseFeatureGate>\n\t\t\t\t</CardContent>\n\t\t\t</div>\n\t\t</Card>\n\t);\n};\n\ninterface HandleCustomRoleProps {\n\troleName?: string;\n\tinitialPermissions?: Record<string, string[]>;\n\tonSuccess: () => void;\n}\n\nfunction HandleCustomRole({\n\troleName,\n\tinitialPermissions,\n\tonSuccess,\n}: HandleCustomRoleProps) {\n\tconst [open, setOpen] = useState(false);\n\tconst [permissions, setPermissions] = useState<Record<string, string[]>>({});\n\tconst { data: statements } = api.customRole.getStatements.useQuery();\n\tconst isEdit = !!roleName;\n\n\tconst form = useForm<CreateRoleSchema>({\n\t\tdefaultValues: { roleName: \"\" },\n\t\tresolver: zodResolver(createRoleSchema),\n\t});\n\n\tuseEffect(() => {\n\t\tif (open) {\n\t\t\tsetPermissions(initialPermissions ? { ...initialPermissions } : {});\n\t\t\tform.reset({ roleName: isEdit ? (roleName ?? \"\") : \"\" });\n\t\t}\n\t}, [open]);\n\n\tconst { mutateAsync: createRole, isPending: isCreating } =\n\t\tapi.customRole.create.useMutation();\n\tconst { mutateAsync: updateRole, isPending: isUpdating } =\n\t\tapi.customRole.update.useMutation();\n\n\tconst visibleResources = statements\n\t\t? Object.entries(statements).filter(\n\t\t\t\t([key]) => !HIDDEN_RESOURCES.includes(key),\n\t\t\t)\n\t\t: [];\n\n\tconst togglePermission = (resource: string, action: string) => {\n\t\tsetPermissions((prev) => {\n\t\t\tconst current = prev[resource] || [];\n\t\t\tconst has = current.includes(action);\n\t\t\treturn {\n\t\t\t\t...prev,\n\t\t\t\t[resource]: has\n\t\t\t\t\t? current.filter((a) => a !== action)\n\t\t\t\t\t: [...current, action],\n\t\t\t};\n\t\t});\n\t};\n\n\tconst handleSubmit = async (data: CreateRoleSchema) => {\n\t\ttry {\n\t\t\tif (isEdit) {\n\t\t\t\tconst newName = data.roleName !== roleName ? data.roleName : undefined;\n\t\t\t\tawait updateRole({\n\t\t\t\t\troleName: roleName!,\n\t\t\t\t\tnewRoleName: newName,\n\t\t\t\t\tpermissions,\n\t\t\t\t});\n\t\t\t\ttoast.success(`Role \"${newName ?? roleName}\" updated`);\n\t\t\t} else {\n\t\t\t\tawait createRole({ roleName: data.roleName, permissions });\n\t\t\t\ttoast.success(`Role \"${data.roleName}\" created`);\n\t\t\t}\n\t\t\tif (!isEdit) {\n\t\t\t\tsetOpen(false);\n\t\t\t}\n\t\t\tonSuccess();\n\t\t} catch (error) {\n\t\t\tlet message = `Error ${isEdit ? \"updating\" : \"creating\"} role`;\n\t\t\tif (error instanceof Error) {\n\t\t\t\ttry {\n\t\t\t\t\tconst parsed = JSON.parse(error.message);\n\t\t\t\t\tif (Array.isArray(parsed) && parsed[0]?.message) {\n\t\t\t\t\t\tmessage = parsed[0].message;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmessage = error.message;\n\t\t\t\t\t}\n\t\t\t\t} catch {\n\t\t\t\t\tmessage = error.message;\n\t\t\t\t}\n\t\t\t}\n\t\t\ttoast.error(message);\n\t\t}\n\t};\n\n\treturn (\n\t\t<Dialog open={open} onOpenChange={setOpen}>\n\t\t\t<DialogTrigger asChild>\n\t\t\t\t{isEdit ? (\n\t\t\t\t\t<Button variant=\"outline\" size=\"sm\" className=\"h-7 text-xs\">\n\t\t\t\t\t\tEdit\n\t\t\t\t\t</Button>\n\t\t\t\t) : (\n\t\t\t\t\t<Button size=\"sm\">\n\t\t\t\t\t\t<PlusIcon className=\"size-4 mr-1\" />\n\t\t\t\t\t\tCreate Role\n\t\t\t\t\t</Button>\n\t\t\t\t)}\n\t\t\t</DialogTrigger>\n\t\t\t<DialogContent className=\"max-h-[85vh] sm:max-w-5xl overflow-y-auto space-y-2\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>\n\t\t\t\t\t\t{isEdit ? \"Edit Role\" : \"Create Custom Role\"}\n\t\t\t\t\t</DialogTitle>\n\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\t{isEdit\n\t\t\t\t\t\t\t? \"Update permissions for this role\"\n\t\t\t\t\t\t\t: \"Define a new role with specific permissions\"}\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tid=\"handle-role-form\"\n\t\t\t\t\t\tonSubmit={form.handleSubmit(handleSubmit)}\n\t\t\t\t\t\tclassName=\"space-y-4\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"roleName\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Role Name</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"e.g. developer, viewer, deployer\"\n\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</form>\n\t\t\t\t</Form>\n\t\t\t\t{!isEdit && (\n\t\t\t\t\t<div className=\"space-y-2 mt-4\">\n\t\t\t\t\t\t<p className=\"text-sm font-medium flex items-center gap-1.5\">\n\t\t\t\t\t\t\t<Sparkles className=\"size-3.5 text-muted-foreground\" />\n\t\t\t\t\t\t\tStart from a preset\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<div className=\"grid grid-cols-2 sm:grid-cols-4 gap-2\">\n\t\t\t\t\t\t\t{ROLE_PRESETS.map((preset) => (\n\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\tkey={preset.name}\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\tclassName=\"rounded-lg border p-3 text-left hover:bg-muted/50 transition-colors cursor-pointer space-y-1\"\n\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\tform.setValue(\"roleName\", preset.name);\n\t\t\t\t\t\t\t\t\t\tsetPermissions({ ...preset.permissions });\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<p className=\"text-sm font-medium\">{preset.label}</p>\n\t\t\t\t\t\t\t\t\t<p className=\"text-xs text-muted-foreground leading-snug\">\n\t\t\t\t\t\t\t\t\t\t{preset.description}\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t<PermissionEditor\n\t\t\t\t\tresources={visibleResources}\n\t\t\t\t\tpermissions={permissions}\n\t\t\t\t\tonToggle={togglePermission}\n\t\t\t\t/>\n\t\t\t\t<DialogFooter>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tisLoading={isEdit ? isUpdating : isCreating}\n\t\t\t\t\t\tform=\"handle-role-form\"\n\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{isEdit ? \"Save Changes\" : \"Create Role\"}\n\t\t\t\t\t</Button>\n\t\t\t\t</DialogFooter>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n}\n\nconst CustomRolesContent = () => {\n\tconst {\n\t\tdata: customRoles,\n\t\tisPending,\n\t\trefetch,\n\t} = api.customRole.all.useQuery();\n\tconst { mutateAsync: deleteRole } = api.customRole.remove.useMutation();\n\n\tconst handleDelete = async (roleName: string) => {\n\t\ttry {\n\t\t\tawait deleteRole({ roleName });\n\t\t\ttoast.success(`Role \"${roleName}\" deleted`);\n\t\t\trefetch();\n\t\t} catch (error) {\n\t\t\tlet message = \"Error deleting role\";\n\t\t\tif (error instanceof Error) {\n\t\t\t\ttry {\n\t\t\t\t\tconst parsed = JSON.parse(error.message);\n\t\t\t\t\tmessage =\n\t\t\t\t\t\tArray.isArray(parsed) && parsed[0]?.message\n\t\t\t\t\t\t\t? parsed[0].message\n\t\t\t\t\t\t\t: error.message;\n\t\t\t\t} catch {\n\t\t\t\t\tmessage = error.message;\n\t\t\t\t}\n\t\t\t}\n\t\t\ttoast.error(message);\n\t\t}\n\t};\n\n\tif (isPending) {\n\t\treturn (\n\t\t\t<div className=\"flex flex-row gap-2 items-center justify-center text-sm text-muted-foreground min-h-[15vh]\">\n\t\t\t\t<span>Loading...</span>\n\t\t\t\t<Loader2 className=\"animate-spin size-4\" />\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div className=\"space-y-4\">\n\t\t\t<div className=\"flex justify-end\">\n\t\t\t\t<HandleCustomRole onSuccess={refetch} />\n\t\t\t</div>\n\n\t\t\t{customRoles?.length === 0 ? (\n\t\t\t\t<div className=\"flex flex-col items-center gap-3 min-h-[15vh] justify-center text-center py-8\">\n\t\t\t\t\t<div className=\"rounded-full bg-muted p-4\">\n\t\t\t\t\t\t<ShieldCheck className=\"size-7 text-muted-foreground\" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"space-y-1\">\n\t\t\t\t\t\t<p className=\"text-sm font-medium\">No custom roles yet</p>\n\t\t\t\t\t\t<p className=\"text-xs text-muted-foreground\">\n\t\t\t\t\t\t\tCreate a role to define fine-grained access for your team members.\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t) : (\n\t\t\t\t<div className=\"grid gap-3\">\n\t\t\t\t\t{customRoles?.map((role) => {\n\t\t\t\t\t\tconst totalPermissions = Object.values(role.permissions).flat()\n\t\t\t\t\t\t\t.length;\n\t\t\t\t\t\tconst enabledResources = Object.entries(role.permissions).filter(\n\t\t\t\t\t\t\t([, actions]) => (actions as string[]).length > 0,\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tkey={role.role}\n\t\t\t\t\t\t\t\tclassName=\"rounded-lg border bg-muted/20 p-4 space-y-3\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div className=\"flex items-start justify-between gap-2\">\n\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2.5 min-w-0\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"rounded-md bg-primary/10 p-1.5 shrink-0\">\n\t\t\t\t\t\t\t\t\t\t\t<ShieldCheck className=\"size-4 text-primary\" />\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div className=\"min-w-0\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"font-semibold text-sm truncate\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{role.role}\n\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t{role.memberCount > 0 && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<MembersBadge\n\t\t\t\t\t\t\t\t\t\t\t\t\t\troleName={role.role}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcount={role.memberCount}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-xs text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t{enabledResources.length} resource\n\t\t\t\t\t\t\t\t\t\t\t\t{enabledResources.length !== 1 ? \"s\" : \"\"} ·{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t{totalPermissions} permission\n\t\t\t\t\t\t\t\t\t\t\t\t{totalPermissions !== 1 ? \"s\" : \"\"}\n\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-1.5 shrink-0\">\n\t\t\t\t\t\t\t\t\t\t<HandleCustomRole\n\t\t\t\t\t\t\t\t\t\t\troleName={role.role}\n\t\t\t\t\t\t\t\t\t\t\tinitialPermissions={role.permissions}\n\t\t\t\t\t\t\t\t\t\t\tonSuccess={refetch}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\t\ttitle=\"Delete Role\"\n\t\t\t\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{role.memberCount > 0 && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<AlertBlock type=\"error\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<strong>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{role.memberCount} member\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{role.memberCount !== 1 ? \"s are\" : \" is\"}{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcurrently assigned\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</strong>{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tto this role. Reassign them before deleting.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</AlertBlock>\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tAre you sure you want to delete the{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<strong>\"{role.role}\"</strong> role? This action\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcannot be undone.\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tdisabled={role.memberCount > 0}\n\t\t\t\t\t\t\t\t\t\t\ttype=\"destructive\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={() => handleDelete(role.role)}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<Button variant=\"ghost\" size=\"icon\" className=\"h-7 w-7\">\n\t\t\t\t\t\t\t\t\t\t\t\t<TrashIcon className=\"size-3.5 text-red-500\" />\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t{enabledResources.length > 0 && (\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-wrap gap-1.5 pt-1 border-t\">\n\t\t\t\t\t\t\t\t\t\t{enabledResources.map(([resource, actions]) => (\n\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\tkey={resource}\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1 rounded-md bg-background border px-2 py-1\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-xs font-medium text-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{RESOURCE_META[resource]?.label || resource}\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground text-xs\">·</span>\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-xs text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{(actions as string[])\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.map((a) => ACTION_META[resource]?.[a]?.label || a)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.join(\", \")}\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n\nfunction MembersBadge({\n\troleName,\n\tcount,\n}: {\n\troleName: string;\n\tcount: number;\n}) {\n\tconst [open, setOpen] = useState(false);\n\tconst { data: members, isLoading } = api.customRole.membersByRole.useQuery(\n\t\t{ roleName },\n\t\t{ enabled: open },\n\t);\n\treturn (\n\t\t<Popover open={open} onOpenChange={setOpen}>\n\t\t\t<PopoverTrigger asChild>\n\t\t\t\t<button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tclassName=\"inline-flex items-center gap-1 rounded-full bg-muted px-2 py-0.5 text-xs text-muted-foreground hover:bg-muted/80 transition-colors cursor-pointer\"\n\t\t\t\t>\n\t\t\t\t\t<Users className=\"size-3\" />\n\t\t\t\t\t{count}\n\t\t\t\t</button>\n\t\t\t</PopoverTrigger>\n\t\t\t<PopoverContent className=\"w-64 p-2\" align=\"start\">\n\t\t\t\t<p className=\"text-xs font-medium text-muted-foreground mb-2 px-1\">\n\t\t\t\t\tAssigned members\n\t\t\t\t</p>\n\t\t\t\t{isLoading ? (\n\t\t\t\t\t<div className=\"flex items-center justify-center py-4\">\n\t\t\t\t\t\t<Loader2 className=\"size-4 animate-spin text-muted-foreground\" />\n\t\t\t\t\t</div>\n\t\t\t\t) : members && members.length > 0 ? (\n\t\t\t\t\t<ul className=\"space-y-1\">\n\t\t\t\t\t\t{members.map((m) => (\n\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\tkey={m.id}\n\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-2 rounded-md px-2 py-1.5 hover:bg-muted/50\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div className=\"flex size-6 shrink-0 items-center justify-center rounded-full bg-primary/10 text-xs font-semibold text-primary\">\n\t\t\t\t\t\t\t\t\t{(m.firstName?.[0] || m.email?.[0] || \"?\").toUpperCase()}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div className=\"min-w-0\">\n\t\t\t\t\t\t\t\t\t{(m.firstName || m.lastName) && (\n\t\t\t\t\t\t\t\t\t\t<p className=\"text-xs font-medium truncate\">\n\t\t\t\t\t\t\t\t\t\t\t{[m.firstName, m.lastName].filter(Boolean).join(\" \")}\n\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t<p className=\"text-xs text-muted-foreground truncate\">\n\t\t\t\t\t\t\t\t\t\t{m.email}\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</ul>\n\t\t\t\t) : (\n\t\t\t\t\t<p className=\"text-xs text-muted-foreground px-1 py-2\">\n\t\t\t\t\t\tNo members found.\n\t\t\t\t\t</p>\n\t\t\t\t)}\n\t\t\t</PopoverContent>\n\t\t</Popover>\n\t);\n}\n\n/** Reusable permission toggle grid with descriptions */\nfunction PermissionEditor({\n\tresources,\n\tpermissions,\n\tonToggle,\n}: {\n\tresources: [string, readonly string[]][];\n\tpermissions: Record<string, string[]>;\n\tonToggle: (resource: string, action: string) => void;\n}) {\n\treturn (\n\t\t<div className=\"space-y-3 mt-4\">\n\t\t\t<p className=\"text-sm font-medium\">Permissions</p>\n\t\t\t<div className=\"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3\">\n\t\t\t\t{resources.map(([resource, actions]) => {\n\t\t\t\t\tconst meta = RESOURCE_META[resource];\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<div key={resource} className=\"rounded-lg border p-3 space-y-3\">\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<p className=\"text-sm font-medium\">{meta?.label || resource}</p>\n\t\t\t\t\t\t\t\t{meta?.description && (\n\t\t\t\t\t\t\t\t\t<p className=\"text-xs text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t{meta.description}\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t{actions.map((action) => {\n\t\t\t\t\t\t\t\t\tconst actionMeta = ACTION_META[resource]?.[action];\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tkey={action}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-3 cursor-pointer rounded-md border p-2 hover:bg-muted/50 transition-colors\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={() => onToggle(resource, action)}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\t\tchecked={\n\t\t\t\t\t\t\t\t\t\t\t\t\tpermissions[resource]?.includes(action) ?? false\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={() => onToggle(resource, action)}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-xs font-medium\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{actionMeta?.label || action}\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"
  },
  {
    "path": "apps/dokploy/components/proprietary/sso/register-oidc-dialog.tsx",
    "content": "\"use client\";\n\nimport { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { Plus, Trash2 } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport type { FieldArrayPath } from \"react-hook-form\";\nimport { useFieldArray, useForm, useWatch } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { api } from \"@/utils/api\";\nimport { useUrl } from \"@/utils/hooks/use-url\";\n\nconst DEFAULT_SCOPES = [\"openid\", \"email\", \"profile\"];\n\nconst domainsArraySchema = z\n\t.array(z.string().trim())\n\t.superRefine((arr, ctx) => {\n\t\tconst filled = arr.filter((s) => s.length > 0);\n\t\tif (filled.length < 1) {\n\t\t\tctx.addIssue({\n\t\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\t\tmessage: \"At least one domain is required\",\n\t\t\t\tpath: [],\n\t\t\t});\n\t\t}\n\t});\n\nconst scopesArraySchema = z.array(z.string().trim());\n\nconst oidcProviderSchema = z.object({\n\tproviderId: z.string().min(1, \"Provider ID is required\").trim(),\n\tissuer: z.string().min(1, \"Issuer URL is required\").url(\"Invalid URL\").trim(),\n\tdomains: domainsArraySchema,\n\tclientId: z.string().min(1, \"Client ID is required\").trim(),\n\tclientSecret: z.string().min(1, \"Client secret is required\"),\n\tscopes: scopesArraySchema,\n});\n\ntype OidcProviderForm = z.infer<typeof oidcProviderSchema>;\n\ninterface RegisterOidcDialogProps {\n\tproviderId?: string;\n\tchildren: React.ReactNode;\n}\n\nconst formDefaultValues = {\n\tproviderId: \"\",\n\tissuer: \"\",\n\tdomains: [\"\"],\n\tclientId: \"\",\n\tclientSecret: \"\",\n\tscopes: [...DEFAULT_SCOPES],\n};\n\nfunction parseOidcConfig(oidcConfig: string | null): {\n\tclientId?: string;\n\tclientSecret?: string;\n\tscopes?: string[];\n} | null {\n\tif (!oidcConfig) return null;\n\ttry {\n\t\tconst parsed = JSON.parse(oidcConfig) as {\n\t\t\tclientId?: string;\n\t\t\tclientSecret?: string;\n\t\t\tscopes?: string[];\n\t\t};\n\t\treturn {\n\t\t\tclientId: parsed.clientId,\n\t\t\tclientSecret: parsed.clientSecret,\n\t\t\tscopes: Array.isArray(parsed.scopes) ? parsed.scopes : undefined,\n\t\t};\n\t} catch {\n\t\treturn null;\n\t}\n}\n\nexport function RegisterOidcDialog({\n\tproviderId,\n\tchildren,\n}: RegisterOidcDialogProps) {\n\tconst utils = api.useUtils();\n\tconst [open, setOpen] = useState(false);\n\n\tconst { data } = api.sso.one.useQuery(\n\t\t{ providerId: providerId ?? \"\" },\n\t\t{ enabled: !!providerId && open },\n\t);\n\tconst registerMutation = api.sso.register.useMutation();\n\tconst updateMutation = api.sso.update.useMutation();\n\n\tconst isEdit = !!providerId;\n\tconst mutateAsync = isEdit\n\t\t? updateMutation.mutateAsync\n\t\t: registerMutation.mutateAsync;\n\tconst isLoading = isEdit\n\t\t? updateMutation.isPending\n\t\t: registerMutation.isPending;\n\n\tconst form = useForm<OidcProviderForm>({\n\t\tresolver: zodResolver(oidcProviderSchema),\n\t\tdefaultValues: formDefaultValues,\n\t});\n\n\tconst watchedProviderId = useWatch({\n\t\tcontrol: form.control,\n\t\tname: \"providerId\",\n\t\tdefaultValue: \"\",\n\t});\n\n\tconst baseURL = useUrl();\n\n\tuseEffect(() => {\n\t\tif (!data || !open) return;\n\t\tconst domains = data.domain\n\t\t\t? data.domain\n\t\t\t\t\t.split(\",\")\n\t\t\t\t\t.map((d) => d.trim())\n\t\t\t\t\t.filter(Boolean)\n\t\t\t: [\"\"];\n\t\tif (domains.length === 0) domains.push(\"\");\n\t\tconst oidc = parseOidcConfig(data.oidcConfig);\n\t\tform.reset({\n\t\t\tproviderId: data.providerId,\n\t\t\tissuer: data.issuer,\n\t\t\tdomains,\n\t\t\tclientId: oidc?.clientId ?? \"\",\n\t\t\tclientSecret: oidc?.clientSecret ?? \"\",\n\t\t\tscopes:\n\t\t\t\toidc?.scopes && oidc.scopes.length > 0\n\t\t\t\t\t? oidc.scopes\n\t\t\t\t\t: [...DEFAULT_SCOPES],\n\t\t});\n\t}, [data, open, form]);\n\n\tconst { fields, append, remove } = useFieldArray({\n\t\tcontrol: form.control,\n\t\tname: \"domains\" as FieldArrayPath<OidcProviderForm>,\n\t});\n\n\tconst {\n\t\tfields: scopeFields,\n\t\tappend: appendScope,\n\t\tremove: removeScope,\n\t} = useFieldArray({\n\t\tcontrol: form.control,\n\t\tname: \"scopes\" as FieldArrayPath<OidcProviderForm>,\n\t});\n\n\tconst isSubmitting = form.formState.isSubmitting;\n\n\tconst onSubmit = async (data: OidcProviderForm) => {\n\t\ttry {\n\t\t\tconst scopes = data.scopes.filter(Boolean).length\n\t\t\t\t? data.scopes.filter(Boolean)\n\t\t\t\t: DEFAULT_SCOPES;\n\n\t\t\tconst isAzure = data.issuer.includes(\"login.microsoftonline.com\");\n\t\t\tconst mapping = isAzure\n\t\t\t\t? {\n\t\t\t\t\t\tid: \"sub\",\n\t\t\t\t\t\temail: \"preferred_username\",\n\t\t\t\t\t\temailVerified: \"email_verified\",\n\t\t\t\t\t\tname: \"name\",\n\t\t\t\t\t}\n\t\t\t\t: {\n\t\t\t\t\t\tid: \"sub\",\n\t\t\t\t\t\temail: \"email\",\n\t\t\t\t\t\temailVerified: \"email_verified\",\n\t\t\t\t\t\tname: \"preferred_username\",\n\t\t\t\t\t\timage: \"picture\",\n\t\t\t\t\t};\n\t\t\tawait mutateAsync({\n\t\t\t\tproviderId: data.providerId,\n\t\t\t\tissuer: data.issuer,\n\t\t\t\tdomains: data.domains,\n\t\t\t\toidcConfig: {\n\t\t\t\t\tclientId: data.clientId,\n\t\t\t\t\tclientSecret: data.clientSecret,\n\t\t\t\t\tscopes,\n\t\t\t\t\tpkce: true,\n\t\t\t\t\tmapping,\n\t\t\t\t},\n\t\t\t});\n\n\t\t\ttoast.success(\n\t\t\t\tisEdit\n\t\t\t\t\t? \"OIDC provider updated successfully\"\n\t\t\t\t\t: \"OIDC provider registered successfully\",\n\t\t\t);\n\t\t\tform.reset(formDefaultValues);\n\t\t\tsetOpen(false);\n\t\t\tawait utils.sso.listProviders.invalidate();\n\t\t} catch (err) {\n\t\t\ttoast.error(\n\t\t\t\terr instanceof Error ? err.message : \"Failed to register SSO provider\",\n\t\t\t);\n\t\t}\n\t};\n\n\treturn (\n\t\t<Dialog open={open} onOpenChange={setOpen}>\n\t\t\t<DialogTrigger asChild>{children}</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-[500px]\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>\n\t\t\t\t\t\t{isEdit ? \"Update OIDC provider\" : \"Register OIDC provider\"}\n\t\t\t\t\t</DialogTitle>\n\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\t{isEdit\n\t\t\t\t\t\t\t? \"Change issuer, domains, client settings or scopes. Provider ID cannot be changed.\"\n\t\t\t\t\t\t\t: \"Add any OIDC-compliant identity provider (e.g. Okta, Azure AD, Google Workspace, Auth0, Keycloak). Discovery will fill endpoints from the issuer URL when possible.\"}\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form onSubmit={form.handleSubmit(onSubmit)} className=\"space-y-4\">\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"providerId\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Provider ID</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"e.g. okta or my-idp\"\n\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\treadOnly={isEdit}\n\t\t\t\t\t\t\t\t\t\t\tclassName={isEdit ? \"bg-muted\" : undefined}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\tUnique identifier; used in callback URL path.\n\t\t\t\t\t\t\t\t\t\t{isEdit && \" Cannot be changed when editing.\"}\n\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t{baseURL && (\n\t\t\t\t\t\t\t\t\t\t<div className=\"rounded-md bg-muted px-3 py-2 text-xs\">\n\t\t\t\t\t\t\t\t\t\t\t<p className=\"font-medium text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\tCallback URL (configure in your IdP)\n\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t<p className=\"mt-0.5 break-all font-mono\">\n\t\t\t\t\t\t\t\t\t\t\t\t{baseURL}/api/auth/sso/callback/\n\t\t\t\t\t\t\t\t\t\t\t\t{watchedProviderId?.trim() || \"...\"}\n\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"issuer\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Issuer URL</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"https://idp.example.com\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\tDiscovery document is fetched from{\" \"}\n\t\t\t\t\t\t\t\t\t\t<code className=\"rounded bg-muted px-1\">\n\t\t\t\t\t\t\t\t\t\t\t{\"{issuer}\"}/.well-known/openid-configuration\n\t\t\t\t\t\t\t\t\t\t</code>\n\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<div className=\"space-y-2\">\n\t\t\t\t\t\t\t<div className=\"flex items-center justify-between\">\n\t\t\t\t\t\t\t\t<FormLabel>Domains</FormLabel>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\tclassName=\"h-8\"\n\t\t\t\t\t\t\t\t\tonClick={() => (append as (value: string) => void)(\"\")}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Plus className=\"mr-1 size-4\" />\n\t\t\t\t\t\t\t\t\tAdd domain\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<p className=\"text-xs text-muted-foreground\">\n\t\t\t\t\t\t\t\tEmail domains that use this provider (sign-in by email and org\n\t\t\t\t\t\t\t\tassignment; subdomains matched automatically).\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t{fields.map((field, index) => (\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tkey={field.id}\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname={`domains.${index}`}\n\t\t\t\t\t\t\t\t\trender={({ field: inputField }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"company.com\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex-1\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...inputField}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"shrink-0 text-muted-foreground hover:text-destructive\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => remove(index)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisabled={fields.length <= 1}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Trash2 className=\"size-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t{(() => {\n\t\t\t\t\t\t\t\tconst err = form.formState.errors.domains;\n\t\t\t\t\t\t\t\tconst msg =\n\t\t\t\t\t\t\t\t\ttypeof err?.message === \"string\"\n\t\t\t\t\t\t\t\t\t\t? err.message\n\t\t\t\t\t\t\t\t\t\t: (err as { root?: { message?: string } } | undefined)?.root\n\t\t\t\t\t\t\t\t\t\t\t\t?.message;\n\t\t\t\t\t\t\t\treturn msg ? (\n\t\t\t\t\t\t\t\t\t<p className=\"text-sm font-medium text-destructive\">{msg}</p>\n\t\t\t\t\t\t\t\t) : null;\n\t\t\t\t\t\t\t})()}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"clientId\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Client ID</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"Client ID from IdP\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"clientSecret\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Client secret</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\ttype=\"password\"\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Client secret from IdP\"\n\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<div className=\"space-y-2\">\n\t\t\t\t\t\t\t<div className=\"flex items-center justify-between\">\n\t\t\t\t\t\t\t\t<FormLabel>Scopes (optional)</FormLabel>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\tclassName=\"h-8\"\n\t\t\t\t\t\t\t\t\tonClick={() => (appendScope as (value: string) => void)(\"\")}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Plus className=\"mr-1 size-4\" />\n\t\t\t\t\t\t\t\t\tAdd scope\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\tOIDC scopes to request (e.g. openid, email, profile). If empty,\n\t\t\t\t\t\t\t\topenid, email and profile are used.\n\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t{scopeFields.map((field, index) => (\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tkey={field.id}\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname={`scopes.${index}`}\n\t\t\t\t\t\t\t\t\trender={({ field: inputField }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"openid\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex-1\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...inputField}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"shrink-0 text-muted-foreground hover:text-destructive\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => removeScope(index)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisabled={scopeFields.length <= 1}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Trash2 className=\"size-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\tonClick={() => setOpen(false)}\n\t\t\t\t\t\t\t\tdisabled={isSubmitting}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tCancel\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t<Button type=\"submit\" isLoading={isLoading}>\n\t\t\t\t\t\t\t\t{isEdit ? \"Update provider\" : \"Register provider\"}\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</DialogFooter>\n\t\t\t\t\t</form>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n}\n"
  },
  {
    "path": "apps/dokploy/components/proprietary/sso/register-saml-dialog.tsx",
    "content": "\"use client\";\n\nimport { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { Plus, Trash2 } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport {\n\ttype FieldArrayPath,\n\tuseFieldArray,\n\tuseForm,\n\tuseWatch,\n} from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { Textarea } from \"@/components/ui/textarea\";\nimport { api } from \"@/utils/api\";\nimport { useUrl } from \"@/utils/hooks/use-url\";\n\nconst domainsArraySchema = z\n\t.array(z.string().trim())\n\t.superRefine((arr, ctx) => {\n\t\tconst filled = arr.filter((s) => s.length > 0);\n\t\tif (filled.length < 1) {\n\t\t\tctx.addIssue({\n\t\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\t\tmessage: \"At least one domain is required\",\n\t\t\t\tpath: [],\n\t\t\t});\n\t\t}\n\t});\n\nconst samlProviderSchema = z.object({\n\tproviderId: z.string().min(1, \"Provider ID is required\").trim(),\n\tissuer: z.string().min(1, \"Issuer URL is required\").url(\"Invalid URL\").trim(),\n\tdomains: domainsArraySchema,\n\tentryPoint: z\n\t\t.string()\n\t\t.min(1, \"IdP SSO URL is required\")\n\t\t.url(\"Invalid URL\")\n\t\t.trim(),\n\tcert: z.string().min(1, \"IdP signing certificate is required\"),\n\tidpMetadataXml: z.string().optional(),\n});\n\ntype SamlProviderForm = z.infer<typeof samlProviderSchema>;\n\ninterface RegisterSamlDialogProps {\n\tproviderId?: string;\n\tchildren: React.ReactNode;\n}\n\nconst formDefaultValues: SamlProviderForm = {\n\tproviderId: \"\",\n\tissuer: \"\",\n\tdomains: [\"\"],\n\tentryPoint: \"\",\n\tcert: \"\",\n\tidpMetadataXml: \"\",\n};\n\nfunction parseSamlConfig(samlConfig: string | null): {\n\tentryPoint?: string;\n\tcert?: string;\n\tidpMetadataXml?: string;\n} | null {\n\tif (!samlConfig) return null;\n\ttry {\n\t\tconst parsed = JSON.parse(samlConfig) as {\n\t\t\tentryPoint?: string;\n\t\t\tcert?: string;\n\t\t\tidpMetadata?: { metadata?: string };\n\t\t};\n\t\treturn {\n\t\t\tentryPoint: parsed.entryPoint,\n\t\t\tcert: parsed.cert,\n\t\t\tidpMetadataXml: parsed.idpMetadata?.metadata,\n\t\t};\n\t} catch {\n\t\treturn null;\n\t}\n}\n\nexport function RegisterSamlDialog({\n\tproviderId,\n\tchildren,\n}: RegisterSamlDialogProps) {\n\tconst utils = api.useUtils();\n\tconst [open, setOpen] = useState(false);\n\n\tconst { data } = api.sso.one.useQuery(\n\t\t{ providerId: providerId ?? \"\" },\n\t\t{ enabled: !!providerId && open },\n\t);\n\tconst registerMutation = api.sso.register.useMutation();\n\tconst updateMutation = api.sso.update.useMutation();\n\n\tconst isEdit = !!providerId;\n\tconst mutateAsync = isEdit\n\t\t? updateMutation.mutateAsync\n\t\t: registerMutation.mutateAsync;\n\tconst isPending = isEdit\n\t\t? updateMutation.isPending\n\t\t: registerMutation.isPending;\n\n\tconst baseURL = useUrl();\n\n\tconst form = useForm<SamlProviderForm>({\n\t\tresolver: zodResolver(samlProviderSchema),\n\t\tdefaultValues: formDefaultValues,\n\t});\n\n\tuseEffect(() => {\n\t\tif (!data || !open) return;\n\t\tconst domains = data.domain\n\t\t\t? data.domain\n\t\t\t\t\t.split(\",\")\n\t\t\t\t\t.map((d) => d.trim())\n\t\t\t\t\t.filter(Boolean)\n\t\t\t: [\"\"];\n\t\tif (domains.length === 0) domains.push(\"\");\n\t\tconst saml = parseSamlConfig(data.samlConfig);\n\t\tform.reset({\n\t\t\tproviderId: data.providerId,\n\t\t\tissuer: data.issuer,\n\t\t\tdomains,\n\t\t\tentryPoint: saml?.entryPoint ?? \"\",\n\t\t\tcert: saml?.cert ?? \"\",\n\t\t\tidpMetadataXml: saml?.idpMetadataXml ?? \"\",\n\t\t});\n\t}, [data, open, form]);\n\n\tconst watchedProviderId = useWatch({\n\t\tcontrol: form.control,\n\t\tname: \"providerId\",\n\t\tdefaultValue: \"\",\n\t});\n\n\tconst { fields, append, remove } = useFieldArray({\n\t\tcontrol: form.control,\n\t\tname: \"domains\" as FieldArrayPath<SamlProviderForm>,\n\t});\n\n\tconst isSubmitting = form.formState.isSubmitting;\n\n\tconst onSubmit = async (data: SamlProviderForm) => {\n\t\ttry {\n\t\t\t// maybe add the /saml/metadata endpoint to the baseURL\n\t\t\tconst baseURLWithMetadata = `${baseURL}/saml/metadata`;\n\t\t\tconst generateSpMetadata = (providerId: string) => {\n\t\t\t\treturn `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<md:EntityDescriptor xmlns:md=\"urn:oasis:names:tc:SAML:2.0:metadata\" entityID=\"${baseURL}\">\n    <md:SPSSODescriptor protocolSupportEnumeration=\"urn:oasis:names:tc:SAML:2.0:protocol\">\n        <md:AssertionConsumerService Binding=\"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST\" Location=\"${baseURL}/api/auth/sso/saml2/callback/${providerId}\" index=\"1\"/>\n    </md:SPSSODescriptor>\n</md:EntityDescriptor>`;\n\t\t\t};\n\n\t\t\tawait mutateAsync({\n\t\t\t\tproviderId: data.providerId,\n\t\t\t\tissuer: data.issuer,\n\t\t\t\tdomains: data.domains,\n\t\t\t\tsamlConfig: {\n\t\t\t\t\tentryPoint: data.entryPoint,\n\t\t\t\t\tcert: data.cert,\n\t\t\t\t\tcallbackUrl: `${baseURL}/api/auth/sso/saml2/callback/${data.providerId}`,\n\t\t\t\t\taudience: baseURL,\n\t\t\t\t\tidpMetadata: data.idpMetadataXml?.trim()\n\t\t\t\t\t\t? { metadata: data.idpMetadataXml.trim() }\n\t\t\t\t\t\t: undefined,\n\t\t\t\t\tspMetadata: {\n\t\t\t\t\t\tmetadata: generateSpMetadata(data.providerId),\n\t\t\t\t\t},\n\t\t\t\t\tmapping: {\n\t\t\t\t\t\tid: \"nameID\",\n\t\t\t\t\t\temail: \"email\",\n\t\t\t\t\t\tname: \"displayName\",\n\t\t\t\t\t\tfirstName: \"givenName\",\n\t\t\t\t\t\tlastName: \"surname\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t});\n\n\t\t\ttoast.success(\n\t\t\t\tisEdit\n\t\t\t\t\t? \"SAML provider updated successfully\"\n\t\t\t\t\t: \"SAML provider registered successfully\",\n\t\t\t);\n\t\t\tform.reset(formDefaultValues);\n\t\t\tsetOpen(false);\n\t\t\tawait utils.sso.listProviders.invalidate();\n\t\t} catch (err) {\n\t\t\ttoast.error(\n\t\t\t\terr instanceof Error ? err.message : \"Failed to register SAML provider\",\n\t\t\t);\n\t\t}\n\t};\n\n\treturn (\n\t\t<Dialog open={open} onOpenChange={setOpen}>\n\t\t\t<DialogTrigger asChild>{children}</DialogTrigger>\n\t\t\t<DialogContent className=\"sm:max-w-[500px] max-h-[90vh] overflow-y-auto\">\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>\n\t\t\t\t\t\t{isEdit ? \"Update SAML provider\" : \"Register SAML provider\"}\n\t\t\t\t\t</DialogTitle>\n\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\t{isEdit\n\t\t\t\t\t\t\t? \"Change issuer, domains, entry point or certificate. Provider ID cannot be changed.\"\n\t\t\t\t\t\t\t: \"Add a SAML 2.0 identity provider (e.g. Okta SAML, Azure AD SAML, OneLogin). You need the IdP's SSO URL and signing certificate.\"}\n\t\t\t\t\t</DialogDescription>\n\t\t\t\t</DialogHeader>\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form onSubmit={form.handleSubmit(onSubmit)} className=\"space-y-4\">\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"providerId\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Provider ID</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"e.g. okta-saml or azure-saml\"\n\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\treadOnly={isEdit}\n\t\t\t\t\t\t\t\t\t\t\tclassName={isEdit ? \"bg-muted\" : undefined}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t{isEdit && (\n\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\tCannot be changed when editing.\n\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t{baseURL && (\n\t\t\t\t\t\t\t\t\t\t<div className=\"rounded-md bg-muted px-3 py-2 text-xs\">\n\t\t\t\t\t\t\t\t\t\t\t<p className=\"font-medium text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\tCallback URL (configure in your IdP)\n\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t<p className=\"mt-0.5 break-all font-mono\">\n\t\t\t\t\t\t\t\t\t\t\t\t{baseURL}/api/auth/sso/saml2/callback/\n\t\t\t\t\t\t\t\t\t\t\t\t{watchedProviderId?.trim() || \"...\"}\n\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"issuer\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Issuer URL</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"https://idp.example.com\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<div className=\"space-y-2\">\n\t\t\t\t\t\t\t<div className=\"flex items-center justify-between\">\n\t\t\t\t\t\t\t\t<FormLabel>Domains</FormLabel>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\tclassName=\"h-8\"\n\t\t\t\t\t\t\t\t\tonClick={() => append(\"\")}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Plus className=\"mr-1 size-4\" />\n\t\t\t\t\t\t\t\t\tAdd domain\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\tEmail domains that use this provider (sign-in by email and org\n\t\t\t\t\t\t\t\tassignment; subdomains matched automatically).\n\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t{fields.map((field, index) => (\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tkey={field.id}\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname={`domains.${index}`}\n\t\t\t\t\t\t\t\t\trender={({ field: inputField }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"company.com\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex-1\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...inputField}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"shrink-0 text-muted-foreground hover:text-destructive\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => remove(index)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisabled={fields.length <= 1}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Trash2 className=\"size-4\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t{(() => {\n\t\t\t\t\t\t\t\tconst err = form.formState.errors.domains;\n\t\t\t\t\t\t\t\tconst msg =\n\t\t\t\t\t\t\t\t\ttypeof err?.message === \"string\"\n\t\t\t\t\t\t\t\t\t\t? err.message\n\t\t\t\t\t\t\t\t\t\t: (err as { root?: { message?: string } } | undefined)?.root\n\t\t\t\t\t\t\t\t\t\t\t\t?.message;\n\t\t\t\t\t\t\t\treturn msg ? (\n\t\t\t\t\t\t\t\t\t<p className=\"text-sm font-medium text-destructive\">{msg}</p>\n\t\t\t\t\t\t\t\t) : null;\n\t\t\t\t\t\t\t})()}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"entryPoint\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>IdP SSO URL (Entry point)</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"https://idp.example.com/sso\"\n\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\tSingle Sign-On URL from your IdP&apos;s SAML setup.\n\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"cert\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>IdP signing certificate (X.509)</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Textarea\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Paste IdP signing certificate (PEM, BEGIN CERTIFICATE / END CERTIFICATE)\"\n\t\t\t\t\t\t\t\t\t\t\trows={4}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"font-mono text-xs\"\n\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"idpMetadataXml\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>IdP metadata XML (optional)</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Textarea\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Paste full IdP metadata XML if you have it (EntityDescriptor). Otherwise leave empty and use Issuer, IdP SSO URL and certificate above.\"\n\t\t\t\t\t\t\t\t\t\t\trows={5}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"font-mono text-xs\"\n\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\tSome IdPs require full metadata; paste the XML here to\n\t\t\t\t\t\t\t\t\t\toverride issuer/entry point/cert.\n\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\tonClick={() => setOpen(false)}\n\t\t\t\t\t\t\t\tdisabled={isSubmitting}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tCancel\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t<Button type=\"submit\" isLoading={isPending}>\n\t\t\t\t\t\t\t\t{isEdit ? \"Update provider\" : \"Register provider\"}\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</DialogFooter>\n\t\t\t\t\t</form>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n}\n"
  },
  {
    "path": "apps/dokploy/components/proprietary/sso/sign-in-with-sso.tsx",
    "content": "\"use client\";\n\nimport { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { Loader2, LogIn } from \"lucide-react\";\nimport { useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { authClient } from \"@/lib/auth-client\";\n\nconst ssoEmailSchema = z.object({\n\temail: z\n\t\t.string()\n\t\t.min(1, \"Enter your work email\")\n\t\t.email(\"Enter a valid email address\")\n\t\t.transform((v) => v.trim()),\n});\n\ntype SSOEmailForm = z.infer<typeof ssoEmailSchema>;\n\ninterface SignInWithSSOProps {\n\t/** Content shown when SSO is collapsed (e.g. email/password form) */\n\tchildren: React.ReactNode;\n}\n\nexport function SignInWithSSO({ children }: SignInWithSSOProps) {\n\tconst [expanded, setExpanded] = useState(false);\n\n\tconst form = useForm<SSOEmailForm>({\n\t\tresolver: zodResolver(ssoEmailSchema),\n\t\tdefaultValues: { email: \"\" },\n\t});\n\n\tconst onSubmit = async (values: SSOEmailForm) => {\n\t\ttry {\n\t\t\tconst { data, error } = await authClient.signIn.sso({\n\t\t\t\temail: values.email,\n\t\t\t\tcallbackURL: \"/dashboard/projects\",\n\t\t\t});\n\t\t\tif (error) {\n\t\t\t\ttoast.error(error.message ?? \"Failed to sign in with SSO\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (data?.url) {\n\t\t\t\twindow.location.href = data.url;\n\t\t\t}\n\t\t} catch (err) {\n\t\t\ttoast.error(\n\t\t\t\terr instanceof Error ? err.message : \"Failed to sign in with SSO\",\n\t\t\t);\n\t\t}\n\t};\n\n\tif (!expanded) {\n\t\treturn (\n\t\t\t<div className=\"mb-4 space-y-2\">\n\t\t\t\t<Button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\tclassName=\"w-full\"\n\t\t\t\t\tonClick={() => setExpanded(true)}\n\t\t\t\t>\n\t\t\t\t\t<LogIn className=\"mr-2 size-4\" />\n\t\t\t\t\tSign in with SSO\n\t\t\t\t</Button>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div className=\"mb-4 space-y-2\">\n\t\t\t<Form {...form}>\n\t\t\t\t<form onSubmit={form.handleSubmit(onSubmit)} className=\"space-y-2\">\n\t\t\t\t\t<FormField\n\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\tname=\"email\"\n\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t<div className=\"flex gap-2\">\n\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\ttype=\"email\"\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"you@company.com\"\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex-1\"\n\t\t\t\t\t\t\t\t\t\t\tautoComplete=\"email\"\n\t\t\t\t\t\t\t\t\t\t\tdisabled={form.formState.isSubmitting}\n\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\tdisabled={form.formState.isSubmitting}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{form.formState.isSubmitting ? (\n\t\t\t\t\t\t\t\t\t\t\t\t<Loader2 className=\"size-4 animate-spin\" />\n\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\"Continue\"\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t)}\n\t\t\t\t\t/>\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tonClick={() => setExpanded(false)}\n\t\t\t\t\t\tclassName=\"text-xs text-muted-foreground hover:underline\"\n\t\t\t\t\t>\n\t\t\t\t\t\tUse email and password instead\n\t\t\t\t\t</button>\n\t\t\t\t</form>\n\t\t\t</Form>\n\t\t</div>\n\t);\n}\n"
  },
  {
    "path": "apps/dokploy/components/proprietary/sso/sso-settings.tsx",
    "content": "\"use client\";\n\nimport {\n\tEye,\n\tLoader2,\n\tLogIn,\n\tPencil,\n\tPlus,\n\tShield,\n\tTrash2,\n} from \"lucide-react\";\nimport { useState } from \"react\";\nimport { toast } from \"sonner\";\nimport { DialogAction } from \"@/components/shared/dialog-action\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n} from \"@/components/ui/dialog\";\nimport { Input } from \"@/components/ui/input\";\nimport { api } from \"@/utils/api\";\nimport { useUrl } from \"@/utils/hooks/use-url\";\nimport { RegisterOidcDialog } from \"./register-oidc-dialog\";\nimport { RegisterSamlDialog } from \"./register-saml-dialog\";\n\ntype ProviderForDetails = {\n\tid: string | null;\n\tproviderId: string;\n\tissuer: string;\n\tdomain: string;\n\toidcConfig: string | null;\n\tsamlConfig: string | null;\n\torganizationId: string | null;\n};\n\nfunction parseOidcConfig(config: string | null): {\n\tclientId?: string;\n\tscopes?: string[];\n} | null {\n\tif (!config) return null;\n\ttry {\n\t\tconst parsed = JSON.parse(config) as {\n\t\t\tclientId?: string;\n\t\t\tscopes?: string[];\n\t\t};\n\t\treturn { clientId: parsed.clientId, scopes: parsed.scopes };\n\t} catch {\n\t\treturn null;\n\t}\n}\n\nfunction parseSamlConfig(\n\tconfig: string | null,\n): { entryPoint?: string } | null {\n\tif (!config) return null;\n\ttry {\n\t\tconst parsed = JSON.parse(config) as { entryPoint?: string };\n\t\treturn { entryPoint: parsed.entryPoint };\n\t} catch {\n\t\treturn null;\n\t}\n}\n\nexport const SSOSettings = () => {\n\tconst utils = api.useUtils();\n\tconst [detailsProvider, setDetailsProvider] =\n\t\tuseState<ProviderForDetails | null>(null);\n\tconst baseURL = useUrl();\n\tconst [manageOriginsOpen, setManageOriginsOpen] = useState(false);\n\tconst [editingOrigin, setEditingOrigin] = useState<string | null>(null);\n\tconst [editingValue, setEditingValue] = useState(\"\");\n\tconst [newOriginInput, setNewOriginInput] = useState(\"\");\n\n\tconst { data: providers, isPending } = api.sso.listProviders.useQuery();\n\tconst { data: trustedOrigins = [] } = api.sso.getTrustedOrigins.useQuery(\n\t\tundefined,\n\t\t{ enabled: manageOriginsOpen },\n\t);\n\tconst { mutateAsync: deleteProvider, isPending: isDeleting } =\n\t\tapi.sso.deleteProvider.useMutation();\n\tconst { mutateAsync: addTrustedOrigin, isPending: isAddingOrigin } =\n\t\tapi.sso.addTrustedOrigin.useMutation();\n\tconst { mutateAsync: removeTrustedOrigin, isPending: isRemovingOrigin } =\n\t\tapi.sso.removeTrustedOrigin.useMutation();\n\tconst { mutateAsync: updateTrustedOrigin, isPending: isUpdatingOrigin } =\n\t\tapi.sso.updateTrustedOrigin.useMutation();\n\n\tconst handleAddOrigin = async () => {\n\t\tconst value = newOriginInput.trim();\n\t\tif (!value) return;\n\t\ttry {\n\t\t\tawait addTrustedOrigin({ origin: value });\n\t\t\ttoast.success(\"Trusted origin added\");\n\t\t\tsetNewOriginInput(\"\");\n\t\t\tawait utils.sso.getTrustedOrigins.invalidate();\n\t\t} catch (err) {\n\t\t\ttoast.error(\n\t\t\t\terr instanceof Error ? err.message : \"Failed to add trusted origin\",\n\t\t\t);\n\t\t}\n\t};\n\n\tconst handleRemoveOrigin = async (origin: string) => {\n\t\ttry {\n\t\t\tawait removeTrustedOrigin({ origin });\n\t\t\ttoast.success(\"Trusted origin removed\");\n\t\t\tif (editingOrigin === origin) setEditingOrigin(null);\n\t\t\tawait utils.sso.getTrustedOrigins.invalidate();\n\t\t} catch (err) {\n\t\t\ttoast.error(\n\t\t\t\terr instanceof Error ? err.message : \"Failed to remove trusted origin\",\n\t\t\t);\n\t\t}\n\t};\n\n\tconst handleStartEdit = (origin: string) => {\n\t\tsetEditingOrigin(origin);\n\t\tsetEditingValue(origin);\n\t};\n\n\tconst handleSaveEdit = async () => {\n\t\tif (editingOrigin == null || !editingValue.trim()) {\n\t\t\tsetEditingOrigin(null);\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\tawait updateTrustedOrigin({\n\t\t\t\toldOrigin: editingOrigin,\n\t\t\t\tnewOrigin: editingValue.trim(),\n\t\t\t});\n\t\t\ttoast.success(\"Trusted origin updated\");\n\t\t\tsetEditingOrigin(null);\n\t\t\tsetEditingValue(\"\");\n\t\t\tawait utils.sso.getTrustedOrigins.invalidate();\n\t\t} catch (err) {\n\t\t\ttoast.error(\n\t\t\t\terr instanceof Error ? err.message : \"Failed to update trusted origin\",\n\t\t\t);\n\t\t}\n\t};\n\n\tconst handleCancelEdit = () => {\n\t\tsetEditingOrigin(null);\n\t\tsetEditingValue(\"\");\n\t};\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4 rounded-lg border p-4\">\n\t\t\t<div className=\"flex flex-col gap-2 sm:flex-row sm:items-start sm:justify-between\">\n\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t<LogIn className=\"size-6 text-muted-foreground\" />\n\t\t\t\t\t\t<CardTitle className=\"text-xl\">Single Sign-On (SSO)</CardTitle>\n\t\t\t\t\t</div>\n\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\tConfigure OIDC or SAML identity providers for enterprise sign-in.\n\t\t\t\t\t\tUsers can sign in with their organization&apos;s IdP.\n\t\t\t\t\t</CardDescription>\n\t\t\t\t</div>\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\tonClick={() => setManageOriginsOpen(true)}\n\t\t\t\t\tclassName=\"shrink-0\"\n\t\t\t\t>\n\t\t\t\t\t<Shield className=\"mr-2 size-4\" />\n\t\t\t\t\tManage origins\n\t\t\t\t</Button>\n\t\t\t</div>\n\n\t\t\t{isPending ? (\n\t\t\t\t<div className=\"flex items-center gap-2 justify-center min-h-[25vh]\">\n\t\t\t\t\t<Loader2 className=\"size-6 text-muted-foreground animate-spin\" />\n\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\tLoading providers...\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t{providers && providers.length > 0 && (\n\t\t\t\t\t\t<div className=\"flex flex-wrap items-center gap-2\">\n\t\t\t\t\t\t\t<RegisterOidcDialog>\n\t\t\t\t\t\t\t\t<Button variant=\"secondary\" size=\"sm\">\n\t\t\t\t\t\t\t\t\t<LogIn className=\"mr-2 size-4\" />\n\t\t\t\t\t\t\t\t\tAdd OIDC provider\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</RegisterOidcDialog>\n\t\t\t\t\t\t\t<RegisterSamlDialog>\n\t\t\t\t\t\t\t\t<Button variant=\"secondary\" size=\"sm\">\n\t\t\t\t\t\t\t\t\t<LogIn className=\"mr-2 size-4\" />\n\t\t\t\t\t\t\t\t\tAdd SAML provider\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</RegisterSamlDialog>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{providers && providers.length > 0 ? (\n\t\t\t\t\t\t<div className=\"space-y-3\">\n\t\t\t\t\t\t\t<span className=\"text-sm font-medium\">Registered providers</span>\n\t\t\t\t\t\t\t<div className=\"grid gap-3 sm:grid-cols-2\">\n\t\t\t\t\t\t\t\t{providers.map((provider) => {\n\t\t\t\t\t\t\t\t\tconst isOidc = !!provider.oidcConfig;\n\t\t\t\t\t\t\t\t\tconst isSaml = !!provider.samlConfig;\n\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<Card\n\t\t\t\t\t\t\t\t\t\t\tkey={provider.id}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"overflow-hidden bg-background\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<CardHeader className=\"pb-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-start justify-between gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CardTitle className=\"text-base font-medium\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{provider.providerId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CardTitle>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CardDescription className=\"text-xs\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{provider.issuer}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-wrap gap-1 mt-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Badge variant=\"secondary\" className=\"text-xs\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{provider.domain}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{isOidc && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Badge variant=\"outline\" className=\"text-xs\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tOIDC\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{isSaml && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Badge variant=\"outline\" className=\"text-xs\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSAML\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t\t\t\t\t\t<CardContent className=\"flex flex-wrap gap-2 pt-0\">\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetDetailsProvider({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tid: provider.id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tproviderId: provider.providerId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tissuer: provider.issuer,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdomain: provider.domain,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\toidcConfig: provider.oidcConfig,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsamlConfig: provider.samlConfig,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torganizationId: provider.organizationId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Eye className=\"mr-1 size-3\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\tView details\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t{isOidc && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<RegisterOidcDialog providerId={provider.providerId}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button variant=\"ghost\" size=\"sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Pencil className=\"mr-1 size-3\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tEdit\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</RegisterOidcDialog>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t{isSaml && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<RegisterSamlDialog providerId={provider.providerId}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button variant=\"ghost\" size=\"sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Pencil className=\"mr-1 size-3\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tEdit\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</RegisterSamlDialog>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"Remove SSO provider\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tdescription={`Remove provider \"${provider.providerId}\"? Users will no longer be able to sign in with this IdP.`}\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"destructive\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={async () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait deleteProvider({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tproviderId: provider.providerId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.success(\"Provider removed\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tawait utils.sso.listProviders.invalidate();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttoast.error(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\terr instanceof Error\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? err.message\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"Failed to remove provider\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-destructive hover:text-destructive\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisabled={isDeleting}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Trash2 className=\"mr-1 size-3\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tRemove\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t\t\t\t\t\t</Card>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<div className=\"flex flex-col items-center gap-4 justify-center min-h-[30vh] text-center\">\n\t\t\t\t\t\t\t<div className=\"flex flex-col items-center gap-2 max-w-[400px]\">\n\t\t\t\t\t\t\t\t<div className=\"rounded-full bg-muted p-4\">\n\t\t\t\t\t\t\t\t\t<LogIn className=\"size-8 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div className=\"space-y-1\">\n\t\t\t\t\t\t\t\t\t<h3 className=\"text-lg font-semibold\">No SSO providers</h3>\n\t\t\t\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\tAdd an OIDC or SAML provider so users can sign in with their\n\t\t\t\t\t\t\t\t\t\torganization&apos;s IdP (e.g. Okta, Azure AD).\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"flex flex-wrap gap-2 justify-center\">\n\t\t\t\t\t\t\t\t<RegisterOidcDialog>\n\t\t\t\t\t\t\t\t\t<Button variant=\"secondary\">\n\t\t\t\t\t\t\t\t\t\t<LogIn className=\"mr-2 size-4\" />\n\t\t\t\t\t\t\t\t\t\tAdd OIDC provider\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</RegisterOidcDialog>\n\t\t\t\t\t\t\t\t<RegisterSamlDialog>\n\t\t\t\t\t\t\t\t\t<Button variant=\"outline\">\n\t\t\t\t\t\t\t\t\t\t<LogIn className=\"mr-2 size-4\" />\n\t\t\t\t\t\t\t\t\t\tAdd SAML provider\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</RegisterSamlDialog>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</>\n\t\t\t)}\n\n\t\t\t<Dialog\n\t\t\t\topen={!!detailsProvider}\n\t\t\t\tonOpenChange={(open) => !open && setDetailsProvider(null)}\n\t\t\t>\n\t\t\t\t<DialogContent className=\"sm:max-w-[480px]\">\n\t\t\t\t\t{detailsProvider && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<DialogHeader>\n\t\t\t\t\t\t\t\t<DialogTitle>SSO provider details</DialogTitle>\n\t\t\t\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\t\t\t\tUse Edit to change provider settings (OIDC or SAML).\n\t\t\t\t\t\t\t\t</DialogDescription>\n\t\t\t\t\t\t\t</DialogHeader>\n\t\t\t\t\t\t\t<div className=\"grid gap-3 py-2\">\n\t\t\t\t\t\t\t\t<div className=\"grid gap-1\">\n\t\t\t\t\t\t\t\t\t<span className=\"text-xs font-medium text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\tProvider ID\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t<p className=\"rounded-md bg-muted px-2 py-1.5 font-mono text-sm\">\n\t\t\t\t\t\t\t\t\t\t{detailsProvider.providerId}\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div className=\"grid gap-1\">\n\t\t\t\t\t\t\t\t\t<span className=\"text-xs font-medium text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\tIssuer URL\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t<p className=\"break-all rounded-md bg-muted px-2 py-1.5 text-sm\">\n\t\t\t\t\t\t\t\t\t\t{detailsProvider.issuer}\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div className=\"grid gap-1\">\n\t\t\t\t\t\t\t\t\t<span className=\"text-xs font-medium text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\tDomain\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t<p className=\"rounded-md bg-muted px-2 py-1.5 text-sm\">\n\t\t\t\t\t\t\t\t\t\t{detailsProvider.domain}\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t{detailsProvider.oidcConfig && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t{(() => {\n\t\t\t\t\t\t\t\t\t\t\tconst oidc = parseOidcConfig(detailsProvider.oidcConfig);\n\t\t\t\t\t\t\t\t\t\t\tif (!oidc) return null;\n\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{oidc.clientId && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"grid gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-xs font-medium text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tClient ID\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"rounded-md bg-muted px-2 py-1.5 font-mono text-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{oidc.clientId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t{oidc.scopes && oidc.scopes.length > 0 && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"grid gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-xs font-medium text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tScopes\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"rounded-md bg-muted px-2 py-1.5 text-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{oidc.scopes.join(\" \")}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t})()}\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{detailsProvider.samlConfig && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t{(() => {\n\t\t\t\t\t\t\t\t\t\t\tconst saml = parseSamlConfig(detailsProvider.samlConfig);\n\t\t\t\t\t\t\t\t\t\t\tif (!saml?.entryPoint) return null;\n\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"grid gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-xs font-medium text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tEntry point\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"break-all rounded-md bg-muted px-2 py-1.5 text-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{saml.entryPoint}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t})()}\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t<div className=\"grid gap-1\">\n\t\t\t\t\t\t\t\t\t<span className=\"text-xs font-medium text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\tCallback URL (configure in your IdP)\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t<p className=\"break-all rounded-md bg-muted px-2 py-1.5 font-mono text-xs\">\n\t\t\t\t\t\t\t\t\t\t{baseURL || \"{baseURL}\"}\n\t\t\t\t\t\t\t\t\t\t{detailsProvider.samlConfig\n\t\t\t\t\t\t\t\t\t\t\t? \"/api/auth/sso/saml2/callback/\"\n\t\t\t\t\t\t\t\t\t\t\t: \"/api/auth/sso/callback/\"}\n\t\t\t\t\t\t\t\t\t\t{detailsProvider.providerId}\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t{!baseURL && (\n\t\t\t\t\t\t\t\t\t\t<p className=\"text-xs text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\tReplace {\"{baseURL}\"} with your Dokploy URL (e.g. https://\n\t\t\t\t\t\t\t\t\t\t\tyour-domain.com).\n\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\tonClick={() => setDetailsProvider(null)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tClose\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</DialogFooter>\n\t\t\t\t\t\t</>\n\t\t\t\t\t)}\n\t\t\t\t</DialogContent>\n\t\t\t</Dialog>\n\n\t\t\t<Dialog open={manageOriginsOpen} onOpenChange={setManageOriginsOpen}>\n\t\t\t\t<DialogContent className=\"sm:max-w-[480px]\">\n\t\t\t\t\t<DialogHeader>\n\t\t\t\t\t\t<DialogTitle className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t<Shield className=\"size-5\" />\n\t\t\t\t\t\t\tTrusted origins\n\t\t\t\t\t\t</DialogTitle>\n\t\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\t\tManage allowed origins for SSO callbacks. Add, edit, or remove\n\t\t\t\t\t\t\torigins for your account.\n\t\t\t\t\t\t</DialogDescription>\n\t\t\t\t\t</DialogHeader>\n\t\t\t\t\t<div className=\"space-y-4 py-2\">\n\t\t\t\t\t\t<div className=\"space-y-2\">\n\t\t\t\t\t\t\t<span className=\"text-sm font-medium\">Current origins</span>\n\t\t\t\t\t\t\t{trustedOrigins.length === 0 ? (\n\t\t\t\t\t\t\t\t<p className=\"rounded-md border border-dashed bg-muted/30 px-3 py-4 text-center text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\tNo trusted origins yet. Add one below.\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<ul className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t\t{trustedOrigins.map((origin) => (\n\t\t\t\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\t\t\t\tkey={origin}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-2 rounded-md border bg-muted/30 px-3 py-2\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{editingOrigin === origin ? (\n\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={editingValue}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => setEditingValue(e.target.value)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"https://...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex-1 font-mono text-sm\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tautoFocus\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={handleSaveEdit}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisabled={!editingValue.trim() || isUpdatingOrigin}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSave\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={handleCancelEdit}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tCancel\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex-1 break-all font-mono text-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{origin}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"size-8 shrink-0\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => handleStartEdit(origin)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Pencil className=\"size-3.5\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"Remove trusted origin\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdescription={`Remove \"${origin}\" from trusted origins?`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"destructive\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={async () => handleRemoveOrigin(origin)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"size-8 shrink-0 text-destructive hover:text-destructive\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisabled={isRemovingOrigin}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Trash2 className=\"size-3.5\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</DialogAction>\n\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"space-y-2\">\n\t\t\t\t\t\t\t<span className=\"text-sm font-medium\">Add trusted origin</span>\n\t\t\t\t\t\t\t<div className=\"flex gap-2\">\n\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\tvalue={newOriginInput}\n\t\t\t\t\t\t\t\t\tonChange={(e) => setNewOriginInput(e.target.value)}\n\t\t\t\t\t\t\t\t\tplaceholder=\"https://example.com\"\n\t\t\t\t\t\t\t\t\tclassName=\"font-mono text-sm\"\n\t\t\t\t\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\t\t\t\t\tif (e.key === \"Enter\") {\n\t\t\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t\t\t\tvoid handleAddOrigin();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\tonClick={handleAddOrigin}\n\t\t\t\t\t\t\t\t\tdisabled={!newOriginInput.trim() || isAddingOrigin}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Plus className=\"mr-1 size-4\" />\n\t\t\t\t\t\t\t\t\tAdd\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\tonClick={() => setManageOriginsOpen(false)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tClose\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</DialogFooter>\n\t\t\t\t</DialogContent>\n\t\t\t</Dialog>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/proprietary/whitelabeling/whitelabeling-preview.tsx",
    "content": "\"use client\";\n\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\n\ninterface WhitelabelingPreviewProps {\n\tconfig: {\n\t\tappName?: string;\n\t\tlogoUrl?: string;\n\t\tfooterText?: string;\n\t};\n}\n\nexport function WhitelabelingPreview({ config }: WhitelabelingPreviewProps) {\n\tconst appName = config.appName || \"Dokploy\";\n\n\treturn (\n\t\t<Card className=\"bg-transparent\">\n\t\t\t<CardHeader>\n\t\t\t\t<CardTitle>Live Preview</CardTitle>\n\t\t\t\t<CardDescription>\n\t\t\t\t\tA quick preview of how your branding changes will look.\n\t\t\t\t</CardDescription>\n\t\t\t</CardHeader>\n\t\t\t<CardContent>\n\t\t\t\t<div className=\"rounded-lg border overflow-hidden\">\n\t\t\t\t\t{/* Simulated sidebar header */}\n\t\t\t\t\t<div className=\"flex items-center gap-3 p-4 border-b bg-sidebar\">\n\t\t\t\t\t\t{config.logoUrl ? (\n\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\tsrc={config.logoUrl}\n\t\t\t\t\t\t\t\talt=\"Preview Logo\"\n\t\t\t\t\t\t\t\tclassName=\"size-8 rounded-sm object-contain\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<div className=\"size-8 rounded-sm flex items-center justify-center bg-primary text-primary-foreground font-bold text-sm\">\n\t\t\t\t\t\t\t\t{appName.charAt(0).toUpperCase()}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<span className=\"font-semibold text-sm\">{appName}</span>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t{/* Simulated content area */}\n\t\t\t\t\t<div className=\"p-4 bg-background\">\n\t\t\t\t\t\t<div className=\"flex items-center gap-2 mb-3\">\n\t\t\t\t\t\t\t<div className=\"h-2 w-16 rounded-full bg-primary\" />\n\t\t\t\t\t\t\t<div className=\"h-2 w-24 rounded-full bg-muted\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"flex gap-2\">\n\t\t\t\t\t\t\t<div className=\"px-3 py-1.5 rounded-md text-xs bg-primary text-primary-foreground font-medium\">\n\t\t\t\t\t\t\t\tButton\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"px-3 py-1.5 rounded-md text-xs border font-medium\">\n\t\t\t\t\t\t\t\tSecondary\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t{/* Simulated footer */}\n\t\t\t\t\t{config.footerText && (\n\t\t\t\t\t\t<div className=\"px-4 py-2 border-t text-xs text-muted-foreground text-center bg-sidebar\">\n\t\t\t\t\t\t\t{config.footerText}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</CardContent>\n\t\t</Card>\n\t);\n}\n"
  },
  {
    "path": "apps/dokploy/components/proprietary/whitelabeling/whitelabeling-provider.tsx",
    "content": "\"use client\";\n\nimport Head from \"next/head\";\nimport { api } from \"@/utils/api\";\n\nexport function WhitelabelingProvider() {\n\tconst { data: config } = api.whitelabeling.getPublic.useQuery(undefined, {\n\t\tstaleTime: 5 * 60 * 1000,\n\t\trefetchOnWindowFocus: false,\n\t});\n\n\tif (!config) return null;\n\n\treturn (\n\t\t<>\n\t\t\t<Head>\n\t\t\t\t{config.metaTitle && <title>{config.metaTitle}</title>}\n\t\t\t\t{config.faviconUrl && <link rel=\"icon\" href={config.faviconUrl} />}\n\t\t\t</Head>\n\n\t\t\t{config.customCss && (\n\t\t\t\t<style\n\t\t\t\t\tid=\"whitelabeling-styles\"\n\t\t\t\t\tdangerouslySetInnerHTML={{\n\t\t\t\t\t\t__html: config.customCss,\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</>\n\t);\n}\n"
  },
  {
    "path": "apps/dokploy/components/proprietary/whitelabeling/whitelabeling-settings.tsx",
    "content": "\"use client\";\n\nimport { standardSchemaResolver as zodResolver } from \"@hookform/resolvers/standard-schema\";\nimport { Loader2, RotateCcw } from \"lucide-react\";\nimport { useEffect } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { CodeEditor } from \"@/components/shared/code-editor\";\nimport { DialogAction } from \"@/components/shared/dialog-action\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCard,\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { Textarea } from \"@/components/ui/textarea\";\nimport { api } from \"@/utils/api\";\nimport { WhitelabelingPreview } from \"./whitelabeling-preview\";\n\nconst safeUrlField = z\n\t.string()\n\t.refine((val) => val === \"\" || /^https?:\\/\\//i.test(val), {\n\t\tmessage: \"Only http:// and https:// URLs are allowed\",\n\t});\n\nconst formSchema = z.object({\n\tappName: z.string(),\n\tappDescription: z.string(),\n\tlogoUrl: safeUrlField,\n\tfaviconUrl: safeUrlField,\n\tcustomCss: z.string(),\n\tloginLogoUrl: safeUrlField,\n\tsupportUrl: safeUrlField,\n\tdocsUrl: safeUrlField,\n\terrorPageTitle: z.string(),\n\terrorPageDescription: z.string(),\n\tmetaTitle: z.string(),\n\tfooterText: z.string(),\n});\n\ntype FormSchema = z.infer<typeof formSchema>;\n\nconst DEFAULT_CSS_TEMPLATE = `/* ============================================\n   Dokploy Default Theme - CSS Variables\n   Modify these values to customize your instance.\n   ============================================ */\n\n/* ---------- Light Mode ---------- */\n:root {\n  --background: 0 0% 100%;\n  --foreground: 240 10% 3.9%;\n\n  --card: 0 0% 100%;\n  --card-foreground: 240 10% 3.9%;\n\n  --popover: 0 0% 100%;\n  --popover-foreground: 240 10% 3.9%;\n\n  --primary: 240 5.9% 10%;\n  --primary-foreground: 0 0% 98%;\n\n  --secondary: 240 4.8% 95.9%;\n  --secondary-foreground: 240 5.9% 10%;\n\n  --muted: 240 4.8% 95.9%;\n  --muted-foreground: 240 3.8% 46.1%;\n\n  --accent: 240 4.8% 95.9%;\n  --accent-foreground: 240 5.9% 10%;\n\n  --destructive: 0 84.2% 50.2%;\n  --destructive-foreground: 0 0% 98%;\n\n  --border: 240 5.9% 90%;\n  --input: 240 5.9% 90%;\n  --ring: 240 10% 3.9%;\n  --radius: 0.5rem;\n\n  /* Sidebar */\n  --sidebar-background: 0 0% 98%;\n  --sidebar-foreground: 240 5.3% 26.1%;\n  --sidebar-primary: 240 5.9% 10%;\n  --sidebar-primary-foreground: 0 0% 98%;\n  --sidebar-accent: 240 4.8% 95.9%;\n  --sidebar-accent-foreground: 240 5.9% 10%;\n  --sidebar-border: 220 13% 91%;\n  --sidebar-ring: 217.2 91.2% 59.8%;\n\n  /* Charts */\n  --chart-1: 173 58% 39%;\n  --chart-2: 12 76% 61%;\n  --chart-3: 197 37% 24%;\n  --chart-4: 43 74% 66%;\n  --chart-5: 27 87% 67%;\n}\n\n/* ---------- Dark Mode ---------- */\n.dark {\n  --background: 0 0% 0%;\n  --foreground: 0 0% 98%;\n\n  --card: 240 4% 10%;\n  --card-foreground: 0 0% 98%;\n\n  --popover: 240 10% 3.9%;\n  --popover-foreground: 0 0% 98%;\n\n  --primary: 0 0% 98%;\n  --primary-foreground: 240 5.9% 10%;\n\n  --secondary: 240 3.7% 15.9%;\n  --secondary-foreground: 0 0% 98%;\n\n  --muted: 240 4% 10%;\n  --muted-foreground: 240 5% 64.9%;\n\n  --accent: 240 3.7% 15.9%;\n  --accent-foreground: 0 0% 98%;\n\n  --destructive: 0 84.2% 50.2%;\n  --destructive-foreground: 0 0% 98%;\n\n  --border: 240 3.7% 15.9%;\n  --input: 240 4% 10%;\n  --ring: 240 4.9% 83.9%;\n\n  /* Sidebar */\n  --sidebar-background: 240 5.9% 10%;\n  --sidebar-foreground: 240 4.8% 95.9%;\n  --sidebar-primary: 224.3 76.3% 48%;\n  --sidebar-primary-foreground: 0 0% 100%;\n  --sidebar-accent: 240 3.7% 15.9%;\n  --sidebar-accent-foreground: 240 4.8% 95.9%;\n  --sidebar-border: 240 3.7% 15.9%;\n  --sidebar-ring: 217.2 91.2% 59.8%;\n\n  /* Charts */\n  --chart-1: 220 70% 50%;\n  --chart-2: 340 75% 55%;\n  --chart-3: 30 80% 55%;\n  --chart-4: 280 65% 60%;\n  --chart-5: 160 60% 45%;\n}\n\n/* ---------- Custom Styles ---------- */\n/* Add your own CSS rules below */\n`;\n\nexport function WhitelabelingSettings() {\n\tconst utils = api.useUtils();\n\tconst {\n\t\tdata,\n\t\tisPending: isLoading,\n\t\trefetch,\n\t} = api.whitelabeling.get.useQuery();\n\n\tconst { mutateAsync: updateWhitelabeling, isPending: isUpdating } =\n\t\tapi.whitelabeling.update.useMutation();\n\n\tconst { mutateAsync: resetWhitelabeling, isPending: isResetting } =\n\t\tapi.whitelabeling.reset.useMutation();\n\n\tconst form = useForm<FormSchema>({\n\t\tdefaultValues: {\n\t\t\tappName: \"\",\n\t\t\tappDescription: \"\",\n\t\t\tlogoUrl: \"\",\n\t\t\tfaviconUrl: \"\",\n\t\t\tcustomCss: \"\",\n\t\t\tloginLogoUrl: \"\",\n\t\t\tsupportUrl: \"\",\n\t\t\tdocsUrl: \"\",\n\t\t\terrorPageTitle: \"\",\n\t\t\terrorPageDescription: \"\",\n\t\t\tmetaTitle: \"\",\n\t\t\tfooterText: \"\",\n\t\t},\n\t\tresolver: zodResolver(formSchema),\n\t});\n\n\tuseEffect(() => {\n\t\tif (data) {\n\t\t\tform.reset({\n\t\t\t\tappName: data.appName ?? \"\",\n\t\t\t\tappDescription: data.appDescription ?? \"\",\n\t\t\t\tlogoUrl: data.logoUrl ?? \"\",\n\t\t\t\tfaviconUrl: data.faviconUrl ?? \"\",\n\t\t\t\tcustomCss: data.customCss ?? \"\",\n\t\t\t\tloginLogoUrl: data.loginLogoUrl ?? \"\",\n\t\t\t\tsupportUrl: data.supportUrl ?? \"\",\n\t\t\t\tdocsUrl: data.docsUrl ?? \"\",\n\t\t\t\terrorPageTitle: data.errorPageTitle ?? \"\",\n\t\t\t\terrorPageDescription: data.errorPageDescription ?? \"\",\n\t\t\t\tmetaTitle: data.metaTitle ?? \"\",\n\t\t\t\tfooterText: data.footerText ?? \"\",\n\t\t\t});\n\t\t}\n\t}, [data, form]);\n\n\tif (isLoading) {\n\t\treturn (\n\t\t\t<div className=\"flex items-center gap-2 justify-center min-h-[25vh]\">\n\t\t\t\t<Loader2 className=\"size-6 text-muted-foreground animate-spin\" />\n\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\tLoading whitelabeling settings...\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t);\n\t}\n\n\tconst onSubmit = async (values: FormSchema) => {\n\t\tawait updateWhitelabeling({\n\t\t\twhitelabelingConfig: {\n\t\t\t\tappName: values.appName || null,\n\t\t\t\tappDescription: values.appDescription || null,\n\t\t\t\tlogoUrl: values.logoUrl || null,\n\t\t\t\tfaviconUrl: values.faviconUrl || null,\n\t\t\t\tcustomCss: values.customCss || null,\n\t\t\t\tloginLogoUrl: values.loginLogoUrl || null,\n\t\t\t\tsupportUrl: values.supportUrl || null,\n\t\t\t\tdocsUrl: values.docsUrl || null,\n\t\t\t\terrorPageTitle: values.errorPageTitle || null,\n\t\t\t\terrorPageDescription: values.errorPageDescription || null,\n\t\t\t\tmetaTitle: values.metaTitle || null,\n\t\t\t\tfooterText: values.footerText || null,\n\t\t\t},\n\t\t})\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(\"Whitelabeling settings updated\");\n\t\t\t\tawait refetch();\n\t\t\t\tawait utils.whitelabeling.getPublic.invalidate();\n\t\t\t\tawait utils.whitelabeling.get.invalidate();\n\t\t\t})\n\t\t\t.catch((error) => {\n\t\t\t\ttoast.error(\n\t\t\t\t\terror?.message || \"Failed to update whitelabeling settings\",\n\t\t\t\t);\n\t\t\t});\n\t};\n\n\tconst handleReset = async () => {\n\t\tawait resetWhitelabeling()\n\t\t\t.then(async () => {\n\t\t\t\ttoast.success(\"Whitelabeling settings reset to defaults\");\n\t\t\t\tawait refetch();\n\t\t\t\tawait utils.whitelabeling.getPublic.invalidate();\n\t\t\t\tawait utils.whitelabeling.get.invalidate();\n\t\t\t})\n\t\t\t.catch((error) => {\n\t\t\t\ttoast.error(error?.message || \"Failed to reset whitelabeling settings\");\n\t\t\t});\n\t};\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-6\">\n\t\t\t<Form {...form}>\n\t\t\t\t<form\n\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\tclassName=\"flex flex-col gap-6\"\n\t\t\t\t>\n\t\t\t\t\t{/* Branding Section */}\n\t\t\t\t\t<Card className=\"bg-transparent\">\n\t\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t\t<CardTitle>Branding</CardTitle>\n\t\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\t\tCustomize the application name, logos, and favicon to match your\n\t\t\t\t\t\t\t\tbrand identity.\n\t\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t<CardContent className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"appName\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Application Name</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"Dokploy\" {...field} />\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\tReplaces \"Dokploy\" across the entire interface.\n\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"appDescription\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Application Description</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"The Open Source alternative to Netlify, Vercel, Heroku.\"\n\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\tTagline shown on the login/onboarding pages. Defaults to\n\t\t\t\t\t\t\t\t\t\t\tthe standard Dokploy description if empty.\n\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"logoUrl\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Logo URL</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"https://example.com/logo.svg\"\n\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\tMain logo shown in the sidebar and header. Recommended\n\t\t\t\t\t\t\t\t\t\t\tsize: 128x128px.\n\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"loginLogoUrl\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Login Page Logo URL</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"https://example.com/login-logo.svg\"\n\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\tLogo displayed on the login page. If empty, the main logo\n\t\t\t\t\t\t\t\t\t\t\tis used.\n\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"faviconUrl\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Favicon URL</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"https://example.com/favicon.ico\"\n\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\tBrowser tab icon. Supports .ico, .png, and .svg formats.\n\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t</Card>\n\n\t\t\t\t\t{/* Appearance Section */}\n\t\t\t\t\t<Card className=\"bg-transparent\">\n\t\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t\t<CardTitle>Appearance</CardTitle>\n\t\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\t\tCustomize the look and feel of the application with custom CSS.\n\t\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t<CardContent className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"customCss\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center justify-between\">\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel>Custom CSS</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tform.setValue(\"customCss\", DEFAULT_CSS_TEMPLATE);\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\tLoad Default Styles\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"max-h-[350px] overflow-auto\">\n\t\t\t\t\t\t\t\t\t\t\t\t<CodeEditor\n\t\t\t\t\t\t\t\t\t\t\t\t\tlanguage=\"css\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"/* Click 'Load Default Styles' to start with the base theme variables */\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tlineWrapping\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\tInject custom CSS styles globally. Click \"Load Default\n\t\t\t\t\t\t\t\t\t\t\tStyles\" to get the base theme CSS variables as a starting\n\t\t\t\t\t\t\t\t\t\t\tpoint.\n\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t</Card>\n\n\t\t\t\t\t{/* Metadata & Links Section */}\n\t\t\t\t\t<Card className=\"bg-transparent\">\n\t\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t\t<CardTitle>Metadata & Links</CardTitle>\n\t\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\t\tCustomize the page title, footer text, and sidebar links.\n\t\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t<CardContent className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"metaTitle\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Page Title</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"Dokploy\" {...field} />\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\tBrowser tab title. Defaults to \"Dokploy\" if empty.\n\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"footerText\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Footer Text</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"Powered by Your Company\" {...field} />\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\tCustom text displayed in the footer area.\n\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"supportUrl\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Support URL</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"https://support.example.com\"\n\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\tCustom URL for the \"Support\" link in the sidebar.\n\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"docsUrl\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Documentation URL</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"https://docs.example.com\"\n\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormDescription>\n\t\t\t\t\t\t\t\t\t\t\tCustom URL for the \"Documentation\" link in the sidebar.\n\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t</Card>\n\n\t\t\t\t\t{/* Error Pages Section */}\n\t\t\t\t\t<Card className=\"bg-transparent\">\n\t\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t\t<CardTitle>Error Pages</CardTitle>\n\t\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\t\tCustomize the error page messages shown to users.\n\t\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t<CardContent className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"errorPageTitle\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Error Page Title</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input placeholder=\"Something went wrong\" {...field} />\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"errorPageDescription\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Error Page Description</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Textarea\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"We're sorry, but an unexpected error occurred. Please try again later.\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"min-h-[80px]\"\n\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t</Card>\n\n\t\t\t\t\t{/* Actions */}\n\t\t\t\t\t<div className=\"flex items-center justify-between\">\n\t\t\t\t\t\t<DialogAction\n\t\t\t\t\t\t\ttitle=\"Reset Whitelabeling\"\n\t\t\t\t\t\t\tdescription=\"Are you sure you want to reset all whitelabeling settings to their defaults? This action cannot be undone.\"\n\t\t\t\t\t\t\ttype=\"destructive\"\n\t\t\t\t\t\t\tonClick={handleReset}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Button variant=\"outline\" type=\"button\" isLoading={isResetting}>\n\t\t\t\t\t\t\t\t<RotateCcw className=\"size-4 mr-2\" />\n\t\t\t\t\t\t\t\tReset to Defaults\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</DialogAction>\n\n\t\t\t\t\t\t<Button type=\"submit\" isLoading={isUpdating} disabled={isUpdating}>\n\t\t\t\t\t\t\tSave Changes\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\t\t\t\t</form>\n\t\t\t</Form>\n\n\t\t\t{/* Live Preview */}\n\t\t\t<WhitelabelingPreview config={form.watch()} />\n\t\t</div>\n\t);\n}\n"
  },
  {
    "path": "apps/dokploy/components/shared/ChatwootWidget.tsx",
    "content": "import Script from \"next/script\";\nimport { useEffect } from \"react\";\n\ninterface ChatwootWidgetProps {\n\twebsiteToken: string;\n\tbaseUrl?: string;\n\tsettings?: {\n\t\tposition?: \"left\" | \"right\";\n\t\ttype?: \"standard\" | \"expanded_bubble\";\n\t\tlauncherTitle?: string;\n\t\tdarkMode?: boolean;\n\t\thideMessageBubble?: boolean;\n\t\tplacement?: \"left\" | \"right\";\n\t\tshowPopoutButton?: boolean;\n\t\twidgetStyle?: \"standard\" | \"bubble\";\n\t};\n\tuser?: {\n\t\tidentifier: string;\n\t\tname?: string;\n\t\temail?: string;\n\t\tphoneNumber?: string;\n\t\tavatarUrl?: string;\n\t\tcustomAttributes?: Record<string, any>;\n\t\tidentifierHash?: string;\n\t};\n}\n\nexport const ChatwootWidget = ({\n\twebsiteToken,\n\tbaseUrl = \"https://app.chatwoot.com\",\n\tsettings = {\n\t\tposition: \"right\",\n\t\ttype: \"standard\",\n\t\tlauncherTitle: \"Chat with us\",\n\t},\n\tuser,\n}: ChatwootWidgetProps) => {\n\tuseEffect(() => {\n\t\t// Configurar los settings de Chatwoot\n\t\twindow.chatwootSettings = {\n\t\t\tposition: \"right\",\n\t\t};\n\n\t\twindow.chatwootSDKReady = () => {\n\t\t\twindow.chatwootSDK?.run({ websiteToken, baseUrl });\n\n\t\t\tconst trySetUser = () => {\n\t\t\t\tif (window.$chatwoot && user) {\n\t\t\t\t\twindow.$chatwoot.setUser(user.identifier, {\n\t\t\t\t\t\temail: user.email,\n\t\t\t\t\t\tname: user.name,\n\t\t\t\t\t\tavatar_url: user.avatarUrl,\n\t\t\t\t\t\tphone_number: user.phoneNumber,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t};\n\n\t\t\ttrySetUser();\n\t\t};\n\t}, [websiteToken, baseUrl, user, settings]);\n\n\treturn (\n\t\t<Script\n\t\t\tsrc={`${baseUrl}/packs/js/sdk.js`}\n\t\t\tstrategy=\"lazyOnload\"\n\t\t\tonLoad={() => window.chatwootSDKReady?.()}\n\t\t/>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/shared/HubSpotWidget.tsx",
    "content": "import Script from \"next/script\";\n\nexport const HubSpotWidget = () => {\n\treturn (\n\t\t<Script\n\t\t\tid=\"hs-script-loader\"\n\t\t\ttype=\"text/javascript\"\n\t\t\tsrc=\"//js-eu1.hs-scripts.com/147033433.js\"\n\t\t\tstrategy=\"lazyOnload\"\n\t\t\tasync\n\t\t\tdefer\n\t\t/>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/shared/advance-breadcrumb.tsx",
    "content": "import type { ServiceType } from \"@dokploy/server/db/schema\";\nimport {\n\tCheck,\n\tChevronDown,\n\tChevronRight,\n\tCircuitBoard,\n\tFolderInput,\n\tGlobeIcon,\n\tX,\n} from \"lucide-react\";\nimport { useRouter } from \"next/router\";\nimport { type ComponentType, useEffect, useMemo, useState } from \"react\";\nimport {\n\tMariadbIcon,\n\tMongodbIcon,\n\tMysqlIcon,\n\tPostgresqlIcon,\n\tRedisIcon,\n} from \"@/components/icons/data-tools-icons\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCommand,\n\tCommandEmpty,\n\tCommandGroup,\n\tCommandInput,\n\tCommandItem,\n\tCommandList,\n} from \"@/components/ui/command\";\nimport {\n\tPopover,\n\tPopoverContent,\n\tPopoverTrigger,\n} from \"@/components/ui/popover\";\nimport { ScrollArea } from \"@/components/ui/scroll-area\";\nimport { Separator } from \"@/components/ui/separator\";\nimport { SidebarTrigger } from \"@/components/ui/sidebar\";\nimport { api, type RouterOutputs } from \"@/utils/api\";\n\ntype ProjectItem = RouterOutputs[\"project\"][\"all\"][number];\ntype ProjectEnvironment = ProjectItem[\"environments\"][number];\ntype EnvironmentDetails = RouterOutputs[\"environment\"][\"one\"];\n\ntype ServiceItem = {\n\tid: string;\n\tname: string;\n\ttype: ServiceType;\n};\n\ntype NamedService = {\n\tname: string;\n};\n\ntype EnvironmentServiceCollections = {\n\tapplications: (NamedService & { applicationId: string })[];\n\tcompose: (NamedService & { composeId: string })[];\n\tpostgres: (NamedService & { postgresId: string })[];\n\tmysql: (NamedService & { mysqlId: string })[];\n\tmariadb: (NamedService & { mariadbId: string })[];\n\tredis: (NamedService & { redisId: string })[];\n\tmongo: (NamedService & { mongoId: string })[];\n};\n\ntype ServiceCollections = Pick<\n\tProjectEnvironment,\n\t| \"applications\"\n\t| \"compose\"\n\t| \"postgres\"\n\t| \"mysql\"\n\t| \"mariadb\"\n\t| \"redis\"\n\t| \"mongo\"\n>;\n\nconst SERVICE_COLLECTION_KEYS = [\n\t\"applications\",\n\t\"compose\",\n\t\"postgres\",\n\t\"mysql\",\n\t\"mariadb\",\n\t\"redis\",\n\t\"mongo\",\n] as const satisfies ReadonlyArray<keyof ServiceCollections>;\n\nconst SERVICE_QUERY_KEYS = [\n\t\"applicationId\",\n\t\"composeId\",\n\t\"postgresId\",\n\t\"mysqlId\",\n\t\"mariadbId\",\n\t\"redisId\",\n\t\"mongoId\",\n] as const;\n\nconst SERVICE_ICONS: Record<\n\tServiceType,\n\tComponentType<{ className?: string }>\n> = {\n\tapplication: GlobeIcon,\n\tcompose: CircuitBoard,\n\tpostgres: PostgresqlIcon,\n\tmysql: MysqlIcon,\n\tmariadb: MariadbIcon,\n\tredis: RedisIcon,\n\tmongo: MongodbIcon,\n};\n\nconst getStringQueryParam = (value: string | string[] | undefined) =>\n\ttypeof value === \"string\" ? value : null;\n\nconst includesSearch = (value: string | null | undefined, search: string) =>\n\tvalue?.toLowerCase().includes(search.toLowerCase()) ?? false;\n\nconst getServiceIcon = (type: ServiceType, className = \"size-4\") => {\n\tconst Icon = SERVICE_ICONS[type];\n\treturn <Icon className={className} />;\n};\n\nconst countEnvironmentServices = (environment: ServiceCollections): number =>\n\tSERVICE_COLLECTION_KEYS.reduce(\n\t\t(total, key) => total + environment[key].length,\n\t\t0,\n\t);\n\nconst mapServices = <T extends { name: string }>(\n\titems: readonly T[],\n\tgetId: (item: T) => string,\n\ttype: ServiceType,\n): ServiceItem[] =>\n\titems.map((item) => ({\n\t\tid: getId(item),\n\t\tname: item.name,\n\t\ttype,\n\t}));\n\nconst extractServicesFromEnvironment = (\n\tenvironment: EnvironmentDetails | null | undefined,\n): ServiceItem[] => {\n\tif (!environment) return [];\n\n\tconst servicesByType =\n\t\tenvironment as unknown as EnvironmentServiceCollections;\n\n\treturn [\n\t\t...mapServices(\n\t\t\tservicesByType.applications,\n\t\t\t(item) => item.applicationId,\n\t\t\t\"application\",\n\t\t),\n\t\t...mapServices(servicesByType.compose, (item) => item.composeId, \"compose\"),\n\t\t...mapServices(\n\t\t\tservicesByType.postgres,\n\t\t\t(item) => item.postgresId,\n\t\t\t\"postgres\",\n\t\t),\n\t\t...mapServices(servicesByType.mysql, (item) => item.mysqlId, \"mysql\"),\n\t\t...mapServices(servicesByType.mariadb, (item) => item.mariadbId, \"mariadb\"),\n\t\t...mapServices(servicesByType.redis, (item) => item.redisId, \"redis\"),\n\t\t...mapServices(servicesByType.mongo, (item) => item.mongoId, \"mongo\"),\n\t];\n};\n\nconst getTargetEnvironmentId = (\n\tproject: ProjectItem,\n\tselectedEnvironmentId?: string,\n) => {\n\tif (selectedEnvironmentId) return selectedEnvironmentId;\n\n\tconst productionEnvironment = project.environments.find(\n\t\t(environment) => environment.name === \"production\",\n\t);\n\n\treturn (\n\t\tproductionEnvironment?.environmentId ??\n\t\tproject.environments[0]?.environmentId\n\t);\n};\n\nexport const AdvanceBreadcrumb = () => {\n\tconst router = useRouter();\n\tconst { query } = router;\n\n\t// Read IDs from URL (dynamic route segments)\n\tconst projectId = getStringQueryParam(query.projectId);\n\tconst environmentId = getStringQueryParam(query.environmentId);\n\tconst serviceId =\n\t\tSERVICE_QUERY_KEYS.map((key) => getStringQueryParam(query[key])).find(\n\t\t\t(value): value is string => !!value,\n\t\t) ?? null;\n\n\tconst [projectOpen, setProjectOpen] = useState(false);\n\tconst [serviceOpen, setServiceOpen] = useState(false);\n\tconst [environmentOpen, setEnvironmentOpen] = useState(false);\n\tconst [projectSearch, setProjectSearch] = useState(\"\");\n\tconst [serviceSearch, setServiceSearch] = useState(\"\");\n\tconst [environmentSearch, setEnvironmentSearch] = useState(\"\");\n\tconst [expandedProjectId, setExpandedProjectId] = useState<string | null>(\n\t\tnull,\n\t);\n\n\t// Fetch all projects\n\tconst { data: allProjects } = api.project.all.useQuery();\n\n\t// Fetch current project data\n\tconst { data: currentProject } = api.project.one.useQuery(\n\t\t{ projectId: projectId ?? \"\" },\n\t\t{ enabled: !!projectId },\n\t);\n\n\t// Fetch current environment\n\tconst { data: currentEnvironment } = api.environment.one.useQuery(\n\t\t{ environmentId: environmentId ?? \"\" },\n\t\t{ enabled: !!environmentId },\n\t);\n\n\t// Fetch environments for current project\n\tconst { data: projectEnvironments } = api.environment.byProjectId.useQuery(\n\t\t{ projectId: projectId ?? \"\" },\n\t\t{ enabled: !!projectId },\n\t);\n\n\t// Close dropdowns on escape key\n\tuseEffect(() => {\n\t\tconst handleKeyDown = (e: KeyboardEvent) => {\n\t\t\tif (e.key === \"Escape\") {\n\t\t\t\tsetProjectOpen(false);\n\t\t\t\tsetServiceOpen(false);\n\t\t\t\tsetEnvironmentOpen(false);\n\t\t\t}\n\t\t};\n\t\twindow.addEventListener(\"keydown\", handleKeyDown);\n\t\treturn () => window.removeEventListener(\"keydown\", handleKeyDown);\n\t}, []);\n\n\tconst services = useMemo(\n\t\t() => extractServicesFromEnvironment(currentEnvironment),\n\t\t[currentEnvironment],\n\t);\n\n\tconst currentService = useMemo(\n\t\t() => services.find((service) => service.id === serviceId),\n\t\t[serviceId, services],\n\t);\n\n\t// Navigate to project's default environment\n\tconst handleProjectSelect = (\n\t\tselectedProjectId: string,\n\t\tselectedEnvironmentId?: string,\n\t) => {\n\t\tconst project = allProjects?.find((p) => p.projectId === selectedProjectId);\n\t\tif (project) {\n\t\t\tconst targetEnvironmentId = getTargetEnvironmentId(\n\t\t\t\tproject,\n\t\t\t\tselectedEnvironmentId,\n\t\t\t);\n\n\t\t\tif (targetEnvironmentId) {\n\t\t\t\trouter.push(\n\t\t\t\t\t`/dashboard/project/${selectedProjectId}/environment/${targetEnvironmentId}`,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tsetProjectOpen(false);\n\t\tsetExpandedProjectId(null);\n\t};\n\n\t// Navigate to environment\n\tconst handleEnvironmentSelect = (envId: string) => {\n\t\trouter.push(`/dashboard/project/${projectId}/environment/${envId}`);\n\t\tsetEnvironmentOpen(false);\n\t};\n\n\t// Navigate to service\n\tconst handleServiceSelect = (service: ServiceItem) => {\n\t\tif (!environmentId) return;\n\n\t\trouter.push(\n\t\t\t`/dashboard/project/${projectId}/environment/${environmentId}/services/${service.type}/${service.id}`,\n\t\t);\n\t\tsetServiceOpen(false);\n\t};\n\n\tconst filteredProjects = useMemo(\n\t\t() =>\n\t\t\t(allProjects ?? []).filter(\n\t\t\t\t(project) =>\n\t\t\t\t\tincludesSearch(project.name, projectSearch) ||\n\t\t\t\t\tincludesSearch(project.description, projectSearch),\n\t\t\t),\n\t\t[allProjects, projectSearch],\n\t);\n\n\tconst filteredServices = useMemo(\n\t\t() =>\n\t\t\tservices.filter((service) => includesSearch(service.name, serviceSearch)),\n\t\t[serviceSearch, services],\n\t);\n\n\tconst filteredEnvironments = useMemo(\n\t\t() =>\n\t\t\t(projectEnvironments ?? []).filter((environment) =>\n\t\t\t\tincludesSearch(environment.name, environmentSearch),\n\t\t\t),\n\t\t[environmentSearch, projectEnvironments],\n\t);\n\n\t// If we're just on the projects page, show simple breadcrumb\n\tif (!projectId) {\n\t\treturn (\n\t\t\t<header className=\"flex h-16 shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-[[data-collapsible=icon]]/sidebar-wrapper:h-12\">\n\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t<SidebarTrigger className=\"-ml-1\" />\n\t\t\t\t\t<Separator orientation=\"vertical\" className=\"mr-2 h-4\" />\n\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t<FolderInput className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t\t<span className=\"font-medium\">Projects</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</header>\n\t\t);\n\t}\n\n\treturn (\n\t\t<header className=\"flex h-16 shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-[[data-collapsible=icon]]/sidebar-wrapper:h-12\">\n\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t<SidebarTrigger className=\"-ml-1\" />\n\t\t\t\t<Separator orientation=\"vertical\" className=\"mr-2 h-4\" />\n\n\t\t\t\t<div className=\"flex items-center\">\n\t\t\t\t\t{/* Project Selector */}\n\t\t\t\t\t<Popover open={projectOpen} onOpenChange={setProjectOpen}>\n\t\t\t\t\t\t<PopoverTrigger asChild>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\taria-expanded={projectOpen}\n\t\t\t\t\t\t\t\tclassName=\"h-auto px-2 py-1.5 hover:bg-accent gap-2\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<FolderInput className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t<span className=\"font-medium max-w-[150px] truncate\">\n\t\t\t\t\t\t\t\t\t{currentProject?.name || \"Select Project\"}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<ChevronDown className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</PopoverTrigger>\n\t\t\t\t\t\t<PopoverContent\n\t\t\t\t\t\t\tclassName=\"w-[380px] p-0\"\n\t\t\t\t\t\t\talign=\"start\"\n\t\t\t\t\t\t\tsideOffset={8}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Command shouldFilter={false}>\n\t\t\t\t\t\t\t\t<div className=\"relative\">\n\t\t\t\t\t\t\t\t\t<CommandInput\n\t\t\t\t\t\t\t\t\t\tplaceholder=\"Find Project...\"\n\t\t\t\t\t\t\t\t\t\tvalue={projectSearch}\n\t\t\t\t\t\t\t\t\t\tonValueChange={setProjectSearch}\n\t\t\t\t\t\t\t\t\t\tclassName=\"w-full focus-visible:ring-0\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<kbd className=\"pointer-events-none h-5 absolute right-2 top-1/2 -translate-y-1/2 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium opacity-100 flex\">\n\t\t\t\t\t\t\t\t\t\tEsc\n\t\t\t\t\t\t\t\t\t</kbd>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<CommandList>\n\t\t\t\t\t\t\t\t\t<CommandEmpty>No projects found.</CommandEmpty>\n\t\t\t\t\t\t\t\t\t<CommandGroup>\n\t\t\t\t\t\t\t\t\t\t<ScrollArea className=\"h-[300px]\">\n\t\t\t\t\t\t\t\t\t\t\t{filteredProjects.map((project) => {\n\t\t\t\t\t\t\t\t\t\t\t\tconst totalServices = project.environments.reduce(\n\t\t\t\t\t\t\t\t\t\t\t\t\t(total, env) => total + countEnvironmentServices(env),\n\t\t\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\tconst isSelected = project.projectId === projectId;\n\t\t\t\t\t\t\t\t\t\t\t\tconst isExpanded =\n\t\t\t\t\t\t\t\t\t\t\t\t\texpandedProjectId === project.projectId;\n\n\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div key={project.projectId}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={project.projectId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonSelect={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (project.environments.length > 1) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetExpandedProjectId(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisExpanded ? null : project.projectId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thandleProjectSelect(project.projectId);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center justify-between py-3 px-2 cursor-pointer\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center justify-center size-8 rounded-md bg-muted text-xs font-semibold uppercase\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{project.name.slice(0, 2)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-medium\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{project.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{project.environments.length} env\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{project.environments.length !== 1\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"s\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"\"}{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t· {totalServices} service\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{totalServices !== 1 ? \"s\" : \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{isSelected && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Check className=\"size-4 text-primary\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{project.environments.length > 1 && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ChevronRight\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={`size-4 text-muted-foreground transition-transform ${isExpanded ? \"rotate-90\" : \"\"}`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandItem>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{/* Expanded environments */}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{isExpanded && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"ml-11 border-l pl-3 py-1 space-y-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{project.environments.map((env) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst envServices =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcountEnvironmentServices(env);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst isEnvSelected =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenv.environmentId === environmentId;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={env.environmentId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={env.environmentId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonSelect={() =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thandleProjectSelect(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tproject.projectId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenv.environmentId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center justify-between py-2 px-2 cursor-pointer text-sm\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-xs\">{env.name}</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-xs text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{envServices} service\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{envServices !== 1 ? \"s\" : \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{isEnvSelected && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Check className=\"size-3 text-primary\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t\t</ScrollArea>\n\t\t\t\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t\t\t\t</CommandList>\n\t\t\t\t\t\t\t</Command>\n\t\t\t\t\t\t</PopoverContent>\n\t\t\t\t\t</Popover>\n\n\t\t\t\t\t{/* Environment Selector */}\n\t\t\t\t\t{projectEnvironments && projectEnvironments.length > 1 && (\n\t\t\t\t\t\t<Popover open={environmentOpen} onOpenChange={setEnvironmentOpen}>\n\t\t\t\t\t\t\t<PopoverTrigger asChild>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\taria-expanded={environmentOpen}\n\t\t\t\t\t\t\t\t\tclassName=\"h-auto px-2 py-1.5 hover:bg-accent gap-2\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<span className=\"font-medium max-w-[150px] truncate\">\n\t\t\t\t\t\t\t\t\t\t{currentEnvironment?.name || \"production\"}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t<ChevronDown className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</PopoverTrigger>\n\t\t\t\t\t\t\t<PopoverContent\n\t\t\t\t\t\t\t\tclassName=\"w-[350px] p-0\"\n\t\t\t\t\t\t\t\talign=\"start\"\n\t\t\t\t\t\t\t\tsideOffset={8}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Command shouldFilter={false}>\n\t\t\t\t\t\t\t\t\t<div className=\"relative\">\n\t\t\t\t\t\t\t\t\t\t<CommandInput\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Find Environment...\"\n\t\t\t\t\t\t\t\t\t\t\tvalue={environmentSearch}\n\t\t\t\t\t\t\t\t\t\t\tonValueChange={setEnvironmentSearch}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-full focus-visible:ring-0\"\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<kbd className=\"pointer-events-none h-5 absolute right-2 top-1/2 -translate-y-1/2 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium opacity-100 flex\">\n\t\t\t\t\t\t\t\t\t\t\tEsc\n\t\t\t\t\t\t\t\t\t\t</kbd>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<CommandList>\n\t\t\t\t\t\t\t\t\t\t<CommandEmpty>No environments found.</CommandEmpty>\n\t\t\t\t\t\t\t\t\t\t<CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t<ScrollArea className=\"h-[300px]\">\n\t\t\t\t\t\t\t\t\t\t\t\t{filteredEnvironments.map((env) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst isSelected =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tenv.environmentId === environmentId;\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={env.environmentId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={env.environmentId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonSelect={() =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thandleEnvironmentSelect(env.environmentId)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center justify-between py-2 cursor-pointer\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-medium\">{env.name}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{isSelected && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Check className=\"size-4 text-primary\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t\t\t</ScrollArea>\n\t\t\t\t\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t\t\t\t\t</CommandList>\n\t\t\t\t\t\t\t\t</Command>\n\t\t\t\t\t\t\t</PopoverContent>\n\t\t\t\t\t\t</Popover>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{projectEnvironments && projectEnvironments.length === 1 && (\n\t\t\t\t\t\t<p className=\"text-sm font-normal ml-1\">\n\t\t\t\t\t\t\t{currentEnvironment?.name || \"production\"}\n\t\t\t\t\t\t</p>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{/* Service Selector - only show when viewing a service */}\n\t\t\t\t\t{serviceId && currentService && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<Separator orientation=\"vertical\" className=\"mx-2 h-6\" />\n\n\t\t\t\t\t\t\t<Popover open={serviceOpen} onOpenChange={setServiceOpen}>\n\t\t\t\t\t\t\t\t<PopoverTrigger asChild>\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\taria-expanded={serviceOpen}\n\t\t\t\t\t\t\t\t\t\tclassName=\"h-auto px-2 py-1.5 hover:bg-accent gap-2\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{getServiceIcon(currentService.type)}\n\t\t\t\t\t\t\t\t\t\t<span className=\"font-medium max-w-[150px] truncate\">\n\t\t\t\t\t\t\t\t\t\t\t{currentService.name}\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t<ChevronDown className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</PopoverTrigger>\n\t\t\t\t\t\t\t\t<PopoverContent\n\t\t\t\t\t\t\t\t\tclassName=\"w-[350px] p-0\"\n\t\t\t\t\t\t\t\t\talign=\"start\"\n\t\t\t\t\t\t\t\t\tsideOffset={8}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Command shouldFilter={false}>\n\t\t\t\t\t\t\t\t\t\t<div className=\"relative\">\n\t\t\t\t\t\t\t\t\t\t\t<CommandInput\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Find Service...\"\n\t\t\t\t\t\t\t\t\t\t\t\tvalue={serviceSearch}\n\t\t\t\t\t\t\t\t\t\t\t\tonValueChange={setServiceSearch}\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-full focus-visible:ring-0\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t<kbd className=\"pointer-events-none h-5 select-none absolute right-2 top-1/2 -translate-y-1/2 items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium opacity-100 flex\">\n\t\t\t\t\t\t\t\t\t\t\t\tEsc\n\t\t\t\t\t\t\t\t\t\t\t</kbd>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<CommandList>\n\t\t\t\t\t\t\t\t\t\t\t<CommandEmpty>No services found.</CommandEmpty>\n\t\t\t\t\t\t\t\t\t\t\t<CommandGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t<ScrollArea className=\"h-[300px]\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{filteredServices.map((service) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst isSelected = service.id === serviceId;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={service.id}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={service.id}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonSelect={() => handleServiceSelect(service)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center justify-between py-2 cursor-pointer\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center justify-center size-8 rounded-md bg-muted\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{getServiceIcon(service.type)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-medium\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{service.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-xs text-muted-foreground capitalize\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{service.type}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{isSelected && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Check className=\"size-4 text-primary\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t\t\t\t</ScrollArea>\n\t\t\t\t\t\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t\t\t\t\t\t</CommandList>\n\t\t\t\t\t\t\t\t\t</Command>\n\t\t\t\t\t\t\t\t</PopoverContent>\n\t\t\t\t\t\t\t</Popover>\n\n\t\t\t\t\t\t\t{/* Close button to go back to environment */}\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\tclassName=\"size-7 ml-1\"\n\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\trouter.push(\n\t\t\t\t\t\t\t\t\t\t`/dashboard/project/${projectId}/environment/${environmentId}`,\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<X className=\"size-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</header>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/shared/alert-block.tsx",
    "content": "import { AlertCircle, AlertTriangle, CheckCircle2, Info } from \"lucide-react\";\nimport { cn } from \"@/lib/utils\";\n\ninterface Props extends React.ComponentPropsWithoutRef<\"div\"> {\n\ticon?: React.ReactNode;\n\ttype?: \"info\" | \"success\" | \"warning\" | \"error\";\n}\n\nconst iconMap = {\n\tinfo: {\n\t\tclassName: \"bg-blue-50 dark:bg-blue-950 text-blue-600 dark:text-blue-400\",\n\t\ticon: Info,\n\t},\n\tsuccess: {\n\t\tclassName:\n\t\t\t\"bg-green-50 dark:bg-green-950 text-green-600 dark:text-green-400\",\n\t\ticon: CheckCircle2,\n\t},\n\twarning: {\n\t\tclassName:\n\t\t\t\"bg-orange-50 dark:bg-orange-950 text-orange-600 dark:text-orange-400\",\n\t\ticon: AlertCircle,\n\t},\n\terror: {\n\t\tclassName: \"bg-red-50 dark:bg-red-950 text-red-600 dark:text-red-400\",\n\t\ticon: AlertTriangle,\n\t},\n};\n\nexport function AlertBlock({\n\ttype = \"info\",\n\ticon,\n\tchildren,\n\tclassName,\n\t...props\n}: Props) {\n\tconst { className: iconClassName, icon: Icon } = iconMap[type];\n\treturn (\n\t\t<div\n\t\t\t{...props}\n\t\t\tclassName={cn(\n\t\t\t\t\"flex items-start flex-row gap-4 rounded-lg p-2\",\n\t\t\t\ticonClassName,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t<div className=\"flex-shrink-0 mt-0.5\">\n\t\t\t\t{icon || <Icon className=\"text-current\" />}\n\t\t\t</div>\n\t\t\t<div className=\"flex-1 min-w-0\">\n\t\t\t\t<span className=\"text-sm text-current break-words overflow-wrap-anywhere whitespace-pre-wrap\">\n\t\t\t\t\t{children}\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"
  },
  {
    "path": "apps/dokploy/components/shared/breadcrumb-sidebar.tsx",
    "content": "import { ChevronDown } from \"lucide-react\";\nimport Link from \"next/link\";\nimport { Fragment } from \"react\";\nimport {\n\tBreadcrumb,\n\tBreadcrumbItem,\n\tBreadcrumbLink,\n\tBreadcrumbList,\n\tBreadcrumbPage,\n\tBreadcrumbSeparator,\n} from \"@/components/ui/breadcrumb\";\nimport {\n\tDropdownMenu,\n\tDropdownMenuContent,\n\tDropdownMenuItem,\n\tDropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\nimport { Separator } from \"@/components/ui/separator\";\nimport { SidebarTrigger } from \"@/components/ui/sidebar\";\nimport { TimeBadge } from \"@/components/ui/time-badge\";\nimport { api } from \"@/utils/api\";\n\ninterface BreadcrumbEntry {\n\tname: string;\n\thref?: string;\n\tdropdownItems?: {\n\t\tname: string;\n\t\thref: string;\n\t}[];\n}\n\ninterface Props {\n\tlist: BreadcrumbEntry[];\n}\n\nexport const BreadcrumbSidebar = ({ list }: Props) => {\n\tconst { data: isCloud } = api.settings.isCloud.useQuery();\n\n\treturn (\n\t\t<header className=\"flex h-16 shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-[[data-collapsible=icon]]/sidebar-wrapper:h-12\">\n\t\t\t<div className=\"flex items-center justify-between w-full px-4\">\n\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t<SidebarTrigger className=\"-ml-1\" />\n\t\t\t\t\t<Separator orientation=\"vertical\" className=\"mr-2 h-4\" />\n\t\t\t\t\t<Breadcrumb>\n\t\t\t\t\t\t<BreadcrumbList>\n\t\t\t\t\t\t\t{list.map((item, index) => (\n\t\t\t\t\t\t\t\t<Fragment key={`${item.name}-${index}`}>\n\t\t\t\t\t\t\t\t\t<BreadcrumbItem className=\"block\">\n\t\t\t\t\t\t\t\t\t\t{item.dropdownItems && item.dropdownItems.length > 0 ? (\n\t\t\t\t\t\t\t\t\t\t\t<DropdownMenu>\n\t\t\t\t\t\t\t\t\t\t\t\t<DropdownMenuTrigger className=\"flex items-center gap-1 hover:text-foreground transition-colors outline-none\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{item.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ChevronDown className=\"h-4 w-4 opacity-50\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</DropdownMenuTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<DropdownMenuContent align=\"start\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{item.dropdownItems.map((subItem) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DropdownMenuItem key={subItem.href} asChild>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Link href={subItem.href}>{subItem.name}</Link>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t</DropdownMenuContent>\n\t\t\t\t\t\t\t\t\t\t\t</DropdownMenu>\n\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t<BreadcrumbLink href={item?.href} asChild={!!item?.href}>\n\t\t\t\t\t\t\t\t\t\t\t\t{item.href ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Link href={item?.href}>{item?.name}</Link>\n\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<BreadcrumbPage>{item?.name}</BreadcrumbPage>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t</BreadcrumbLink>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</BreadcrumbItem>\n\t\t\t\t\t\t\t\t\t{index + 1 < list.length && (\n\t\t\t\t\t\t\t\t\t\t<BreadcrumbSeparator className=\"block\" />\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</BreadcrumbList>\n\t\t\t\t\t</Breadcrumb>\n\t\t\t\t</div>\n\t\t\t\t{!isCloud && <TimeBadge />}\n\t\t\t</div>\n\t\t</header>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/shared/code-editor.tsx",
    "content": "import {\n\tautocompletion,\n\ttype Completion,\n\ttype CompletionContext,\n\ttype CompletionResult,\n} from \"@codemirror/autocomplete\";\nimport { css } from \"@codemirror/lang-css\";\nimport { json } from \"@codemirror/lang-json\";\nimport { yaml } from \"@codemirror/lang-yaml\";\nimport { StreamLanguage } from \"@codemirror/language\";\nimport { properties } from \"@codemirror/legacy-modes/mode/properties\";\nimport { shell } from \"@codemirror/legacy-modes/mode/shell\";\nimport { search, searchKeymap } from \"@codemirror/search\";\nimport { EditorView, keymap } from \"@codemirror/view\";\nimport { githubDark, githubLight } from \"@uiw/codemirror-theme-github\";\nimport CodeMirror, { type ReactCodeMirrorProps } from \"@uiw/react-codemirror\";\nimport { useTheme } from \"next-themes\";\nimport { cn } from \"@/lib/utils\";\n\n// Docker Compose completion options\nconst dockerComposeServices = [\n\t{ label: \"services\", type: \"keyword\", info: \"Define services\" },\n\t{ label: \"version\", type: \"keyword\", info: \"Specify compose file version\" },\n\t{ label: \"volumes\", type: \"keyword\", info: \"Define volumes\" },\n\t{ label: \"networks\", type: \"keyword\", info: \"Define networks\" },\n\t{ label: \"configs\", type: \"keyword\", info: \"Define configuration files\" },\n\t{ label: \"secrets\", type: \"keyword\", info: \"Define secrets\" },\n].map((opt) => ({\n\t...opt,\n\tapply: (\n\t\tview: EditorView,\n\t\tcompletion: Completion,\n\t\tfrom: number,\n\t\tto: number,\n\t) => {\n\t\tconst insert = `${completion.label}:`;\n\t\tview.dispatch({\n\t\t\tchanges: {\n\t\t\t\tfrom,\n\t\t\t\tto,\n\t\t\t\tinsert,\n\t\t\t},\n\t\t\tselection: { anchor: from + insert.length },\n\t\t});\n\t},\n}));\n\nconst dockerComposeServiceOptions = [\n\t{\n\t\tlabel: \"image\",\n\t\ttype: \"keyword\",\n\t\tinfo: \"Specify the image to start the container from\",\n\t},\n\t{ label: \"build\", type: \"keyword\", info: \"Build configuration\" },\n\t{ label: \"command\", type: \"keyword\", info: \"Override the default command\" },\n\t{ label: \"container_name\", type: \"keyword\", info: \"Custom container name\" },\n\t{\n\t\tlabel: \"depends_on\",\n\t\ttype: \"keyword\",\n\t\tinfo: \"Express dependency between services\",\n\t},\n\t{ label: \"environment\", type: \"keyword\", info: \"Add environment variables\" },\n\t{\n\t\tlabel: \"env_file\",\n\t\ttype: \"keyword\",\n\t\tinfo: \"Add environment variables from a file\",\n\t},\n\t{\n\t\tlabel: \"expose\",\n\t\ttype: \"keyword\",\n\t\tinfo: \"Expose ports without publishing them\",\n\t},\n\t{ label: \"ports\", type: \"keyword\", info: \"Expose ports\" },\n\t{\n\t\tlabel: \"volumes\",\n\t\ttype: \"keyword\",\n\t\tinfo: \"Mount host paths or named volumes\",\n\t},\n\t{ label: \"restart\", type: \"keyword\", info: \"Restart policy\" },\n\t{ label: \"networks\", type: \"keyword\", info: \"Networks to join\" },\n].map((opt) => ({\n\t...opt,\n\tapply: (\n\t\tview: EditorView,\n\t\tcompletion: Completion,\n\t\tfrom: number,\n\t\tto: number,\n\t) => {\n\t\tconst insert = `${completion.label}: `;\n\t\tview.dispatch({\n\t\t\tchanges: {\n\t\t\t\tfrom,\n\t\t\t\tto,\n\t\t\t\tinsert,\n\t\t\t},\n\t\t\tselection: { anchor: from + insert.length },\n\t\t});\n\t},\n}));\n\nfunction dockerComposeComplete(\n\tcontext: CompletionContext,\n): CompletionResult | null {\n\tconst word = context.matchBefore(/\\w*/);\n\tif (!word || (!word.text && !context.explicit)) return null;\n\n\t// Check if we're at the root level\n\tconst line = context.state.doc.lineAt(context.pos);\n\tconst indentation = /^\\s*/.exec(line.text)?.[0].length || 0;\n\n\t// If we're at the root level\n\tif (indentation === 0) {\n\t\treturn {\n\t\t\tfrom: word.from,\n\t\t\toptions: dockerComposeServices,\n\t\t\tvalidFor: /^\\w*$/,\n\t\t};\n\t}\n\n\t// If we're inside a service definition\n\tif (indentation === 4) {\n\t\treturn {\n\t\t\tfrom: word.from,\n\t\t\toptions: dockerComposeServiceOptions,\n\t\t\tvalidFor: /^\\w*$/,\n\t\t};\n\t}\n\n\treturn null;\n}\n\ninterface Props extends ReactCodeMirrorProps {\n\twrapperClassName?: string;\n\tdisabled?: boolean;\n\tlanguage?: \"yaml\" | \"json\" | \"properties\" | \"shell\" | \"css\";\n\tlineWrapping?: boolean;\n\tlineNumbers?: boolean;\n}\n\nexport const CodeEditor = ({\n\tclassName,\n\twrapperClassName,\n\tlanguage = \"yaml\",\n\tlineNumbers = true,\n\t...props\n}: Props) => {\n\tconst { resolvedTheme } = useTheme();\n\treturn (\n\t\t<div className={cn(\"overflow-auto\", wrapperClassName)}>\n\t\t\t<CodeMirror\n\t\t\t\tbasicSetup={{\n\t\t\t\t\tlineNumbers,\n\t\t\t\t\tfoldGutter: true,\n\t\t\t\t\thighlightSelectionMatches: true,\n\t\t\t\t\thighlightActiveLine: !props.disabled,\n\t\t\t\t\tallowMultipleSelections: true,\n\t\t\t\t}}\n\t\t\t\ttheme={resolvedTheme === \"dark\" ? githubDark : githubLight}\n\t\t\t\textensions={[\n\t\t\t\t\tsearch(),\n\t\t\t\t\tkeymap.of(searchKeymap),\n\t\t\t\t\tlanguage === \"yaml\"\n\t\t\t\t\t\t? yaml()\n\t\t\t\t\t\t: language === \"json\"\n\t\t\t\t\t\t\t? json()\n\t\t\t\t\t\t\t: language === \"css\"\n\t\t\t\t\t\t\t\t? css()\n\t\t\t\t\t\t\t\t: language === \"shell\"\n\t\t\t\t\t\t\t\t\t? StreamLanguage.define(shell)\n\t\t\t\t\t\t\t\t\t: StreamLanguage.define(properties),\n\t\t\t\t\tprops.lineWrapping ? EditorView.lineWrapping : [],\n\t\t\t\t\tlanguage === \"yaml\"\n\t\t\t\t\t\t? autocompletion({\n\t\t\t\t\t\t\t\toverride: [dockerComposeComplete],\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t: [],\n\t\t\t\t]}\n\t\t\t\t{...props}\n\t\t\t\teditable={!props.disabled}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"w-full h-full text-sm leading-relaxed relative\",\n\t\t\t\t\t`cm-theme-${resolvedTheme}`,\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{props.disabled && (\n\t\t\t\t\t<div className=\"absolute top-0 rounded-md left-0 w-full h-full  flex items-center justify-center z-[10] [background:var(--overlay)] h-full\" />\n\t\t\t\t)}\n\t\t\t</CodeMirror>\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/shared/compose-spec.json",
    "content": "{\n\t\"$schema\": \"https://json-schema.org/draft/2019-09/schema#\",\n\t\"id\": \"compose_spec.json\",\n\t\"type\": \"object\",\n\t\"title\": \"Compose Specification\",\n\t\"description\": \"The Compose file is a YAML file defining a multi-containers based application.\",\n\n\t\"properties\": {\n\t\t\"version\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"description\": \"declared for backward compatibility, ignored.\"\n\t\t},\n\n\t\t\"name\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"description\": \"define the Compose project name, until user defines one explicitly.\"\n\t\t},\n\n\t\t\"include\": {\n\t\t\t\"type\": \"array\",\n\t\t\t\"items\": {\n\t\t\t\t\"$ref\": \"#/definitions/include\"\n\t\t\t},\n\t\t\t\"description\": \"compose sub-projects to be included.\"\n\t\t},\n\n\t\t\"services\": {\n\t\t\t\"id\": \"#/properties/services\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"patternProperties\": {\n\t\t\t\t\"^[a-zA-Z0-9._-]+$\": {\n\t\t\t\t\t\"$ref\": \"#/definitions/service\"\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"additionalProperties\": false\n\t\t},\n\n\t\t\"networks\": {\n\t\t\t\"id\": \"#/properties/networks\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"patternProperties\": {\n\t\t\t\t\"^[a-zA-Z0-9._-]+$\": {\n\t\t\t\t\t\"$ref\": \"#/definitions/network\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t\"volumes\": {\n\t\t\t\"id\": \"#/properties/volumes\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"patternProperties\": {\n\t\t\t\t\"^[a-zA-Z0-9._-]+$\": {\n\t\t\t\t\t\"$ref\": \"#/definitions/volume\"\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"additionalProperties\": false\n\t\t},\n\n\t\t\"secrets\": {\n\t\t\t\"id\": \"#/properties/secrets\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"patternProperties\": {\n\t\t\t\t\"^[a-zA-Z0-9._-]+$\": {\n\t\t\t\t\t\"$ref\": \"#/definitions/secret\"\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"additionalProperties\": false\n\t\t},\n\n\t\t\"configs\": {\n\t\t\t\"id\": \"#/properties/configs\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"patternProperties\": {\n\t\t\t\t\"^[a-zA-Z0-9._-]+$\": {\n\t\t\t\t\t\"$ref\": \"#/definitions/config\"\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"additionalProperties\": false\n\t\t}\n\t},\n\n\t\"patternProperties\": { \"^x-\": {} },\n\t\"additionalProperties\": false,\n\n\t\"definitions\": {\n\t\t\"service\": {\n\t\t\t\"id\": \"#/definitions/service\",\n\t\t\t\"type\": \"object\",\n\n\t\t\t\"properties\": {\n\t\t\t\t\"develop\": { \"$ref\": \"#/definitions/development\" },\n\t\t\t\t\"deploy\": { \"$ref\": \"#/definitions/deployment\" },\n\t\t\t\t\"annotations\": { \"$ref\": \"#/definitions/list_or_dict\" },\n\t\t\t\t\"attach\": { \"type\": [\"boolean\", \"string\"] },\n\t\t\t\t\"build\": {\n\t\t\t\t\t\"oneOf\": [\n\t\t\t\t\t\t{ \"type\": \"string\" },\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\t\"context\": { \"type\": \"string\" },\n\t\t\t\t\t\t\t\t\"dockerfile\": { \"type\": \"string\" },\n\t\t\t\t\t\t\t\t\"dockerfile_inline\": { \"type\": \"string\" },\n\t\t\t\t\t\t\t\t\"entitlements\": {\n\t\t\t\t\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\t\t\t\t\"items\": { \"type\": \"string\" }\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"args\": { \"$ref\": \"#/definitions/list_or_dict\" },\n\t\t\t\t\t\t\t\t\"ssh\": { \"$ref\": \"#/definitions/list_or_dict\" },\n\t\t\t\t\t\t\t\t\"labels\": { \"$ref\": \"#/definitions/list_or_dict\" },\n\t\t\t\t\t\t\t\t\"cache_from\": {\n\t\t\t\t\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\t\t\t\t\"items\": { \"type\": \"string\" }\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"cache_to\": { \"type\": \"array\", \"items\": { \"type\": \"string\" } },\n\t\t\t\t\t\t\t\t\"no_cache\": { \"type\": [\"boolean\", \"string\"] },\n\t\t\t\t\t\t\t\t\"additional_contexts\": { \"$ref\": \"#/definitions/list_or_dict\" },\n\t\t\t\t\t\t\t\t\"network\": { \"type\": \"string\" },\n\t\t\t\t\t\t\t\t\"pull\": { \"type\": [\"boolean\", \"string\"] },\n\t\t\t\t\t\t\t\t\"target\": { \"type\": \"string\" },\n\t\t\t\t\t\t\t\t\"shm_size\": { \"type\": [\"integer\", \"string\"] },\n\t\t\t\t\t\t\t\t\"extra_hosts\": { \"$ref\": \"#/definitions/extra_hosts\" },\n\t\t\t\t\t\t\t\t\"isolation\": { \"type\": \"string\" },\n\t\t\t\t\t\t\t\t\"privileged\": { \"type\": [\"boolean\", \"string\"] },\n\t\t\t\t\t\t\t\t\"secrets\": { \"$ref\": \"#/definitions/service_config_or_secret\" },\n\t\t\t\t\t\t\t\t\"tags\": { \"type\": \"array\", \"items\": { \"type\": \"string\" } },\n\t\t\t\t\t\t\t\t\"ulimits\": { \"$ref\": \"#/definitions/ulimits\" },\n\t\t\t\t\t\t\t\t\"platforms\": { \"type\": \"array\", \"items\": { \"type\": \"string\" } }\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"additionalProperties\": false,\n\t\t\t\t\t\t\t\"patternProperties\": { \"^x-\": {} }\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t\"blkio_config\": {\n\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\"device_read_bps\": {\n\t\t\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\t\t\"items\": { \"$ref\": \"#/definitions/blkio_limit\" }\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"device_read_iops\": {\n\t\t\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\t\t\"items\": { \"$ref\": \"#/definitions/blkio_limit\" }\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"device_write_bps\": {\n\t\t\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\t\t\"items\": { \"$ref\": \"#/definitions/blkio_limit\" }\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"device_write_iops\": {\n\t\t\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\t\t\"items\": { \"$ref\": \"#/definitions/blkio_limit\" }\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"weight\": { \"type\": [\"integer\", \"string\"] },\n\t\t\t\t\t\t\"weight_device\": {\n\t\t\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\t\t\"items\": { \"$ref\": \"#/definitions/blkio_weight\" }\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"additionalProperties\": false\n\t\t\t\t},\n\t\t\t\t\"cap_add\": {\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"items\": { \"type\": \"string\" },\n\t\t\t\t\t\"uniqueItems\": true\n\t\t\t\t},\n\t\t\t\t\"cap_drop\": {\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"items\": { \"type\": \"string\" },\n\t\t\t\t\t\"uniqueItems\": true\n\t\t\t\t},\n\t\t\t\t\"cgroup\": { \"type\": \"string\", \"enum\": [\"host\", \"private\"] },\n\t\t\t\t\"cgroup_parent\": { \"type\": \"string\" },\n\t\t\t\t\"command\": { \"$ref\": \"#/definitions/command\" },\n\t\t\t\t\"configs\": { \"$ref\": \"#/definitions/service_config_or_secret\" },\n\t\t\t\t\"container_name\": { \"type\": \"string\" },\n\t\t\t\t\"cpu_count\": {\n\t\t\t\t\t\"oneOf\": [{ \"type\": \"string\" }, { \"type\": \"integer\", \"minimum\": 0 }]\n\t\t\t\t},\n\t\t\t\t\"cpu_percent\": {\n\t\t\t\t\t\"oneOf\": [\n\t\t\t\t\t\t{ \"type\": \"string\" },\n\t\t\t\t\t\t{ \"type\": \"integer\", \"minimum\": 0, \"maximum\": 100 }\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t\"cpu_shares\": { \"type\": [\"number\", \"string\"] },\n\t\t\t\t\"cpu_quota\": { \"type\": [\"number\", \"string\"] },\n\t\t\t\t\"cpu_period\": { \"type\": [\"number\", \"string\"] },\n\t\t\t\t\"cpu_rt_period\": { \"type\": [\"number\", \"string\"] },\n\t\t\t\t\"cpu_rt_runtime\": { \"type\": [\"number\", \"string\"] },\n\t\t\t\t\"cpus\": { \"type\": [\"number\", \"string\"] },\n\t\t\t\t\"cpuset\": { \"type\": \"string\" },\n\t\t\t\t\"credential_spec\": {\n\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\"config\": { \"type\": \"string\" },\n\t\t\t\t\t\t\"file\": { \"type\": \"string\" },\n\t\t\t\t\t\t\"registry\": { \"type\": \"string\" }\n\t\t\t\t\t},\n\t\t\t\t\t\"additionalProperties\": false,\n\t\t\t\t\t\"patternProperties\": { \"^x-\": {} }\n\t\t\t\t},\n\t\t\t\t\"depends_on\": {\n\t\t\t\t\t\"oneOf\": [\n\t\t\t\t\t\t{ \"$ref\": \"#/definitions/list_of_strings\" },\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\"additionalProperties\": false,\n\t\t\t\t\t\t\t\"patternProperties\": {\n\t\t\t\t\t\t\t\t\"^[a-zA-Z0-9._-]+$\": {\n\t\t\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\t\t\"additionalProperties\": false,\n\t\t\t\t\t\t\t\t\t\"patternProperties\": { \"^x-\": {} },\n\t\t\t\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\t\t\t\"restart\": { \"type\": [\"boolean\", \"string\"] },\n\t\t\t\t\t\t\t\t\t\t\"required\": {\n\t\t\t\t\t\t\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\t\t\t\t\t\t\"default\": true\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"condition\": {\n\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\t\t\t\t\"enum\": [\n\t\t\t\t\t\t\t\t\t\t\t\t\"service_started\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"service_healthy\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"service_completed_successfully\"\n\t\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"required\": [\"condition\"]\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t\"device_cgroup_rules\": { \"$ref\": \"#/definitions/list_of_strings\" },\n\t\t\t\t\"devices\": {\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"items\": {\n\t\t\t\t\t\t\"oneOf\": [\n\t\t\t\t\t\t\t{ \"type\": \"string\" },\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\t\"required\": [\"source\"],\n\t\t\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\t\t\"source\": { \"type\": \"string\" },\n\t\t\t\t\t\t\t\t\t\"target\": { \"type\": \"string\" },\n\t\t\t\t\t\t\t\t\t\"permissions\": { \"type\": \"string\" }\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"additionalProperties\": false,\n\t\t\t\t\t\t\t\t\"patternProperties\": { \"^x-\": {} }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"dns\": { \"$ref\": \"#/definitions/string_or_list\" },\n\t\t\t\t\"dns_opt\": {\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"items\": { \"type\": \"string\" },\n\t\t\t\t\t\"uniqueItems\": true\n\t\t\t\t},\n\t\t\t\t\"dns_search\": { \"$ref\": \"#/definitions/string_or_list\" },\n\t\t\t\t\"domainname\": { \"type\": \"string\" },\n\t\t\t\t\"entrypoint\": { \"$ref\": \"#/definitions/command\" },\n\t\t\t\t\"env_file\": { \"$ref\": \"#/definitions/env_file\" },\n\t\t\t\t\"label_file\": { \"$ref\": \"#/definitions/label_file\" },\n\t\t\t\t\"environment\": { \"$ref\": \"#/definitions/list_or_dict\" },\n\n\t\t\t\t\"expose\": {\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"items\": {\n\t\t\t\t\t\t\"type\": [\"string\", \"number\"],\n\t\t\t\t\t\t\"format\": \"expose\"\n\t\t\t\t\t},\n\t\t\t\t\t\"uniqueItems\": true\n\t\t\t\t},\n\t\t\t\t\"extends\": {\n\t\t\t\t\t\"oneOf\": [\n\t\t\t\t\t\t{ \"type\": \"string\" },\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"type\": \"object\",\n\n\t\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\t\"service\": { \"type\": \"string\" },\n\t\t\t\t\t\t\t\t\"file\": { \"type\": \"string\" }\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"required\": [\"service\"],\n\t\t\t\t\t\t\t\"additionalProperties\": false\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t\"external_links\": {\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"items\": { \"type\": \"string\" },\n\t\t\t\t\t\"uniqueItems\": true\n\t\t\t\t},\n\t\t\t\t\"extra_hosts\": { \"$ref\": \"#/definitions/extra_hosts\" },\n\t\t\t\t\"gpus\": { \"$ref\": \"#/definitions/gpus\" },\n\t\t\t\t\"group_add\": {\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"items\": {\n\t\t\t\t\t\t\"type\": [\"string\", \"number\"]\n\t\t\t\t\t},\n\t\t\t\t\t\"uniqueItems\": true\n\t\t\t\t},\n\t\t\t\t\"healthcheck\": { \"$ref\": \"#/definitions/healthcheck\" },\n\t\t\t\t\"hostname\": { \"type\": \"string\" },\n\t\t\t\t\"image\": { \"type\": \"string\" },\n\t\t\t\t\"init\": { \"type\": [\"boolean\", \"string\"] },\n\t\t\t\t\"ipc\": { \"type\": \"string\" },\n\t\t\t\t\"isolation\": { \"type\": \"string\" },\n\t\t\t\t\"labels\": { \"$ref\": \"#/definitions/list_or_dict\" },\n\t\t\t\t\"links\": {\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"items\": { \"type\": \"string\" },\n\t\t\t\t\t\"uniqueItems\": true\n\t\t\t\t},\n\t\t\t\t\"logging\": {\n\t\t\t\t\t\"type\": \"object\",\n\n\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\"driver\": { \"type\": \"string\" },\n\t\t\t\t\t\t\"options\": {\n\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\"patternProperties\": {\n\t\t\t\t\t\t\t\t\"^.+$\": { \"type\": [\"string\", \"number\", \"null\"] }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"additionalProperties\": false,\n\t\t\t\t\t\"patternProperties\": { \"^x-\": {} }\n\t\t\t\t},\n\t\t\t\t\"mac_address\": { \"type\": \"string\" },\n\t\t\t\t\"mem_limit\": { \"type\": [\"number\", \"string\"] },\n\t\t\t\t\"mem_reservation\": { \"type\": [\"string\", \"integer\"] },\n\t\t\t\t\"mem_swappiness\": { \"type\": [\"integer\", \"string\"] },\n\t\t\t\t\"memswap_limit\": { \"type\": [\"number\", \"string\"] },\n\t\t\t\t\"network_mode\": { \"type\": \"string\" },\n\t\t\t\t\"networks\": {\n\t\t\t\t\t\"oneOf\": [\n\t\t\t\t\t\t{ \"$ref\": \"#/definitions/list_of_strings\" },\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\"patternProperties\": {\n\t\t\t\t\t\t\t\t\"^[a-zA-Z0-9._-]+$\": {\n\t\t\t\t\t\t\t\t\t\"oneOf\": [\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\"aliases\": { \"$ref\": \"#/definitions/list_of_strings\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\"ipv4_address\": { \"type\": \"string\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\"ipv6_address\": { \"type\": \"string\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\"link_local_ips\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"$ref\": \"#/definitions/list_of_strings\"\n\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\"mac_address\": { \"type\": \"string\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\"driver_opts\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"patternProperties\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"^.+$\": { \"type\": [\"string\", \"number\"] }\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\"priority\": { \"type\": \"number\" }\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\"additionalProperties\": false,\n\t\t\t\t\t\t\t\t\t\t\t\"patternProperties\": { \"^x-\": {} }\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t{ \"type\": \"null\" }\n\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"additionalProperties\": false\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t\"oom_kill_disable\": { \"type\": [\"boolean\", \"string\"] },\n\t\t\t\t\"oom_score_adj\": {\n\t\t\t\t\t\"oneOf\": [\n\t\t\t\t\t\t{ \"type\": \"string\" },\n\t\t\t\t\t\t{ \"type\": \"integer\", \"minimum\": -1000, \"maximum\": 1000 }\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t\"pid\": { \"type\": [\"string\", \"null\"] },\n\t\t\t\t\"pids_limit\": { \"type\": [\"number\", \"string\"] },\n\t\t\t\t\"platform\": { \"type\": \"string\" },\n\t\t\t\t\"ports\": {\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"items\": {\n\t\t\t\t\t\t\"oneOf\": [\n\t\t\t\t\t\t\t{ \"type\": \"number\" },\n\t\t\t\t\t\t\t{ \"type\": \"string\" },\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\t\t\"name\": { \"type\": \"string\" },\n\t\t\t\t\t\t\t\t\t\"mode\": { \"type\": \"string\" },\n\t\t\t\t\t\t\t\t\t\"host_ip\": { \"type\": \"string\" },\n\t\t\t\t\t\t\t\t\t\"target\": { \"type\": [\"integer\", \"string\"] },\n\t\t\t\t\t\t\t\t\t\"published\": { \"type\": [\"string\", \"integer\"] },\n\t\t\t\t\t\t\t\t\t\"protocol\": { \"type\": \"string\" },\n\t\t\t\t\t\t\t\t\t\"app_protocol\": { \"type\": \"string\" }\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"additionalProperties\": false,\n\t\t\t\t\t\t\t\t\"patternProperties\": { \"^x-\": {} }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t]\n\t\t\t\t\t},\n\t\t\t\t\t\"uniqueItems\": true\n\t\t\t\t},\n\t\t\t\t\"post_start\": {\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"items\": { \"$ref\": \"#/definitions/service_hook\" }\n\t\t\t\t},\n\t\t\t\t\"pre_stop\": {\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"items\": { \"$ref\": \"#/definitions/service_hook\" }\n\t\t\t\t},\n\t\t\t\t\"privileged\": { \"type\": [\"boolean\", \"string\"] },\n\t\t\t\t\"profiles\": { \"$ref\": \"#/definitions/list_of_strings\" },\n\t\t\t\t\"pull_policy\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"enum\": [\"always\", \"never\", \"if_not_present\", \"build\", \"missing\"]\n\t\t\t\t},\n\t\t\t\t\"read_only\": { \"type\": [\"boolean\", \"string\"] },\n\t\t\t\t\"restart\": { \"type\": \"string\" },\n\t\t\t\t\"runtime\": {\n\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t},\n\t\t\t\t\"scale\": {\n\t\t\t\t\t\"type\": [\"integer\", \"string\"]\n\t\t\t\t},\n\t\t\t\t\"security_opt\": {\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"items\": { \"type\": \"string\" },\n\t\t\t\t\t\"uniqueItems\": true\n\t\t\t\t},\n\t\t\t\t\"shm_size\": { \"type\": [\"number\", \"string\"] },\n\t\t\t\t\"secrets\": { \"$ref\": \"#/definitions/service_config_or_secret\" },\n\t\t\t\t\"sysctls\": { \"$ref\": \"#/definitions/list_or_dict\" },\n\t\t\t\t\"stdin_open\": { \"type\": [\"boolean\", \"string\"] },\n\t\t\t\t\"stop_grace_period\": { \"type\": \"string\" },\n\t\t\t\t\"stop_signal\": { \"type\": \"string\" },\n\t\t\t\t\"storage_opt\": { \"type\": \"object\" },\n\t\t\t\t\"tmpfs\": { \"$ref\": \"#/definitions/string_or_list\" },\n\t\t\t\t\"tty\": { \"type\": [\"boolean\", \"string\"] },\n\t\t\t\t\"ulimits\": { \"$ref\": \"#/definitions/ulimits\" },\n\t\t\t\t\"user\": { \"type\": \"string\" },\n\t\t\t\t\"uts\": { \"type\": \"string\" },\n\t\t\t\t\"userns_mode\": { \"type\": \"string\" },\n\t\t\t\t\"volumes\": {\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"items\": {\n\t\t\t\t\t\t\"oneOf\": [\n\t\t\t\t\t\t\t{ \"type\": \"string\" },\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\t\"required\": [\"type\"],\n\t\t\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\t\t\"type\": { \"type\": \"string\" },\n\t\t\t\t\t\t\t\t\t\"source\": { \"type\": \"string\" },\n\t\t\t\t\t\t\t\t\t\"target\": { \"type\": \"string\" },\n\t\t\t\t\t\t\t\t\t\"read_only\": { \"type\": [\"boolean\", \"string\"] },\n\t\t\t\t\t\t\t\t\t\"consistency\": { \"type\": \"string\" },\n\t\t\t\t\t\t\t\t\t\"bind\": {\n\t\t\t\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\t\t\t\t\"propagation\": { \"type\": \"string\" },\n\t\t\t\t\t\t\t\t\t\t\t\"create_host_path\": { \"type\": [\"boolean\", \"string\"] },\n\t\t\t\t\t\t\t\t\t\t\t\"recursive\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"enum\": [\"enabled\", \"disabled\", \"writable\", \"readonly\"]\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\"selinux\": { \"type\": \"string\", \"enum\": [\"z\", \"Z\"] }\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"additionalProperties\": false,\n\t\t\t\t\t\t\t\t\t\t\"patternProperties\": { \"^x-\": {} }\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"volume\": {\n\t\t\t\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\t\t\t\t\"nocopy\": { \"type\": [\"boolean\", \"string\"] },\n\t\t\t\t\t\t\t\t\t\t\t\"subpath\": { \"type\": \"string\" }\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"additionalProperties\": false,\n\t\t\t\t\t\t\t\t\t\t\"patternProperties\": { \"^x-\": {} }\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"tmpfs\": {\n\t\t\t\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\t\t\t\t\"size\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\"oneOf\": [\n\t\t\t\t\t\t\t\t\t\t\t\t\t{ \"type\": \"integer\", \"minimum\": 0 },\n\t\t\t\t\t\t\t\t\t\t\t\t\t{ \"type\": \"string\" }\n\t\t\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\"mode\": { \"type\": [\"number\", \"string\"] }\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"additionalProperties\": false,\n\t\t\t\t\t\t\t\t\t\t\"patternProperties\": { \"^x-\": {} }\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"additionalProperties\": false,\n\t\t\t\t\t\t\t\t\"patternProperties\": { \"^x-\": {} }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t]\n\t\t\t\t\t},\n\t\t\t\t\t\"uniqueItems\": true\n\t\t\t\t},\n\t\t\t\t\"volumes_from\": {\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"items\": { \"type\": \"string\" },\n\t\t\t\t\t\"uniqueItems\": true\n\t\t\t\t},\n\t\t\t\t\"working_dir\": { \"type\": \"string\" }\n\t\t\t},\n\t\t\t\"patternProperties\": { \"^x-\": {} },\n\t\t\t\"additionalProperties\": false\n\t\t},\n\n\t\t\"healthcheck\": {\n\t\t\t\"id\": \"#/definitions/healthcheck\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"properties\": {\n\t\t\t\t\"disable\": { \"type\": [\"boolean\", \"string\"] },\n\t\t\t\t\"interval\": { \"type\": \"string\" },\n\t\t\t\t\"retries\": { \"type\": [\"number\", \"string\"] },\n\t\t\t\t\"test\": {\n\t\t\t\t\t\"oneOf\": [\n\t\t\t\t\t\t{ \"type\": \"string\" },\n\t\t\t\t\t\t{ \"type\": \"array\", \"items\": { \"type\": \"string\" } }\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t\"timeout\": { \"type\": \"string\" },\n\t\t\t\t\"start_period\": { \"type\": \"string\" },\n\t\t\t\t\"start_interval\": { \"type\": \"string\" }\n\t\t\t},\n\t\t\t\"additionalProperties\": false,\n\t\t\t\"patternProperties\": { \"^x-\": {} }\n\t\t},\n\t\t\"development\": {\n\t\t\t\"id\": \"#/definitions/development\",\n\t\t\t\"type\": [\"object\", \"null\"],\n\t\t\t\"properties\": {\n\t\t\t\t\"watch\": {\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"items\": {\n\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\"required\": [\"path\", \"action\"],\n\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\"ignore\": { \"type\": \"array\", \"items\": { \"type\": \"string\" } },\n\t\t\t\t\t\t\t\"path\": { \"type\": \"string\" },\n\t\t\t\t\t\t\t\"action\": {\n\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\t\"enum\": [\n\t\t\t\t\t\t\t\t\t\"rebuild\",\n\t\t\t\t\t\t\t\t\t\"sync\",\n\t\t\t\t\t\t\t\t\t\"restart\",\n\t\t\t\t\t\t\t\t\t\"sync+restart\",\n\t\t\t\t\t\t\t\t\t\"sync+exec\"\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"target\": { \"type\": \"string\" },\n\t\t\t\t\t\t\t\"exec\": { \"$ref\": \"#/definitions/service_hook\" }\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"additionalProperties\": false,\n\t\t\t\t\t\t\"patternProperties\": { \"^x-\": {} }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"additionalProperties\": false,\n\t\t\t\"patternProperties\": { \"^x-\": {} }\n\t\t},\n\t\t\"deployment\": {\n\t\t\t\"id\": \"#/definitions/deployment\",\n\t\t\t\"type\": [\"object\", \"null\"],\n\t\t\t\"properties\": {\n\t\t\t\t\"mode\": { \"type\": \"string\" },\n\t\t\t\t\"endpoint_mode\": { \"type\": \"string\" },\n\t\t\t\t\"replicas\": { \"type\": [\"integer\", \"string\"] },\n\t\t\t\t\"labels\": { \"$ref\": \"#/definitions/list_or_dict\" },\n\t\t\t\t\"rollback_config\": {\n\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\"parallelism\": { \"type\": [\"integer\", \"string\"] },\n\t\t\t\t\t\t\"delay\": { \"type\": \"string\" },\n\t\t\t\t\t\t\"failure_action\": { \"type\": \"string\" },\n\t\t\t\t\t\t\"monitor\": { \"type\": \"string\" },\n\t\t\t\t\t\t\"max_failure_ratio\": { \"type\": [\"number\", \"string\"] },\n\t\t\t\t\t\t\"order\": { \"type\": \"string\", \"enum\": [\"start-first\", \"stop-first\"] }\n\t\t\t\t\t},\n\t\t\t\t\t\"additionalProperties\": false,\n\t\t\t\t\t\"patternProperties\": { \"^x-\": {} }\n\t\t\t\t},\n\t\t\t\t\"update_config\": {\n\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\"parallelism\": { \"type\": [\"integer\", \"string\"] },\n\t\t\t\t\t\t\"delay\": { \"type\": \"string\" },\n\t\t\t\t\t\t\"failure_action\": { \"type\": \"string\" },\n\t\t\t\t\t\t\"monitor\": { \"type\": \"string\" },\n\t\t\t\t\t\t\"max_failure_ratio\": { \"type\": [\"number\", \"string\"] },\n\t\t\t\t\t\t\"order\": { \"type\": \"string\", \"enum\": [\"start-first\", \"stop-first\"] }\n\t\t\t\t\t},\n\t\t\t\t\t\"additionalProperties\": false,\n\t\t\t\t\t\"patternProperties\": { \"^x-\": {} }\n\t\t\t\t},\n\t\t\t\t\"resources\": {\n\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\"limits\": {\n\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\t\"cpus\": { \"type\": [\"number\", \"string\"] },\n\t\t\t\t\t\t\t\t\"memory\": { \"type\": \"string\" },\n\t\t\t\t\t\t\t\t\"pids\": { \"type\": [\"integer\", \"string\"] }\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"additionalProperties\": false,\n\t\t\t\t\t\t\t\"patternProperties\": { \"^x-\": {} }\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"reservations\": {\n\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\t\"cpus\": { \"type\": [\"number\", \"string\"] },\n\t\t\t\t\t\t\t\t\"memory\": { \"type\": \"string\" },\n\t\t\t\t\t\t\t\t\"generic_resources\": {\n\t\t\t\t\t\t\t\t\t\"$ref\": \"#/definitions/generic_resources\"\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"devices\": { \"$ref\": \"#/definitions/devices\" }\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"additionalProperties\": false,\n\t\t\t\t\t\t\t\"patternProperties\": { \"^x-\": {} }\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"additionalProperties\": false,\n\t\t\t\t\t\"patternProperties\": { \"^x-\": {} }\n\t\t\t\t},\n\t\t\t\t\"restart_policy\": {\n\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\"condition\": { \"type\": \"string\" },\n\t\t\t\t\t\t\"delay\": { \"type\": \"string\" },\n\t\t\t\t\t\t\"max_attempts\": { \"type\": [\"integer\", \"string\"] },\n\t\t\t\t\t\t\"window\": { \"type\": \"string\" }\n\t\t\t\t\t},\n\t\t\t\t\t\"additionalProperties\": false,\n\t\t\t\t\t\"patternProperties\": { \"^x-\": {} }\n\t\t\t\t},\n\t\t\t\t\"placement\": {\n\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\"constraints\": { \"type\": \"array\", \"items\": { \"type\": \"string\" } },\n\t\t\t\t\t\t\"preferences\": {\n\t\t\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\t\t\"items\": {\n\t\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\t\t\"spread\": { \"type\": \"string\" }\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"additionalProperties\": false,\n\t\t\t\t\t\t\t\t\"patternProperties\": { \"^x-\": {} }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"max_replicas_per_node\": { \"type\": [\"integer\", \"string\"] }\n\t\t\t\t\t},\n\t\t\t\t\t\"additionalProperties\": false,\n\t\t\t\t\t\"patternProperties\": { \"^x-\": {} }\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"additionalProperties\": false,\n\t\t\t\"patternProperties\": { \"^x-\": {} }\n\t\t},\n\n\t\t\"generic_resources\": {\n\t\t\t\"id\": \"#/definitions/generic_resources\",\n\t\t\t\"type\": \"array\",\n\t\t\t\"items\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"properties\": {\n\t\t\t\t\t\"discrete_resource_spec\": {\n\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\"kind\": { \"type\": \"string\" },\n\t\t\t\t\t\t\t\"value\": { \"type\": [\"number\", \"string\"] }\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"additionalProperties\": false,\n\t\t\t\t\t\t\"patternProperties\": { \"^x-\": {} }\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"additionalProperties\": false,\n\t\t\t\t\"patternProperties\": { \"^x-\": {} }\n\t\t\t}\n\t\t},\n\n\t\t\"devices\": {\n\t\t\t\"id\": \"#/definitions/devices\",\n\t\t\t\"type\": \"array\",\n\t\t\t\"items\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"properties\": {\n\t\t\t\t\t\"capabilities\": { \"$ref\": \"#/definitions/list_of_strings\" },\n\t\t\t\t\t\"count\": { \"type\": [\"string\", \"integer\"] },\n\t\t\t\t\t\"device_ids\": { \"$ref\": \"#/definitions/list_of_strings\" },\n\t\t\t\t\t\"driver\": { \"type\": \"string\" },\n\t\t\t\t\t\"options\": { \"$ref\": \"#/definitions/list_or_dict\" }\n\t\t\t\t},\n\t\t\t\t\"additionalProperties\": false,\n\t\t\t\t\"patternProperties\": { \"^x-\": {} },\n\t\t\t\t\"required\": [\"capabilities\"]\n\t\t\t}\n\t\t},\n\n\t\t\"gpus\": {\n\t\t\t\"id\": \"#/definitions/gpus\",\n\t\t\t\"oneOf\": [\n\t\t\t\t{ \"type\": \"string\", \"enum\": [\"all\"] },\n\t\t\t\t{\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"items\": {\n\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\"capabilities\": { \"$ref\": \"#/definitions/list_of_strings\" },\n\t\t\t\t\t\t\t\"count\": { \"type\": [\"string\", \"integer\"] },\n\t\t\t\t\t\t\t\"device_ids\": { \"$ref\": \"#/definitions/list_of_strings\" },\n\t\t\t\t\t\t\t\"driver\": { \"type\": \"string\" },\n\t\t\t\t\t\t\t\"options\": { \"$ref\": \"#/definitions/list_or_dict\" }\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"additionalProperties\": false,\n\t\t\t\t\t\"patternProperties\": { \"^x-\": {} }\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\n\t\t\"include\": {\n\t\t\t\"id\": \"#/definitions/include\",\n\t\t\t\"oneOf\": [\n\t\t\t\t{ \"type\": \"string\" },\n\t\t\t\t{\n\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\"path\": { \"$ref\": \"#/definitions/string_or_list\" },\n\t\t\t\t\t\t\"env_file\": { \"$ref\": \"#/definitions/string_or_list\" },\n\t\t\t\t\t\t\"project_directory\": { \"type\": \"string\" }\n\t\t\t\t\t},\n\t\t\t\t\t\"additionalProperties\": false\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\n\t\t\"network\": {\n\t\t\t\"id\": \"#/definitions/network\",\n\t\t\t\"type\": [\"object\", \"null\"],\n\t\t\t\"properties\": {\n\t\t\t\t\"name\": { \"type\": \"string\" },\n\t\t\t\t\"driver\": { \"type\": \"string\" },\n\t\t\t\t\"driver_opts\": {\n\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\"patternProperties\": {\n\t\t\t\t\t\t\"^.+$\": { \"type\": [\"string\", \"number\"] }\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"ipam\": {\n\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\"driver\": { \"type\": \"string\" },\n\t\t\t\t\t\t\"config\": {\n\t\t\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\t\t\"items\": {\n\t\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\t\t\"subnet\": { \"type\": \"string\" },\n\t\t\t\t\t\t\t\t\t\"ip_range\": { \"type\": \"string\" },\n\t\t\t\t\t\t\t\t\t\"gateway\": { \"type\": \"string\" },\n\t\t\t\t\t\t\t\t\t\"aux_addresses\": {\n\t\t\t\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\t\t\t\"additionalProperties\": false,\n\t\t\t\t\t\t\t\t\t\t\"patternProperties\": { \"^.+$\": { \"type\": \"string\" } }\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"additionalProperties\": false,\n\t\t\t\t\t\t\t\t\"patternProperties\": { \"^x-\": {} }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"options\": {\n\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\"additionalProperties\": false,\n\t\t\t\t\t\t\t\"patternProperties\": { \"^.+$\": { \"type\": \"string\" } }\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"additionalProperties\": false,\n\t\t\t\t\t\"patternProperties\": { \"^x-\": {} }\n\t\t\t\t},\n\t\t\t\t\"external\": {\n\t\t\t\t\t\"type\": [\"boolean\", \"string\", \"object\"],\n\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\"deprecated\": true,\n\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"additionalProperties\": false,\n\t\t\t\t\t\"patternProperties\": { \"^x-\": {} }\n\t\t\t\t},\n\t\t\t\t\"internal\": { \"type\": [\"boolean\", \"string\"] },\n\t\t\t\t\"enable_ipv4\": { \"type\": [\"boolean\", \"string\"] },\n\t\t\t\t\"enable_ipv6\": { \"type\": [\"boolean\", \"string\"] },\n\t\t\t\t\"attachable\": { \"type\": [\"boolean\", \"string\"] },\n\t\t\t\t\"labels\": { \"$ref\": \"#/definitions/list_or_dict\" }\n\t\t\t},\n\t\t\t\"additionalProperties\": false,\n\t\t\t\"patternProperties\": { \"^x-\": {} }\n\t\t},\n\n\t\t\"volume\": {\n\t\t\t\"id\": \"#/definitions/volume\",\n\t\t\t\"type\": [\"object\", \"null\"],\n\t\t\t\"properties\": {\n\t\t\t\t\"name\": { \"type\": \"string\" },\n\t\t\t\t\"driver\": { \"type\": \"string\" },\n\t\t\t\t\"driver_opts\": {\n\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\"patternProperties\": {\n\t\t\t\t\t\t\"^.+$\": { \"type\": [\"string\", \"number\"] }\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"external\": {\n\t\t\t\t\t\"type\": [\"boolean\", \"string\", \"object\"],\n\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\"deprecated\": true,\n\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"additionalProperties\": false,\n\t\t\t\t\t\"patternProperties\": { \"^x-\": {} }\n\t\t\t\t},\n\t\t\t\t\"labels\": { \"$ref\": \"#/definitions/list_or_dict\" }\n\t\t\t},\n\t\t\t\"additionalProperties\": false,\n\t\t\t\"patternProperties\": { \"^x-\": {} }\n\t\t},\n\n\t\t\"secret\": {\n\t\t\t\"id\": \"#/definitions/secret\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"properties\": {\n\t\t\t\t\"name\": { \"type\": \"string\" },\n\t\t\t\t\"environment\": { \"type\": \"string\" },\n\t\t\t\t\"file\": { \"type\": \"string\" },\n\t\t\t\t\"external\": {\n\t\t\t\t\t\"type\": [\"boolean\", \"string\", \"object\"],\n\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\"name\": { \"type\": \"string\" }\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"labels\": { \"$ref\": \"#/definitions/list_or_dict\" },\n\t\t\t\t\"driver\": { \"type\": \"string\" },\n\t\t\t\t\"driver_opts\": {\n\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\"patternProperties\": {\n\t\t\t\t\t\t\"^.+$\": { \"type\": [\"string\", \"number\"] }\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"template_driver\": { \"type\": \"string\" }\n\t\t\t},\n\t\t\t\"additionalProperties\": false,\n\t\t\t\"patternProperties\": { \"^x-\": {} }\n\t\t},\n\n\t\t\"config\": {\n\t\t\t\"id\": \"#/definitions/config\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"properties\": {\n\t\t\t\t\"name\": { \"type\": \"string\" },\n\t\t\t\t\"content\": { \"type\": \"string\" },\n\t\t\t\t\"environment\": { \"type\": \"string\" },\n\t\t\t\t\"file\": { \"type\": \"string\" },\n\t\t\t\t\"external\": {\n\t\t\t\t\t\"type\": [\"boolean\", \"string\", \"object\"],\n\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\"deprecated\": true,\n\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"labels\": { \"$ref\": \"#/definitions/list_or_dict\" },\n\t\t\t\t\"template_driver\": { \"type\": \"string\" }\n\t\t\t},\n\t\t\t\"additionalProperties\": false,\n\t\t\t\"patternProperties\": { \"^x-\": {} }\n\t\t},\n\n\t\t\"command\": {\n\t\t\t\"oneOf\": [\n\t\t\t\t{ \"type\": \"null\" },\n\t\t\t\t{ \"type\": \"string\" },\n\t\t\t\t{ \"type\": \"array\", \"items\": { \"type\": \"string\" } }\n\t\t\t]\n\t\t},\n\n\t\t\"service_hook\": {\n\t\t\t\"id\": \"#/definitions/service_hook\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"properties\": {\n\t\t\t\t\"command\": { \"$ref\": \"#/definitions/command\" },\n\t\t\t\t\"user\": { \"type\": \"string\" },\n\t\t\t\t\"privileged\": { \"type\": [\"boolean\", \"string\"] },\n\t\t\t\t\"working_dir\": { \"type\": \"string\" },\n\t\t\t\t\"environment\": { \"$ref\": \"#/definitions/list_or_dict\" }\n\t\t\t},\n\t\t\t\"additionalProperties\": false,\n\t\t\t\"patternProperties\": { \"^x-\": {} }\n\t\t},\n\n\t\t\"env_file\": {\n\t\t\t\"oneOf\": [\n\t\t\t\t{ \"type\": \"string\" },\n\t\t\t\t{\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"items\": {\n\t\t\t\t\t\t\"oneOf\": [\n\t\t\t\t\t\t\t{ \"type\": \"string\" },\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\t\"additionalProperties\": false,\n\t\t\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\t\t\"path\": {\n\t\t\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"format\": {\n\t\t\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"required\": {\n\t\t\t\t\t\t\t\t\t\t\"type\": [\"boolean\", \"string\"],\n\t\t\t\t\t\t\t\t\t\t\"default\": true\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"required\": [\"path\"]\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\n\t\t\"label_file\": {\n\t\t\t\"oneOf\": [\n\t\t\t\t{ \"type\": \"string\" },\n\t\t\t\t{\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"items\": { \"type\": \"string\" }\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\n\t\t\"string_or_list\": {\n\t\t\t\"oneOf\": [\n\t\t\t\t{ \"type\": \"string\" },\n\t\t\t\t{ \"$ref\": \"#/definitions/list_of_strings\" }\n\t\t\t]\n\t\t},\n\n\t\t\"list_of_strings\": {\n\t\t\t\"type\": \"array\",\n\t\t\t\"items\": { \"type\": \"string\" },\n\t\t\t\"uniqueItems\": true\n\t\t},\n\n\t\t\"list_or_dict\": {\n\t\t\t\"oneOf\": [\n\t\t\t\t{\n\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\"patternProperties\": {\n\t\t\t\t\t\t\".+\": {\n\t\t\t\t\t\t\t\"type\": [\"string\", \"number\", \"boolean\", \"null\"]\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"additionalProperties\": false\n\t\t\t\t},\n\t\t\t\t{ \"type\": \"array\", \"items\": { \"type\": \"string\" }, \"uniqueItems\": true }\n\t\t\t]\n\t\t},\n\n\t\t\"extra_hosts\": {\n\t\t\t\"oneOf\": [\n\t\t\t\t{\n\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\"patternProperties\": {\n\t\t\t\t\t\t\".+\": {\n\t\t\t\t\t\t\t\"oneOf\": [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\t\t\t\t\"items\": {\n\t\t\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"uniqueItems\": false\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"additionalProperties\": false\n\t\t\t\t},\n\t\t\t\t{ \"type\": \"array\", \"items\": { \"type\": \"string\" }, \"uniqueItems\": true }\n\t\t\t]\n\t\t},\n\n\t\t\"blkio_limit\": {\n\t\t\t\"type\": \"object\",\n\t\t\t\"properties\": {\n\t\t\t\t\"path\": { \"type\": \"string\" },\n\t\t\t\t\"rate\": { \"type\": [\"integer\", \"string\"] }\n\t\t\t},\n\t\t\t\"additionalProperties\": false\n\t\t},\n\t\t\"blkio_weight\": {\n\t\t\t\"type\": \"object\",\n\t\t\t\"properties\": {\n\t\t\t\t\"path\": { \"type\": \"string\" },\n\t\t\t\t\"weight\": { \"type\": [\"integer\", \"string\"] }\n\t\t\t},\n\t\t\t\"additionalProperties\": false\n\t\t},\n\t\t\"service_config_or_secret\": {\n\t\t\t\"type\": \"array\",\n\t\t\t\"items\": {\n\t\t\t\t\"oneOf\": [\n\t\t\t\t\t{ \"type\": \"string\" },\n\t\t\t\t\t{\n\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\"source\": { \"type\": \"string\" },\n\t\t\t\t\t\t\t\"target\": { \"type\": \"string\" },\n\t\t\t\t\t\t\t\"uid\": { \"type\": \"string\" },\n\t\t\t\t\t\t\t\"gid\": { \"type\": \"string\" },\n\t\t\t\t\t\t\t\"mode\": { \"type\": [\"number\", \"string\"] }\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"additionalProperties\": false,\n\t\t\t\t\t\t\"patternProperties\": { \"^x-\": {} }\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t\"ulimits\": {\n\t\t\t\"type\": \"object\",\n\t\t\t\"patternProperties\": {\n\t\t\t\t\"^[a-z]+$\": {\n\t\t\t\t\t\"oneOf\": [\n\t\t\t\t\t\t{ \"type\": [\"integer\", \"string\"] },\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\t\"hard\": { \"type\": [\"integer\", \"string\"] },\n\t\t\t\t\t\t\t\t\"soft\": { \"type\": [\"integer\", \"string\"] }\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"required\": [\"soft\", \"hard\"],\n\t\t\t\t\t\t\t\"additionalProperties\": false,\n\t\t\t\t\t\t\t\"patternProperties\": { \"^x-\": {} }\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"constraints\": {\n\t\t\t\"service\": {\n\t\t\t\t\"id\": \"#/definitions/constraints/service\",\n\t\t\t\t\"anyOf\": [{ \"required\": [\"build\"] }, { \"required\": [\"image\"] }],\n\t\t\t\t\"properties\": {\n\t\t\t\t\t\"build\": {\n\t\t\t\t\t\t\"required\": [\"context\"]\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "apps/dokploy/components/shared/date-tooltip.tsx",
    "content": "import { format, formatDistanceToNow } from \"date-fns\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { cn } from \"@/lib/utils\";\n\ninterface Props {\n\tdate: string;\n\tchildren?: React.ReactNode;\n\tclassName?: string;\n}\n\nexport const DateTooltip = ({ date, children, className }: Props) => {\n\treturn (\n\t\t<TooltipProvider delayDuration={0}>\n\t\t\t<Tooltip>\n\t\t\t\t<TooltipTrigger>\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\"flex items-center text-muted-foreground text-left\",\n\t\t\t\t\t\t\tclassName,\n\t\t\t\t\t\t)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{children}{\" \"}\n\t\t\t\t\t\t{formatDistanceToNow(new Date(date), {\n\t\t\t\t\t\t\taddSuffix: true,\n\t\t\t\t\t\t})}\n\t\t\t\t\t</span>\n\t\t\t\t</TooltipTrigger>\n\t\t\t\t<TooltipContent>{format(new Date(date), \"PPpp\")}</TooltipContent>\n\t\t\t</Tooltip>\n\t\t</TooltipProvider>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/shared/dialog-action.tsx",
    "content": "import {\n\tAlertDialog,\n\tAlertDialogAction,\n\tAlertDialogCancel,\n\tAlertDialogContent,\n\tAlertDialogDescription,\n\tAlertDialogFooter,\n\tAlertDialogHeader,\n\tAlertDialogTitle,\n\tAlertDialogTrigger,\n} from \"@/components/ui/alert-dialog\";\n\ninterface Props {\n\ttitle?: string | React.ReactNode;\n\tdescription?: string | React.ReactNode;\n\tonClick: () => void;\n\tchildren?: React.ReactNode;\n\tdisabled?: boolean;\n\ttype?: \"default\" | \"destructive\";\n}\n\nexport const DialogAction = ({\n\tonClick,\n\tchildren,\n\tdescription,\n\ttitle,\n\tdisabled,\n\ttype,\n}: Props) => {\n\treturn (\n\t\t<AlertDialog>\n\t\t\t<AlertDialogTrigger asChild>{children}</AlertDialogTrigger>\n\t\t\t<AlertDialogContent>\n\t\t\t\t<AlertDialogHeader>\n\t\t\t\t\t<AlertDialogTitle>\n\t\t\t\t\t\t{title ?? \"Are you absolutely sure?\"}\n\t\t\t\t\t</AlertDialogTitle>\n\t\t\t\t\t<AlertDialogDescription>\n\t\t\t\t\t\t{description ?? \"This action cannot be undone.\"}\n\t\t\t\t\t</AlertDialogDescription>\n\t\t\t\t</AlertDialogHeader>\n\t\t\t\t<AlertDialogFooter>\n\t\t\t\t\t<AlertDialogCancel>Cancel</AlertDialogCancel>\n\t\t\t\t\t<AlertDialogAction\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\tonClick={onClick}\n\t\t\t\t\t\tvariant={type ?? \"destructive\"}\n\t\t\t\t\t>\n\t\t\t\t\t\tConfirm\n\t\t\t\t\t</AlertDialogAction>\n\t\t\t\t</AlertDialogFooter>\n\t\t\t</AlertDialogContent>\n\t\t</AlertDialog>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/shared/drawer-logs.tsx",
    "content": "import { Loader2 } from \"lucide-react\";\nimport { useEffect, useRef, useState } from \"react\";\nimport {\n\tSheet,\n\tSheetContent,\n\tSheetDescription,\n\tSheetHeader,\n\tSheetTitle,\n} from \"@/components/ui/sheet\";\nimport { TerminalLine } from \"../dashboard/docker/logs/terminal-line\";\nimport type { LogLine } from \"../dashboard/docker/logs/utils\";\n\ninterface Props {\n\tisOpen: boolean;\n\tonClose: () => void;\n\tfilteredLogs: LogLine[];\n}\n\nexport const DrawerLogs = ({ isOpen, onClose, filteredLogs }: Props) => {\n\tconst scrollRef = useRef<HTMLDivElement>(null);\n\tconst [autoScroll, setAutoScroll] = useState(true);\n\tconst scrollToBottom = () => {\n\t\tif (autoScroll && scrollRef.current) {\n\t\t\tscrollRef.current.scrollTop = scrollRef.current.scrollHeight;\n\t\t}\n\t};\n\n\tconst handleScroll = () => {\n\t\tif (!scrollRef.current) return;\n\n\t\tconst { scrollTop, scrollHeight, clientHeight } = scrollRef.current;\n\t\tconst isAtBottom = Math.abs(scrollHeight - scrollTop - clientHeight) < 10;\n\t\tsetAutoScroll(isAtBottom);\n\t};\n\n\tuseEffect(() => {\n\t\tscrollToBottom();\n\n\t\tif (autoScroll && scrollRef.current) {\n\t\t\tscrollRef.current.scrollTop = scrollRef.current.scrollHeight;\n\t\t}\n\t}, [filteredLogs, autoScroll]);\n\treturn (\n\t\t<Sheet\n\t\t\topen={!!isOpen}\n\t\t\tonOpenChange={() => {\n\t\t\t\tonClose();\n\t\t\t}}\n\t\t>\n\t\t\t<SheetContent className=\"sm:max-w-[740px] flex flex-col\">\n\t\t\t\t<SheetHeader>\n\t\t\t\t\t<SheetTitle>Deployment Logs</SheetTitle>\n\t\t\t\t\t<SheetDescription>Details of the request log entry.</SheetDescription>\n\t\t\t\t</SheetHeader>\n\t\t\t\t<div\n\t\t\t\t\tref={scrollRef}\n\t\t\t\t\tonScroll={handleScroll}\n\t\t\t\t\tclassName=\"h-[720px] overflow-y-auto space-y-0 border p-4 bg-[#fafafa] dark:bg-[#050506] rounded custom-logs-scrollbar\"\n\t\t\t\t>\n\t\t\t\t\t{\" \"}\n\t\t\t\t\t{filteredLogs.length > 0 ? (\n\t\t\t\t\t\tfilteredLogs.map((log: LogLine, index: number) => (\n\t\t\t\t\t\t\t<TerminalLine\n\t\t\t\t\t\t\t\tkey={`${log.rawTimestamp ?? \"\"}-${index}`}\n\t\t\t\t\t\t\t\tlog={log}\n\t\t\t\t\t\t\t\tnoTimestamp\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t))\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<div className=\"flex justify-center items-center h-full text-muted-foreground\">\n\t\t\t\t\t\t\t<Loader2 className=\"h-6 w-6 animate-spin\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</SheetContent>\n\t\t</Sheet>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/shared/focus-shortcut-input.tsx",
    "content": "import { useEffect, useRef } from \"react\";\nimport { Input } from \"@/components/ui/input\";\n\ntype Props = React.ComponentPropsWithoutRef<typeof Input>;\n\nexport const FocusShortcutInput = (props: Props) => {\n\tconst inputRef = useRef<HTMLInputElement | null>(null);\n\n\tuseEffect(() => {\n\t\tconst onKeyDown = (e: KeyboardEvent) => {\n\t\t\tconst isMod = e.metaKey || e.ctrlKey;\n\t\t\tif (!isMod || e.key.toLowerCase() !== \"k\") return;\n\n\t\t\tconst target = e.target as HTMLElement | null;\n\t\t\tif (target) {\n\t\t\t\tconst tag = target.tagName;\n\t\t\t\tif (\n\t\t\t\t\ttarget.isContentEditable ||\n\t\t\t\t\ttag === \"INPUT\" ||\n\t\t\t\t\ttag === \"TEXTAREA\" ||\n\t\t\t\t\ttag === \"SELECT\" ||\n\t\t\t\t\ttarget.getAttribute(\"role\") === \"textbox\"\n\t\t\t\t)\n\t\t\t\t\treturn;\n\t\t\t}\n\n\t\t\te.preventDefault();\n\t\t\tinputRef.current?.focus();\n\t\t};\n\n\t\twindow.addEventListener(\"keydown\", onKeyDown);\n\t\treturn () => window.removeEventListener(\"keydown\", onKeyDown);\n\t}, []);\n\n\treturn <Input {...props} ref={inputRef} />;\n};\n"
  },
  {
    "path": "apps/dokploy/components/shared/logo.tsx",
    "content": "import { cn } from \"@/lib/utils\";\n\ninterface Props {\n\tclassName?: string;\n\tlogoUrl?: string;\n}\n\nexport const Logo = ({ className = \"size-14\", logoUrl }: Props) => {\n\tif (logoUrl) {\n\t\treturn (\n\t\t\t// biome-ignore lint/performance/noImgElement: this is for dynamic logo loading\n\t\t\t<img\n\t\t\t\tsrc={logoUrl}\n\t\t\t\talt=\"Organization Logo\"\n\t\t\t\tclassName={cn(className, \"object-contain rounded-sm\")}\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn (\n\t\t<svg\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\tviewBox=\"0 0 559 446\"\n\t\t\tclassName={className}\n\t\t>\n\t\t\t<path\n\t\t\t\tclassName=\"fill-primary stroke-primary\"\n\t\t\t\td=\"M390 56v12c.1 2.3.5 4 1 6a73 73 0 0 0 12 24c2 2.3 5.7 4 7 7 4 3.4 9.6 6.8 14 9 1.7.6 5.7 1.1 7 2 1.9 1.3 2.9 2.3 0 4v1c-.6 1.8-1.9 3.5-3 5q-3 4-7 7c-4.3 3.2-9.5 6.8-15 7h-1q-2 1.6-5 2h-4c-5.2.7-12.9 2.2-18 0h-6c-1.6 0-3-.8-4-1h-3a17 17 0 0 1-6-2h-1c-2.5-.1-4-1.2-6-2l-4-1c-8.4-2-20.3-6.6-27-12h-1c-4.6-1-9.5-4.3-13.7-6.3s-10.5-3-13.3-6.7h-1c-4-1-8.9-3.5-12-6h-1c-6.8-1.6-13.6-6-20-9-6.5-2.8-14.6-5.7-20-10h-1c-7-1.2-15.4-4-22-6h-97c-5.3 4.3-13.7 4.3-18.7 10.3S90.8 101 88 108c-.4 1.5-.8 2.3-1 4-.2 1.6-.8 4-1 5v51c.2 1.2.8 3.2 1 5 .2 2 .5 3.2 1 5a79 79 0 0 0 6 12c.8.7 1.4 2.2 2 3 1.8 2 4.9 3.4 6 6 9.5 8.3 23.5 10.3 33 18h1c5.1 1.2 12 4.8 16 8h1c4 1 8.9 3.5 12 6h1q4.6 1.2 8 4h1c2 .1 2.6 1.3 4 2 1.6.8 2.7.7 4 2h1q2.5.3 4 2h1c3 .7 6.7 2 9 4h1c4.7.8 13.4 3.1 17 6h1c2.5.1 4 1.3 6 2 1.8.4 3 .8 5 1q3 .4 5 1c1.6-.2 2 0 3 1h1q2.5-.5 4 1h1q2.5-.5 4 1h1c2.2-.2 4.5-.3 6 1h1q4-.4 7 1h45c1.2-.2 3.1-1 5-1h6c1.5-.6 2.9-1.3 5-1h1q1.5-1.4 4-1h1q1.5-1.4 4-1h1c2.4-1.3 5-1.6 8-2l5-1c2-.7 3.6-1.6 6-2 4-.7 7.2-1.7 11-3 2.3-1 4.2-2.5 7-3h1q1.5-1.7 4-2h1c1.9-1.5 3.9-2 6-3q2.9-1.6 6-3a95 95 0 0 0 11-5c4.4-2.8 8.9-6 14-8 0 0 .6.2 1 0 1.8-2.8 7-4.8 10-6 0 0 .6.2 1 0 1.5-2.4 5.3-4 8-5 0 0 .6.2 1 0 1.5-2.4 5.3-4 8-5 0 0 .6.2 1 0 1.3-2 3.8-3.1 6-4 0 0 .6.2 1 0 2-3 7.7-5.6 11-7l5-2c6.3-3.8 11.8-9.6 18-14v-1c0-1.9-.4-4.2 0-6-1-4.5-3.9-5.5-7-8h-1c-1.2 0-2.8-.2-4 0-8.9 1.7-16.5 11.3-25.2 14.8-8.8 3.4-16.9 10.7-25.8 14.2h-1c-10.9 10.6-29.2 16-42.7 23.3S343.7 234.6 328 235h-1q-1.5 1.4-4 1h-1q-1.5 1.4-4 1h-1c-1.5 1.3-3.9 1.2-6 1h-1c-1.7 1.3-4.6 1.2-7 1-1 .2-2.4 1-4 1h-5c-6.6 0-13.4.4-20 0-1.9-.1-2.7.3-4-1h-8c-2.8-.2-5.7-1.3-8-2h-2q-5.7.4-10-2h-1q-4.5 0-8-2h-1a10 10 0 0 1-6-2h-1c-5.9-.2-12-3.8-17-6l-4-1c-1.7-.5-2.8-.7-4-2h-1q-2.5-.2-4-2h-1q-3.4-.9-6-3h-1c-3.5-.8-7.3-2.9-10-5h-1c-1.7 0-2.2-.7-3-2h-1c-11.6-2.7-23.2-11.5-34.2-15.8-11-4.2-25.9-9.2-29.8-21.2h4c16.2 0 32.8-1 49 0 1.7.1 3 .8 4 1 2.1.4 3.4-.5 5 1h1c3.6.1 8.4 1.8 11 4h1a45 45 0 0 1 18 8h1q4.6 1.2 8 4h1c4.2 1 8.3 3.4 12 5q3.4 1.2 7 2c5.7 1.3 13 2.3 18 5h1c3.7-.2 7 1.1 10 2h9c1.6 0 3 .8 4 1h32c2.2-1.6 6-1 9-1h1a63 63 0 0 1 22-4 22 22 0 0 1 8-2c1.7-1.4 3.7-1.6 6-2a81 81 0 0 0 12-3c2.3-1 4.2-2.5 7-3h1q1.5-1.7 4-2h1c1.9-1.5 3.6-2.2 6-3l3-1c4.1-2.3 8.4-5.2 13-7 0 0 .6.2 1 0 1.5-2.4 6.3-5 9-6 0 0 .6.2 1 0 5.3-8.1 17.6-12.5 24.8-20.2C439.9 144 445 133 452 126v-1a12 12 0 0 1 2-5c2.1-2.2 8.9-1 12-1q2 .2 4 0c1-.2 2.3-1.2 4-1h1q2.1-1.5 5-2h1q2.1-1.9 5-3s.6.2 1 0c9-9.3 18-15.4 23-28 1.1-2.8 3.5-6.4 4-9 .2-1 .2-3 0-4-1.5-6-12.3-2.4-15.7 2.3S484.7 80 479 80h-7c-7.8 4.3-19.3 5.7-23 16a37 37 0 0 0-22-24c-1.5-.5-2.5-.7-4-1-2.1-.5-3.6-.2-5-2h-1a22 22 0 0 1-12-8c-2-2.9-3.4-6.5-6-9h-1c-3.9-.6-6.1 1-8 4m-181 45h1c2.2-.2 4.5-.3 6 1h1q2.5-.5 4 1h1a33 33 0 0 1 17 7h1c4.4 1 8.2 4.1 12 6 2.1 1 4.1 1.5 6 3h1c4 1 8.9 3.5 12 6h1c4 1 8.9 3.5 12 6h1c4 1 8.9 3.5 12 6h1a61 61 0 0 1 21 10h1c3.5.8 7.3 2.9 10 5h1c6.1 1.4 12.3 5 18 7 1.8.4 3 .8 5 1 1.8.2 3.7.8 5 1q2.5-.5 4 1h6c2.5 0 4 .3 6 1h3q-.7 2.1-3 2a46 46 0 0 1-16 7l-10 3c-2 .8-3.4 1.9-6 2h-1c-2.6 2.1-7.5 3-11 3h-1c-3.1 2.5-10.7 3.5-15 3h-1c-1.5 1.3-3.9 1.2-6 1-1 .2-2.4 1-4 1h-11c-3.8.4-8.3.4-12 0h-9c-2.3 0-4.3-.7-6-1h-3c-1.8 0-2.9-.7-4-1-3.5-.8-7-.7-10-2h-1c-4.1-.7-9.8-1.4-13-4h-1q-4-.6-7-3h-1q-2.5-.2-4-2h-1q-3.4-.9-6-3h-1c-7.2-1.7-13.3-5.9-20.2-8.8-7-2.8-16.2-4.3-22.8-7.2h-11c-14 0-28.9.3-42-1-2.3 0-4.8.3-7 0a6 6 0 0 1-5-5c-1.8-4.8-.4-10.4 0-15 0-4.3-.4-8.7 0-13 .2-3.2 2.2-7.3 4-10q2-3 5-5c2.1-2 5.4-2.3 8-3 15.6-3.9 36.3-1 53-1 5.2 0 12-.5 17 0s12.2-1.8 16 1Z\"\n\t\t\t/>\n\n\t\t\t<path\n\t\t\t\tclassName=\"fill-primary stroke-primary\"\n\t\t\t\td=\"M162 132v1c1.8 2.9 4.5 5.3 8 6 .3-.2 3.7-.2 4 0 7-1.4 9.2-8.8 7-15v-1a14 14 0 0 0-7-4c-.3.2-3.7.2-4 0-6.5 1.3-8.6 6.8-8 13Z\"\n\t\t\t/>\n\n\t\t\t<path\n\t\t\t\tclassName=\"fill-primary stroke-primary\"\n\t\t\t\td=\"M465 211h-1c-18.2 14.6-41.2 24.6-60 39-19 14.2-42.7 29.3-66 34l-4 1c-2.4 1-4 2-7 2h-1q-3.5 2-8 2h-1c-1.3 1.2-3 1.1-5 1h-2q-2.6 1.1-6 1h-2c-3 1.2-6.5 1-10 1-6.3.6-13.8.6-20 0-3.4 0-8.4.9-11-1h-1c-2.2.2-4.5.3-6-1h-1c-2 .2-3.7.2-5-1h-1c-7.6.5-16.5-3.4-23-6l-4-1a129 129 0 0 1-36.2-15.8c-10.4-6.6-23.2-12.8-32.5-20.5-9.2-7.7-23.8-12.8-30.3-22.7h-1c-2.3-1.4-4.5-2.7-6-5h-1c-4-2.5-8.5-5.2-12-8h-9a9 9 0 0 0-6 7c.3 3.3 0 6.7 0 10v9c.2 1.6 1 3.8 1 6v3c.2 1 1.2 2.2 1 4v1c1.2 1.2.8 2.2 1 4 .8 6.7 3 12.6 5 19 1.7 4.3 4.2 9.1 5 14v1q1.8 1.5 2 4v1a36 36 0 0 1 5 10c.7 2 1 3 2 5 8 12.7 15.7 25.5 25.8 37.3 10 11.7 20.8 20.6 32.4 30.4 11.7 9.9 28.3 14 39.8 23.3h1q2.5.3 4 2h1c2.8.4 4.8 2 7 3l7 2c5.7 1.3 13 2.3 18 5h1c2.1-.3 3.6.8 5 1h3c2.8.2 5.8 1 8 2h8c2.1 0 4.6.8 6 1h21c1.2-.2 3.2-1 5-1h9c3.3-1 7-2.4 11-2h1c2.7-2.2 7.4-2.4 11-3a55 55 0 0 0 8-2c6.5-2.6 13.9-6.3 21-8h1c8.5-6.8 20.6-9.7 29.2-16.8 8.7-7 18.3-12.8 26.8-20.2 4.4-3.8 9-9 13-13 14.8-14.8 20.7-34.6 33-50v-1q.9-3.4 3-6v-1q.3-2.5 2-4v-1c.5-3.3 2-8.6 4-11v-1q0-3.5 2-6v-1c1.1-6.7 2.4-15 5-21v-1c-.2-2-.2-3.7 1-5v-8c0-5.3-.5-10.8 0-16a14 14 0 0 0-4-6c-1-.5-1.1-.4-2-1h-6q-2.1 1.5-5 2m-6 38c-2.1 13.4-21.2 20.3-31 30-10 9.5-23.7 19-35 27-11.5 8-25.1 19.7-39 23h-1a22 22 0 0 1-10 4h-1a25 25 0 0 1-12 4h-1q-3.5 2-8 2h-1c-1.1 1.1-2.3 1-4 1h-2c-1.2.4-2.2 1-4 1h-2c-1.8.7-3.6 1.3-6 1h-1c-1.2 1.2-2.3 1-4 1h-5c-5.7.6-12.3.8-18 0h-4c-1.9 0-2.7-.6-4-1h-6c-1.9 0-2.7.3-4-1h-1q-2.5.5-4-1h-1c-8.1.5-16.8-3.6-24.2-5.8S210 329.8 204 325h-1c-12.8-5-27.1-15.6-37.7-24.3S138.8 284.2 131 273c-.3-.2-1 0-1 0-5.7-4.4-16.6-10-19-17-.9-2.6-1-5.4-2-8-.8-2.2-2.5-5-2-8a667 667 0 0 0 88 56h1q3.4.9 6 3h1c2.8.4 4.8 2 7 3q5 1.8 10 3l6 2q2.9.6 6 1 3 .4 5 1c1.6-.2 2 0 3 1h1c2-.2 3.7-.2 5 1h1c2.2-.3 3.4.4 5 1h8c1.6 0 3 .9 4 1h40c1.8-1.3 4.6-1.2 7-1h1c1.2-1.2 3.2-1.2 5-1h1c1.2-1.2 3.2-1.2 5-1h1c1.1-1.1 2.3-1 4-1h2c3.5-1.7 6.9-2.3 11-3l4-1c3.4-1.4 7.1-3 11-4 1.5-.4 2.5-.5 4-1 1.4-.7 2-1.9 4-2h1q2.6-2.1 6-3h1c2.5-2 6-3.8 9-5l3-1c1.4-.9 2-2.5 4-3h1q1.4-2.2 4-3h1c7.3-7.7 19-13.2 27.7-19.3 8.8-6.1 18.2-15 28.3-18.7.4-.2 1 0 1 0q3.8-3.9 9-6c1.3 2.5-.5 6.7-1 10m-20 55c-.2.4 0 1 0 1-3.4 9.6-12.7 19-19 27a88 88 0 0 1-12 12 214 214 0 0 1-26.7 20.3c-9.5 5.8-20 14.8-31.3 16.7h-1a22 22 0 0 1-10 4h-1c-3.2 2.6-8.9 3.3-13 4h-1q-1.5 1.4-4 1h-1q-1.5 1.4-4 1h-1c-4.9 2.3-10.5 1-16 2-1 .2-2.5 1-4 1-6.2.4-12.8.3-19 0-1.8 0-3.8-.8-5-1h-4c-1.6 0-3-.9-4-1h-4c-3.9-.3-8.8-1.3-12-3h-1c-3.3-.5-7.5-1-10-3h-1c-3.6-.1-8.4-1.8-11-4h-1c-3.9-.6-8-2.6-11-5h-1c-16.1-3.8-32.2-18.9-45-29a200 200 0 0 1-40-51c17.7 11.5 35 25.5 52 38h1c4 1.6 12.8 5.4 15 9h1c4.6 1 10.4 4.1 14 7h1q2.5.3 4 2h1c3.3.5 8.6 2 11 4h1q3.5 0 6 2h1q2.5-.5 4 1h1q2.5-.5 4 1h1c3.8-.2 7.9 1 11 2h9c1.6 0 3 .8 4 1h32c1.2-.2 3.2-1 5-1h8a139 139 0 0 1 20-4l5-1c2-.7 3.7-1.5 6-2l4-1c1.5-.6 3-1.7 5-2h1q3-2.4 7-3h1q2.6-2.1 6-3h1c11.7-9.4 27.6-14.6 39-25 11.6-10.3 25-18.5 37-28a15 15 0 0 1-5 10Z\"\n\t\t\t/>\n\t\t</svg>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/shared/status-tooltip.tsx",
    "content": "import {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { cn } from \"@/lib/utils\";\n\ninterface Props {\n\tstatus:\n\t\t| \"running\"\n\t\t| \"error\"\n\t\t| \"done\"\n\t\t| \"idle\"\n\t\t| \"cancelled\"\n\t\t| undefined\n\t\t| null;\n\tclassName?: string;\n}\n\nexport const StatusTooltip = ({ status, className }: Props) => {\n\treturn (\n\t\t<TooltipProvider delayDuration={0}>\n\t\t\t<Tooltip>\n\t\t\t\t<TooltipTrigger>\n\t\t\t\t\t{status === \"idle\" && (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\"size-3.5 rounded-full bg-muted-foreground dark:bg-card\",\n\t\t\t\t\t\t\t\tclassName,\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t\t{status === \"error\" && (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={cn(\"size-3.5 rounded-full bg-destructive\", className)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t\t{status === \"done\" && (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={cn(\"size-3.5 rounded-full bg-green-500\", className)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t\t{status === \"cancelled\" && (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\"size-3.5 rounded-full bg-muted-foreground\",\n\t\t\t\t\t\t\t\tclassName,\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t\t{status === \"running\" && (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={cn(\"size-3.5 rounded-full bg-yellow-500\", className)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t</TooltipTrigger>\n\t\t\t\t<TooltipContent align=\"center\">\n\t\t\t\t\t<span>\n\t\t\t\t\t\t{status === \"idle\" && \"Idle\"}\n\t\t\t\t\t\t{status === \"error\" && \"Error\"}\n\t\t\t\t\t\t{status === \"done\" && \"Done\"}\n\t\t\t\t\t\t{status === \"running\" && \"Running\"}\n\t\t\t\t\t\t{status === \"cancelled\" && \"Cancelled\"}\n\t\t\t\t\t</span>\n\t\t\t\t</TooltipContent>\n\t\t\t</Tooltip>\n\t\t</TooltipProvider>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/shared/tag-badge.tsx",
    "content": "import { Badge } from \"@/components/ui/badge\";\nimport { cn } from \"@/lib/utils\";\n\ninterface TagBadgeProps {\n\tname: string;\n\tcolor?: string | null;\n\tclassName?: string;\n\tchildren?: React.ReactNode;\n}\n\nexport function TagBadge({ name, color, className, children }: TagBadgeProps) {\n\treturn (\n\t\t<Badge\n\t\t\tstyle={{\n\t\t\t\tbackgroundColor: color ? `${color}33` : undefined,\n\t\t\t\tcolor: color || undefined,\n\t\t\t\tborderColor: color ? `${color}66` : undefined,\n\t\t\t}}\n\t\t\tclassName={cn(\"border\", className)}\n\t\t>\n\t\t\t{name}\n\t\t\t{children}\n\t\t</Badge>\n\t);\n}\n"
  },
  {
    "path": "apps/dokploy/components/shared/tag-filter.tsx",
    "content": "import { Tags } from \"lucide-react\";\nimport * as React from \"react\";\nimport { HandleTag } from \"@/components/dashboard/settings/tags/handle-tag\";\nimport { TagBadge } from \"@/components/shared/tag-badge\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport { Checkbox } from \"@/components/ui/checkbox\";\nimport {\n\tCommand,\n\tCommandEmpty,\n\tCommandGroup,\n\tCommandInput,\n\tCommandItem,\n\tCommandList,\n} from \"@/components/ui/command\";\nimport {\n\tPopover,\n\tPopoverContent,\n\tPopoverTrigger,\n} from \"@/components/ui/popover\";\nimport { cn } from \"@/lib/utils\";\n\nexport interface Tag {\n\tid: string;\n\tname: string;\n\tcolor?: string;\n}\n\ninterface TagFilterProps {\n\ttags: Tag[];\n\tselectedTags: string[];\n\tonTagsChange: (tagIds: string[]) => void;\n\tclassName?: string;\n}\n\nexport function TagFilter({\n\ttags,\n\tselectedTags,\n\tonTagsChange,\n\tclassName,\n}: TagFilterProps) {\n\tconst [open, setOpen] = React.useState(false);\n\n\tconst handleTagToggle = (tagId: string) => {\n\t\tif (selectedTags.includes(tagId)) {\n\t\t\tonTagsChange(selectedTags.filter((id) => id !== tagId));\n\t\t} else {\n\t\t\tonTagsChange([...selectedTags, tagId]);\n\t\t}\n\t};\n\n\tconst handleClearAll = (e: React.MouseEvent) => {\n\t\te.stopPropagation();\n\t\tonTagsChange([]);\n\t};\n\n\treturn (\n\t\t<div className={cn(\"flex items-center gap-2\", className)}>\n\t\t\t<Popover open={open} onOpenChange={setOpen}>\n\t\t\t\t<PopoverTrigger asChild>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\tclassName={cn(\"gap-2\", selectedTags.length > 0 && \"border-primary\")}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Tags className=\"h-4 w-4\" />\n\t\t\t\t\t\t<span>Tags</span>\n\t\t\t\t\t\t{selectedTags.length > 0 && (\n\t\t\t\t\t\t\t<Badge variant=\"secondary\" className=\"ml-1 px-1 py-0\">\n\t\t\t\t\t\t\t\t{selectedTags.length}\n\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Button>\n\t\t\t\t</PopoverTrigger>\n\t\t\t\t<PopoverContent className=\"w-64 p-0\" align=\"start\">\n\t\t\t\t\t<Command>\n\t\t\t\t\t\t<div className=\"flex items-center border-b px-3\">\n\t\t\t\t\t\t\t<CommandInput\n\t\t\t\t\t\t\t\tplaceholder=\"Search tags...\"\n\t\t\t\t\t\t\t\tclassName=\"h-9 focus-visible:ring-0\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{selectedTags.length > 0 && (\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\tonClick={handleClearAll}\n\t\t\t\t\t\t\t\t\tclassName=\"h-8 px-2 text-xs\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tClear\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<CommandList>\n\t\t\t\t\t\t\t<CommandEmpty>\n\t\t\t\t\t\t\t\t<div className=\"flex flex-col items-center gap-2 py-1\">\n\t\t\t\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\tNo tags found.\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t<HandleTag />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</CommandEmpty>\n\t\t\t\t\t\t\t<CommandGroup>\n\t\t\t\t\t\t\t\t{tags.map((tag) => {\n\t\t\t\t\t\t\t\t\tconst isSelected = selectedTags.includes(tag.id);\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\t\tkey={tag.id}\n\t\t\t\t\t\t\t\t\t\t\tonSelect={() => handleTagToggle(tag.id)}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"cursor-pointer\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<Checkbox\n\t\t\t\t\t\t\t\t\t\t\t\tchecked={isSelected}\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"mr-2\"\n\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={() => handleTagToggle(tag.id)}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t<TagBadge name={tag.name} color={tag.color} />\n\t\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t\t</CommandList>\n\t\t\t\t\t</Command>\n\t\t\t\t</PopoverContent>\n\t\t\t</Popover>\n\t\t</div>\n\t);\n}\n"
  },
  {
    "path": "apps/dokploy/components/shared/tag-selector.tsx",
    "content": "import { Check, ChevronsUpDown, X } from \"lucide-react\";\nimport * as React from \"react\";\nimport { HandleTag } from \"@/components/dashboard/settings/tags/handle-tag\";\nimport { TagBadge } from \"@/components/shared/tag-badge\";\nimport { Button } from \"@/components/ui/button\";\nimport { Checkbox } from \"@/components/ui/checkbox\";\nimport {\n\tCommand,\n\tCommandEmpty,\n\tCommandGroup,\n\tCommandInput,\n\tCommandItem,\n\tCommandList,\n} from \"@/components/ui/command\";\nimport {\n\tPopover,\n\tPopoverContent,\n\tPopoverTrigger,\n} from \"@/components/ui/popover\";\nimport { cn } from \"@/lib/utils\";\n\nexport interface Tag {\n\tid: string;\n\tname: string;\n\tcolor?: string;\n}\n\ninterface TagSelectorProps {\n\ttags: Tag[];\n\tselectedTags: string[];\n\tonTagsChange: (tagIds: string[]) => void;\n\tplaceholder?: string;\n\tclassName?: string;\n\tdisabled?: boolean;\n}\n\nexport function TagSelector({\n\ttags,\n\tselectedTags,\n\tonTagsChange,\n\tplaceholder = \"Select tags...\",\n\tclassName,\n\tdisabled = false,\n}: TagSelectorProps) {\n\tconst [open, setOpen] = React.useState(false);\n\n\tconst handleTagToggle = (tagId: string) => {\n\t\tif (selectedTags.includes(tagId)) {\n\t\t\tonTagsChange(selectedTags.filter((id) => id !== tagId));\n\t\t} else {\n\t\t\tonTagsChange([...selectedTags, tagId]);\n\t\t}\n\t};\n\n\tconst handleTagRemove = (tagId: string, e?: React.MouseEvent) => {\n\t\te?.stopPropagation();\n\t\tonTagsChange(selectedTags.filter((id) => id !== tagId));\n\t};\n\n\tconst selectedTagObjects = tags.filter((tag) =>\n\t\tselectedTags.includes(tag.id),\n\t);\n\n\treturn (\n\t\t<div className={cn(\"w-full\", className)}>\n\t\t\t<Popover open={open} onOpenChange={setOpen}>\n\t\t\t\t<PopoverTrigger asChild>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\taria-expanded={open}\n\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\"w-full justify-between min-h-10 h-auto bg-input\",\n\t\t\t\t\t\t\tdisabled && \"cursor-not-allowed opacity-50\",\n\t\t\t\t\t\t)}\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"flex flex-wrap gap-1 flex-1\">\n\t\t\t\t\t\t\t{selectedTagObjects.length > 0 ? (\n\t\t\t\t\t\t\t\tselectedTagObjects.map((tag) => (\n\t\t\t\t\t\t\t\t\t<TagBadge\n\t\t\t\t\t\t\t\t\t\tkey={tag.id}\n\t\t\t\t\t\t\t\t\t\tname={tag.name}\n\t\t\t\t\t\t\t\t\t\tcolor={tag.color}\n\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1 pr-1\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={(e) => handleTagRemove(tag.id, e)}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"ml-1 ring-offset-background rounded-full outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2\"\n\t\t\t\t\t\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<X className=\"h-3 w-3 hover:opacity-70\" />\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"sr-only\">Remove {tag.name}</span>\n\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t</TagBadge>\n\t\t\t\t\t\t\t\t))\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground\">{placeholder}</span>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n\t\t\t\t\t</Button>\n\t\t\t\t</PopoverTrigger>\n\t\t\t\t<PopoverContent className=\"w-full p-0\" align=\"start\">\n\t\t\t\t\t<Command>\n\t\t\t\t\t\t<CommandInput\n\t\t\t\t\t\t\tplaceholder=\"Search tags...\"\n\t\t\t\t\t\t\tclassName=\"focus-visible:ring-0\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<CommandList>\n\t\t\t\t\t\t\t<CommandEmpty>\n\t\t\t\t\t\t\t\t<div className=\"flex flex-col items-center gap-2 py-1\">\n\t\t\t\t\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\tNo tags found.\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t<HandleTag />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</CommandEmpty>\n\t\t\t\t\t\t\t<CommandGroup>\n\t\t\t\t\t\t\t\t{tags.map((tag) => {\n\t\t\t\t\t\t\t\t\tconst isSelected = selectedTags.includes(tag.id);\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\t\tkey={tag.id}\n\t\t\t\t\t\t\t\t\t\t\tonSelect={() => handleTagToggle(tag.id)}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"cursor-pointer\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<Checkbox\n\t\t\t\t\t\t\t\t\t\t\t\tchecked={isSelected}\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"mr-2\"\n\t\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={() => handleTagToggle(tag.id)}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t<TagBadge\n\t\t\t\t\t\t\t\t\t\t\t\tname={tag.name}\n\t\t\t\t\t\t\t\t\t\t\t\tcolor={tag.color}\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"mr-2\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t<Check\n\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"ml-auto h-4 w-4\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tisSelected ? \"opacity-100\" : \"opacity-0\",\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t\t</CommandList>\n\t\t\t\t\t</Command>\n\t\t\t\t</PopoverContent>\n\t\t\t</Popover>\n\t\t</div>\n\t);\n}\n"
  },
  {
    "path": "apps/dokploy/components/shared/toggle-visibility-input.tsx",
    "content": "import copy from \"copy-to-clipboard\";\nimport { Clipboard } from \"lucide-react\";\nimport { useRef } from \"react\";\nimport { toast } from \"sonner\";\nimport { Button } from \"../ui/button\";\nimport { Input, type InputProps } from \"../ui/input\";\n\nexport const ToggleVisibilityInput = ({ ...props }: InputProps) => {\n\tconst inputRef = useRef<HTMLInputElement>(null);\n\n\treturn (\n\t\t<div className=\"flex w-full items-center space-x-2\">\n\t\t\t<Input ref={inputRef} {...props} type=\"password\" />\n\t\t\t<Button\n\t\t\t\tvariant={\"secondary\"}\n\t\t\t\tonClick={() => {\n\t\t\t\t\tcopy(inputRef.current?.value || \"\");\n\t\t\t\t\ttoast.success(\"Value is copied to clipboard\");\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<Clipboard className=\"size-4 text-muted-foreground\" />\n\t\t\t</Button>\n\t\t\t{/* <Button onClick={togglePasswordVisibility} variant={\"secondary\"}>\n\t\t\t\t{isPasswordVisible ? (\n\t\t\t\t\t<EyeOffIcon className=\"size-4 text-muted-foreground\" />\n\t\t\t\t) : (\n\t\t\t\t\t<EyeIcon className=\"size-4 text-muted-foreground\" />\n\t\t\t\t)}\n\t\t\t</Button> */}\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/ui/accordion.tsx",
    "content": "import * as AccordionPrimitive from \"@radix-ui/react-accordion\";\nimport { ChevronDown } from \"lucide-react\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Accordion = AccordionPrimitive.Root;\n\nconst AccordionItem = React.forwardRef<\n\tReact.ElementRef<typeof AccordionPrimitive.Item>,\n\tReact.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>\n>(({ className, ...props }, ref) => (\n\t<AccordionPrimitive.Item\n\t\tref={ref}\n\t\tclassName={cn(\"border-b\", className)}\n\t\t{...props}\n\t/>\n));\nAccordionItem.displayName = \"AccordionItem\";\n\nconst AccordionTrigger = React.forwardRef<\n\tReact.ElementRef<typeof AccordionPrimitive.Trigger>,\n\tReact.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n\t<AccordionPrimitive.Header className=\"flex\">\n\t\t<AccordionPrimitive.Trigger\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t\t<ChevronDown className=\"h-4 w-4 shrink-0 transition-transform duration-200\" />\n\t\t</AccordionPrimitive.Trigger>\n\t</AccordionPrimitive.Header>\n));\nAccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;\n\nconst AccordionContent = React.forwardRef<\n\tReact.ElementRef<typeof AccordionPrimitive.Content>,\n\tReact.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n\t<AccordionPrimitive.Content\n\t\tref={ref}\n\t\tclassName=\"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down\"\n\t\t{...props}\n\t>\n\t\t<div className={cn(\"pb-4 pt-0\", className)}>{children}</div>\n\t</AccordionPrimitive.Content>\n));\n\nAccordionContent.displayName = AccordionPrimitive.Content.displayName;\n\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent };\n"
  },
  {
    "path": "apps/dokploy/components/ui/alert-dialog.tsx",
    "content": "import * as AlertDialogPrimitive from \"@radix-ui/react-alert-dialog\";\nimport * as React from \"react\";\n\nimport { type ButtonProps, buttonVariants } from \"@/components/ui/button\";\nimport { cn } from \"@/lib/utils\";\n\nconst AlertDialog = AlertDialogPrimitive.Root;\n\nconst AlertDialogTrigger = AlertDialogPrimitive.Trigger;\n\nconst AlertDialogPortal = AlertDialogPrimitive.Portal;\n\nconst AlertDialogOverlay = React.forwardRef<\n\tReact.ElementRef<typeof AlertDialogPrimitive.Overlay>,\n\tReact.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n\t<AlertDialogPrimitive.Overlay\n\t\tclassName={cn(\n\t\t\t\"fixed inset-0 z-50 bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t\tref={ref}\n\t/>\n));\nAlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;\n\nconst AlertDialogContent = React.forwardRef<\n\tReact.ElementRef<typeof AlertDialogPrimitive.Content>,\n\tReact.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>\n>(({ className, ...props }, ref) => (\n\t<AlertDialogPortal>\n\t\t<AlertDialogOverlay />\n\t\t<AlertDialogPrimitive.Content\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t</AlertDialogPortal>\n));\nAlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;\n\nconst AlertDialogHeader = ({\n\tclassName,\n\t...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n\t<div\n\t\tclassName={cn(\n\t\t\t\"flex flex-col space-y-2 text-center sm:text-left\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n);\nAlertDialogHeader.displayName = \"AlertDialogHeader\";\n\nconst AlertDialogFooter = ({\n\tclassName,\n\t...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n\t<div\n\t\tclassName={cn(\n\t\t\t\"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n);\nAlertDialogFooter.displayName = \"AlertDialogFooter\";\n\nconst AlertDialogTitle = React.forwardRef<\n\tReact.ElementRef<typeof AlertDialogPrimitive.Title>,\n\tReact.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n\t<AlertDialogPrimitive.Title\n\t\tref={ref}\n\t\tclassName={cn(\"text-lg font-semibold\", className)}\n\t\t{...props}\n\t/>\n));\nAlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;\n\nconst AlertDialogDescription = React.forwardRef<\n\tReact.ElementRef<typeof AlertDialogPrimitive.Description>,\n\tReact.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n\t<AlertDialogPrimitive.Description\n\t\tref={ref}\n\t\tclassName={cn(\"text-sm text-muted-foreground\", className)}\n\t\t{...props}\n\t/>\n));\nAlertDialogDescription.displayName =\n\tAlertDialogPrimitive.Description.displayName;\n\nconst AlertDialogAction = React.forwardRef<\n\tReact.ElementRef<typeof AlertDialogPrimitive.Action>,\n\tReact.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action> & {\n\t\tvariant?: ButtonProps[\"variant\"];\n\t}\n>(({ className, variant, ...props }, ref) => (\n\t<AlertDialogPrimitive.Action\n\t\tref={ref}\n\t\tclassName={cn(buttonVariants({ variant }), className)}\n\t\t{...props}\n\t/>\n));\nAlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;\n\nconst AlertDialogCancel = React.forwardRef<\n\tReact.ElementRef<typeof AlertDialogPrimitive.Cancel>,\n\tReact.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>\n>(({ className, ...props }, ref) => (\n\t<AlertDialogPrimitive.Cancel\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\tbuttonVariants({ variant: \"outline\" }),\n\t\t\t\"mt-2 sm:mt-0\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nAlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;\n\nexport {\n\tAlertDialog,\n\tAlertDialogPortal,\n\tAlertDialogOverlay,\n\tAlertDialogTrigger,\n\tAlertDialogContent,\n\tAlertDialogHeader,\n\tAlertDialogFooter,\n\tAlertDialogTitle,\n\tAlertDialogDescription,\n\tAlertDialogAction,\n\tAlertDialogCancel,\n};\n"
  },
  {
    "path": "apps/dokploy/components/ui/alert.tsx",
    "content": "import { cva, type VariantProps } from \"class-variance-authority\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst alertVariants = cva(\n\t\"relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground\",\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault: \"bg-background text-foreground\",\n\t\t\t\tdestructive:\n\t\t\t\t\t\"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: \"default\",\n\t\t},\n\t},\n);\n\nconst Alert = React.forwardRef<\n\tHTMLDivElement,\n\tReact.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>\n>(({ className, variant, ...props }, ref) => (\n\t<div\n\t\tref={ref}\n\t\trole=\"alert\"\n\t\tclassName={cn(alertVariants({ variant }), className)}\n\t\t{...props}\n\t/>\n));\nAlert.displayName = \"Alert\";\n\nconst AlertTitle = React.forwardRef<\n\tHTMLParagraphElement,\n\tReact.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => (\n\t<h5\n\t\tref={ref}\n\t\tclassName={cn(\"mb-1 font-medium leading-none tracking-tight\", className)}\n\t\t{...props}\n\t/>\n));\nAlertTitle.displayName = \"AlertTitle\";\n\nconst AlertDescription = React.forwardRef<\n\tHTMLParagraphElement,\n\tReact.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n\t<div\n\t\tref={ref}\n\t\tclassName={cn(\"text-sm [&_p]:leading-relaxed\", className)}\n\t\t{...props}\n\t/>\n));\nAlertDescription.displayName = \"AlertDescription\";\n\nexport { Alert, AlertTitle, AlertDescription };\n"
  },
  {
    "path": "apps/dokploy/components/ui/avatar.tsx",
    "content": "import * as AvatarPrimitive from \"@radix-ui/react-avatar\";\nimport * as React from \"react\";\nimport { isSolidColorAvatar } from \"@/lib/avatar-utils\";\nimport { cn } from \"@/lib/utils\";\n\nconst Avatar = React.forwardRef<\n\tReact.ElementRef<typeof AvatarPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>\n>(({ className, ...props }, ref) => (\n\t<AvatarPrimitive.Root\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nAvatar.displayName = AvatarPrimitive.Root.displayName;\n\nconst AvatarImage = React.forwardRef<\n\tReact.ElementRef<typeof AvatarPrimitive.Image>,\n\tReact.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image> & {\n\t\tsrc?: string | null;\n\t}\n>(({ className, src, ...props }, ref) => {\n\tif (isSolidColorAvatar(src)) {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tkey={`solid-${src}`}\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cn(\"aspect-square h-full w-full rounded-full\", className)}\n\t\t\t\tstyle={{\n\t\t\t\t\tbackgroundColor: src,\n\t\t\t\t}}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn (\n\t\t<AvatarPrimitive.Image\n\t\t\tref={ref}\n\t\t\tclassName={cn(\"aspect-square h-full w-full\", className)}\n\t\t\tsrc={src ?? \"\"}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nAvatarImage.displayName = AvatarPrimitive.Image.displayName;\n\nconst AvatarFallback = React.forwardRef<\n\tReact.ElementRef<typeof AvatarPrimitive.Fallback>,\n\tReact.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>\n>(({ className, ...props }, ref) => (\n\t<AvatarPrimitive.Fallback\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"flex h-full w-full items-center justify-center rounded-full bg-muted\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nAvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;\n\nexport { Avatar, AvatarImage, AvatarFallback };\n"
  },
  {
    "path": "apps/dokploy/components/ui/badge.tsx",
    "content": "import { cva, type VariantProps } from \"class-variance-authority\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst badgeVariants = cva(\n\t\"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold whitespace-nowrap transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2\",\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault:\n\t\t\t\t\t\"border-transparent bg-primary text-primary-foreground hover:bg-primary/80\",\n\t\t\t\tsecondary:\n\t\t\t\t\t\"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n\t\t\t\tdestructive:\n\t\t\t\t\t\"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80\",\n\t\t\t\tred: \"border-transparent select-none items-center whitespace-nowrap font-medium bg-red-600/20 dark:bg-red-500/15 text-destructive text-xs h-4 px-1 py-1 rounded-md\",\n\t\t\t\tyellow:\n\t\t\t\t\t\"border-transparent select-none items-center whitespace-nowrap font-medium bg-yellow-600/20 dark:bg-yellow-500/15 dark:text-yellow-500 text-yellow-600 text-xs h-4 px-1 py-1 rounded-md\",\n\t\t\t\torange:\n\t\t\t\t\t\"border-transparent select-none items-center whitespace-nowrap font-medium bg-orange-600/20 dark:bg-orange-500/15 dark:text-orange-500 text-orange-600 text-xs h-4 px-1 py-1 rounded-md\",\n\t\t\t\tgreen:\n\t\t\t\t\t\"border-transparent select-none items-center whitespace-nowrap font-medium bg-emerald-600/20 dark:bg-emerald-500/15 dark:text-emerald-500 text-emerald-600 text-xs h-4 px-1 py-1 rounded-md\",\n\t\t\t\tblue: \"border-transparent select-none items-center whitespace-nowrap font-medium bg-blue-600/20 dark:bg-blue-500/15 dark:text-blue-500 text-blue-600 text-xs h-4 px-1 py-1 rounded-md\",\n\t\t\t\tblank:\n\t\t\t\t\t\"border-transparent select-none items-center whitespace-nowrap font-medium dark:bg-white/15 bg-black/15 text-foreground text-xs h-4 px-1 py-1 rounded-md\",\n\t\t\t\toutline: \"text-foreground\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: \"default\",\n\t\t},\n\t},\n);\n\nexport interface BadgeProps\n\textends React.HTMLAttributes<HTMLDivElement>,\n\t\tVariantProps<typeof badgeVariants> {}\n\nfunction Badge({ className, variant, ...props }: BadgeProps) {\n\treturn (\n\t\t<div className={cn(badgeVariants({ variant }), className)} {...props} />\n\t);\n}\n\nexport { Badge, badgeVariants };\n"
  },
  {
    "path": "apps/dokploy/components/ui/breadcrumb.tsx",
    "content": "import { Slot } from \"@radix-ui/react-slot\";\nimport { ChevronRight, MoreHorizontal } from \"lucide-react\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Breadcrumb = React.forwardRef<\n\tHTMLElement,\n\tReact.ComponentPropsWithoutRef<\"nav\"> & {\n\t\tseparator?: React.ReactNode;\n\t}\n>(({ ...props }, ref) => <nav ref={ref} aria-label=\"breadcrumb\" {...props} />);\nBreadcrumb.displayName = \"Breadcrumb\";\n\nconst BreadcrumbList = React.forwardRef<\n\tHTMLOListElement,\n\tReact.ComponentPropsWithoutRef<\"ol\">\n>(({ className, ...props }, ref) => (\n\t<ol\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nBreadcrumbList.displayName = \"BreadcrumbList\";\n\nconst BreadcrumbItem = React.forwardRef<\n\tHTMLLIElement,\n\tReact.ComponentPropsWithoutRef<\"li\">\n>(({ className, ...props }, ref) => (\n\t<li\n\t\tref={ref}\n\t\tclassName={cn(\"inline-flex items-center gap-1.5\", className)}\n\t\t{...props}\n\t/>\n));\nBreadcrumbItem.displayName = \"BreadcrumbItem\";\n\nconst BreadcrumbLink = React.forwardRef<\n\tHTMLAnchorElement,\n\tReact.ComponentPropsWithoutRef<\"a\"> & {\n\t\tasChild?: boolean;\n\t}\n>(({ asChild, className, ...props }, ref) => {\n\tconst Comp = asChild ? Slot : \"a\";\n\n\treturn (\n\t\t<Comp\n\t\t\tref={ref}\n\t\t\tclassName={cn(\"transition-colors hover:text-foreground\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nBreadcrumbLink.displayName = \"BreadcrumbLink\";\n\nconst BreadcrumbPage = React.forwardRef<\n\tHTMLSpanElement,\n\tReact.ComponentPropsWithoutRef<\"span\">\n>(({ className, ...props }, ref) => (\n\t<span\n\t\tref={ref}\n\t\taria-disabled=\"true\"\n\t\taria-current=\"page\"\n\t\tclassName={cn(\"font-normal text-foreground\", className)}\n\t\t{...props}\n\t/>\n));\nBreadcrumbPage.displayName = \"BreadcrumbPage\";\n\nconst BreadcrumbSeparator = ({\n\tchildren,\n\tclassName,\n\t...props\n}: React.ComponentProps<\"li\">) => (\n\t<li\n\t\trole=\"presentation\"\n\t\taria-hidden=\"true\"\n\t\tclassName={cn(\"[&>svg]:w-3.5 [&>svg]:h-3.5\", className)}\n\t\t{...props}\n\t>\n\t\t{children ?? <ChevronRight />}\n\t</li>\n);\nBreadcrumbSeparator.displayName = \"BreadcrumbSeparator\";\n\nconst BreadcrumbEllipsis = ({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"span\">) => (\n\t<span\n\t\trole=\"presentation\"\n\t\taria-hidden=\"true\"\n\t\tclassName={cn(\"flex h-9 w-9 items-center justify-center\", className)}\n\t\t{...props}\n\t>\n\t\t<MoreHorizontal className=\"h-4 w-4\" />\n\t\t<span className=\"sr-only\">More</span>\n\t</span>\n);\nBreadcrumbEllipsis.displayName = \"BreadcrumbElipssis\";\n\nexport {\n\tBreadcrumb,\n\tBreadcrumbList,\n\tBreadcrumbItem,\n\tBreadcrumbLink,\n\tBreadcrumbPage,\n\tBreadcrumbSeparator,\n\tBreadcrumbEllipsis,\n};\n"
  },
  {
    "path": "apps/dokploy/components/ui/button.tsx",
    "content": "import { Slot, Slottable } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { Loader2 } from \"lucide-react\";\nimport * as React from \"react\";\nimport { cn } from \"@/lib/utils\";\n\nconst buttonVariants = cva(\n\t\"inline-flex items-center justify-center whitespace-nowrap select-none rounded-lg transition-all will-change-transform active:hover:scale-[0.98] active:hover:transform text-sm font-medium ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n\t\t\t\tdestructive:\n\t\t\t\t\t\"bg-destructive text-destructive-foreground hover:bg-destructive/70\",\n\t\t\t\toutline:\n\t\t\t\t\t\"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n\t\t\t\tsecondary:\n\t\t\t\t\t\"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n\t\t\t\tghost: \"hover:bg-accent hover:text-accent-foreground\",\n\t\t\t\tlink: \"text-primary underline-offset-4 hover:underline\",\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tdefault: \"h-10 px-4 py-2\",\n\t\t\t\tsm: \"h-9 rounded-md px-3\",\n\t\t\t\tlg: \"h-11 rounded-md px-8\",\n\t\t\t\ticon: \"h-10 w-10\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: \"default\",\n\t\t\tsize: \"default\",\n\t\t},\n\t},\n);\n\nexport interface ButtonProps\n\textends React.ButtonHTMLAttributes<HTMLButtonElement>,\n\t\tVariantProps<typeof buttonVariants> {\n\tasChild?: boolean;\n\tisLoading?: boolean;\n\tchildren?: React.ReactNode;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n\t(\n\t\t{\n\t\t\tclassName,\n\t\t\tvariant,\n\t\t\tsize,\n\t\t\tchildren,\n\t\t\tisLoading = false,\n\t\t\tasChild = false,\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst Comp = asChild ? Slot : \"button\";\n\t\tconst type = props.type ?? undefined;\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<Comp\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\tbuttonVariants({ variant, size, className }),\n\t\t\t\t\t\t\"flex gap-2\",\n\t\t\t\t\t)}\n\t\t\t\t\tref={ref}\n\t\t\t\t\t{...props}\n\t\t\t\t\tdisabled={isLoading || props.disabled}\n\t\t\t\t\ttype={type}\n\t\t\t\t>\n\t\t\t\t\t{isLoading && <Loader2 className=\"animate-spin\" />}\n\t\t\t\t\t<Slottable>{children}</Slottable>\n\t\t\t\t</Comp>\n\t\t\t</>\n\t\t);\n\t},\n);\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n"
  },
  {
    "path": "apps/dokploy/components/ui/calendar.tsx",
    "content": "import { ChevronLeft, ChevronRight } from \"lucide-react\";\nimport type * as React from \"react\";\nimport { DayPicker } from \"react-day-picker\";\n\nimport { buttonVariants } from \"@/components/ui/button\";\nimport { cn } from \"@/lib/utils\";\n\nexport type CalendarProps = React.ComponentProps<typeof DayPicker>;\n\nfunction Calendar({\n\tclassName,\n\tclassNames,\n\tshowOutsideDays = true,\n\t...props\n}: CalendarProps) {\n\treturn (\n\t\t<DayPicker\n\t\t\tshowOutsideDays={showOutsideDays}\n\t\t\tclassName={cn(\"p-3\", className)}\n\t\t\tclassNames={{\n\t\t\t\tmonths: \"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0\",\n\t\t\t\tmonth: \"space-y-4\",\n\t\t\t\tcaption: \"flex justify-center pt-1 relative items-center\",\n\t\t\t\tcaption_label: \"text-sm font-medium\",\n\t\t\t\tnav: \"space-x-1 flex items-center\",\n\t\t\t\tnav_button: cn(\n\t\t\t\t\tbuttonVariants({ variant: \"outline\" }),\n\t\t\t\t\t\"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100\",\n\t\t\t\t),\n\t\t\t\tnav_button_previous: \"absolute left-1\",\n\t\t\t\tnav_button_next: \"absolute right-1\",\n\t\t\t\ttable: \"w-full border-collapse space-y-1\",\n\t\t\t\thead_row: \"flex\",\n\t\t\t\thead_cell:\n\t\t\t\t\t\"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]\",\n\t\t\t\trow: \"flex w-full mt-2\",\n\t\t\t\tcell: \"h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20\",\n\t\t\t\tday: cn(\n\t\t\t\t\tbuttonVariants({ variant: \"ghost\" }),\n\t\t\t\t\t\"h-9 w-9 p-0 font-normal aria-selected:opacity-100\",\n\t\t\t\t),\n\t\t\t\tday_range_end: \"day-range-end\",\n\t\t\t\tday_selected:\n\t\t\t\t\t\"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground\",\n\t\t\t\tday_today: \"bg-accent text-accent-foreground\",\n\t\t\t\tday_outside:\n\t\t\t\t\t\"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground\",\n\t\t\t\tday_disabled: \"text-muted-foreground opacity-50\",\n\t\t\t\tday_range_middle:\n\t\t\t\t\t\"aria-selected:bg-accent aria-selected:text-accent-foreground\",\n\t\t\t\tday_hidden: \"invisible\",\n\t\t\t\t...classNames,\n\t\t\t}}\n\t\t\tcomponents={{\n\t\t\t\tIconLeft: ({ className, ...props }) => (\n\t\t\t\t\t<ChevronLeft className={cn(\"h-4 w-4\", className)} {...props} />\n\t\t\t\t),\n\t\t\t\tIconRight: ({ className, ...props }) => (\n\t\t\t\t\t<ChevronRight className={cn(\"h-4 w-4\", className)} {...props} />\n\t\t\t\t),\n\t\t\t}}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\nCalendar.displayName = \"Calendar\";\n\nexport { Calendar };\n"
  },
  {
    "path": "apps/dokploy/components/ui/card.tsx",
    "content": "import * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Card = React.forwardRef<\n\tHTMLDivElement,\n\tReact.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n\t<div\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"rounded-lg border bg-card text-card-foreground shadow-sm\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nCard.displayName = \"Card\";\n\nconst CardHeader = React.forwardRef<\n\tHTMLDivElement,\n\tReact.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n\t<div\n\t\tref={ref}\n\t\tclassName={cn(\"flex flex-col space-y-1.5 p-6\", className)}\n\t\t{...props}\n\t/>\n));\nCardHeader.displayName = \"CardHeader\";\n\nconst CardTitle = React.forwardRef<\n\tHTMLParagraphElement,\n\tReact.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => (\n\t<h3\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"text-2xl font-semibold leading-none tracking-tight\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nCardTitle.displayName = \"CardTitle\";\n\nconst CardDescription = React.forwardRef<\n\tHTMLParagraphElement,\n\tReact.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n\t<p\n\t\tref={ref}\n\t\tclassName={cn(\"text-sm text-muted-foreground\", className)}\n\t\t{...props}\n\t/>\n));\nCardDescription.displayName = \"CardDescription\";\n\nconst CardContent = React.forwardRef<\n\tHTMLDivElement,\n\tReact.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n\t<div ref={ref} className={cn(\"p-6 pt-0\", className)} {...props} />\n));\nCardContent.displayName = \"CardContent\";\n\nconst CardFooter = React.forwardRef<\n\tHTMLDivElement,\n\tReact.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n\t<div\n\t\tref={ref}\n\t\tclassName={cn(\"flex items-center p-6 pt-0\", className)}\n\t\t{...props}\n\t/>\n));\nCardFooter.displayName = \"CardFooter\";\n\nexport {\n\tCard,\n\tCardHeader,\n\tCardFooter,\n\tCardTitle,\n\tCardDescription,\n\tCardContent,\n};\n"
  },
  {
    "path": "apps/dokploy/components/ui/chart.tsx",
    "content": "import * as React from \"react\";\nimport * as RechartsPrimitive from \"recharts\";\n\nimport { cn } from \"@/lib/utils\";\n\n// Format: { THEME_NAME: CSS_SELECTOR }\nconst THEMES = { light: \"\", dark: \".dark\" } as const;\n\nexport type ChartConfig = {\n\t[k in string]: {\n\t\tlabel?: React.ReactNode;\n\t\ticon?: React.ComponentType;\n\t} & (\n\t\t| { color?: string; theme?: never }\n\t\t| { color?: never; theme: Record<keyof typeof THEMES, string> }\n\t);\n};\n\ntype ChartContextProps = {\n\tconfig: ChartConfig;\n};\n\nconst ChartContext = React.createContext<ChartContextProps | null>(null);\n\nfunction useChart() {\n\tconst context = React.useContext(ChartContext);\n\n\tif (!context) {\n\t\tthrow new Error(\"useChart must be used within a <ChartContainer />\");\n\t}\n\n\treturn context;\n}\n\nconst ChartContainer = React.forwardRef<\n\tHTMLDivElement,\n\tReact.ComponentProps<\"div\"> & {\n\t\tconfig: ChartConfig;\n\t\tchildren: React.ComponentProps<\n\t\t\ttypeof RechartsPrimitive.ResponsiveContainer\n\t\t>[\"children\"];\n\t}\n>(({ id, className, children, config, ...props }, ref) => {\n\tconst uniqueId = React.useId();\n\tconst chartId = `chart-${id || uniqueId.replace(/:/g, \"\")}`;\n\n\treturn (\n\t\t<ChartContext.Provider value={{ config }}>\n\t\t\t<div\n\t\t\t\tdata-chart={chartId}\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t<ChartStyle id={chartId} config={config} />\n\t\t\t\t<RechartsPrimitive.ResponsiveContainer>\n\t\t\t\t\t{children}\n\t\t\t\t</RechartsPrimitive.ResponsiveContainer>\n\t\t\t</div>\n\t\t</ChartContext.Provider>\n\t);\n});\nChartContainer.displayName = \"Chart\";\n\nconst ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => {\n\tconst colorConfig = Object.entries(config).filter(\n\t\t([, config]) => config.theme || config.color,\n\t);\n\n\tif (!colorConfig.length) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<style\n\t\t\tdangerouslySetInnerHTML={{\n\t\t\t\t__html: Object.entries(THEMES)\n\t\t\t\t\t.map(\n\t\t\t\t\t\t([theme, prefix]) => `\n${prefix} [data-chart=${id}] {\n${colorConfig\n\t.map(([key, itemConfig]) => {\n\t\tconst color =\n\t\t\titemConfig.theme?.[theme as keyof typeof itemConfig.theme] ||\n\t\t\titemConfig.color;\n\t\treturn color ? `  --color-${key}: ${color};` : null;\n\t})\n\t.join(\"\\n\")}\n}\n`,\n\t\t\t\t\t)\n\t\t\t\t\t.join(\"\\n\"),\n\t\t\t}}\n\t\t/>\n\t);\n};\n\nconst ChartTooltip = RechartsPrimitive.Tooltip;\n\nconst ChartTooltipContent = React.forwardRef<\n\tHTMLDivElement,\n\tReact.ComponentProps<typeof RechartsPrimitive.Tooltip> &\n\t\tReact.ComponentProps<\"div\"> & {\n\t\t\thideLabel?: boolean;\n\t\t\thideIndicator?: boolean;\n\t\t\tindicator?: \"line\" | \"dot\" | \"dashed\";\n\t\t\tnameKey?: string;\n\t\t\tlabelKey?: string;\n\t\t}\n>(\n\t(\n\t\t{\n\t\t\tactive,\n\t\t\tpayload,\n\t\t\tclassName,\n\t\t\tindicator = \"dot\",\n\t\t\thideLabel = false,\n\t\t\thideIndicator = false,\n\t\t\tlabel,\n\t\t\tlabelFormatter,\n\t\t\tlabelClassName,\n\t\t\tformatter,\n\t\t\tcolor,\n\t\t\tnameKey,\n\t\t\tlabelKey,\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst { config } = useChart();\n\n\t\tconst tooltipLabel = React.useMemo(() => {\n\t\t\tif (hideLabel || !payload?.length) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tconst [item] = payload;\n\t\t\tconst key = `${labelKey || item?.dataKey || item?.name || \"value\"}`;\n\t\t\tconst itemConfig = getPayloadConfigFromPayload(config, item, key);\n\t\t\tconst value =\n\t\t\t\t!labelKey && typeof label === \"string\"\n\t\t\t\t\t? config[label as keyof typeof config]?.label || label\n\t\t\t\t\t: itemConfig?.label;\n\n\t\t\tif (labelFormatter) {\n\t\t\t\treturn (\n\t\t\t\t\t<div className={cn(\"font-medium\", labelClassName)}>\n\t\t\t\t\t\t{labelFormatter(value, payload)}\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (!value) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\treturn <div className={cn(\"font-medium\", labelClassName)}>{value}</div>;\n\t\t}, [\n\t\t\tlabel,\n\t\t\tlabelFormatter,\n\t\t\tpayload,\n\t\t\thideLabel,\n\t\t\tlabelClassName,\n\t\t\tconfig,\n\t\t\tlabelKey,\n\t\t]);\n\n\t\tif (!active || !payload?.length) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst nestLabel = payload.length === 1 && indicator !== \"dot\";\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{!nestLabel ? tooltipLabel : null}\n\t\t\t\t<div className=\"grid gap-1.5\">\n\t\t\t\t\t{payload.map((item, index) => {\n\t\t\t\t\t\tconst key = `${nameKey || item.name || item.dataKey || \"value\"}`;\n\t\t\t\t\t\tconst itemConfig = getPayloadConfigFromPayload(config, item, key);\n\t\t\t\t\t\tconst indicatorColor = color || item.payload.fill || item.color;\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tkey={item.dataKey}\n\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\"flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground\",\n\t\t\t\t\t\t\t\t\tindicator === \"dot\" && \"items-center\",\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{formatter && item?.value !== undefined && item.name ? (\n\t\t\t\t\t\t\t\t\tformatter(item.value, item.name, item, index, item.payload)\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t{itemConfig?.icon ? (\n\t\t\t\t\t\t\t\t\t\t\t<itemConfig.icon />\n\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t!hideIndicator && (\n\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"h-2.5 w-2.5\": indicator === \"dot\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"w-1\": indicator === \"line\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"w-0 border-[1.5px] border-dashed bg-transparent\":\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tindicator === \"dashed\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"my-0.5\": nestLabel && indicator === \"dashed\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"--color-bg\": indicatorColor,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"--color-border\": indicatorColor,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t} as React.CSSProperties\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\"flex flex-1 justify-between leading-none\",\n\t\t\t\t\t\t\t\t\t\t\t\tnestLabel ? \"items-end\" : \"items-center\",\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"grid gap-1.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t{nestLabel ? tooltipLabel : null}\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{itemConfig?.label || item.name}\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t{item.value && (\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-mono font-medium tabular-nums text-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{item.value.toLocaleString()}\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t},\n);\nChartTooltipContent.displayName = \"ChartTooltip\";\n\nconst ChartLegend = RechartsPrimitive.Legend;\n\nconst ChartLegendContent = React.forwardRef<\n\tHTMLDivElement,\n\tReact.ComponentProps<\"div\"> &\n\t\tPick<RechartsPrimitive.LegendProps, \"payload\" | \"verticalAlign\"> & {\n\t\t\thideIcon?: boolean;\n\t\t\tnameKey?: string;\n\t\t}\n>(\n\t(\n\t\t{ className, hideIcon = false, payload, verticalAlign = \"bottom\", nameKey },\n\t\tref,\n\t) => {\n\t\tconst { config } = useChart();\n\n\t\tif (!payload?.length) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"flex items-center justify-center gap-4\",\n\t\t\t\t\tverticalAlign === \"top\" ? \"pb-3\" : \"pt-3\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{payload.map((item) => {\n\t\t\t\t\tconst key = `${nameKey || item.dataKey || \"value\"}`;\n\t\t\t\t\tconst itemConfig = getPayloadConfigFromPayload(config, item, key);\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tkey={item.value}\n\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\"flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground\",\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{itemConfig?.icon && !hideIcon ? (\n\t\t\t\t\t\t\t\t<itemConfig.icon />\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tclassName=\"h-2 w-2 shrink-0 rounded-[2px]\"\n\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\tbackgroundColor: item.color,\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{itemConfig?.label}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</div>\n\t\t);\n\t},\n);\nChartLegendContent.displayName = \"ChartLegend\";\n\n// Helper to extract item config from a payload.\nfunction getPayloadConfigFromPayload(\n\tconfig: ChartConfig,\n\tpayload: unknown,\n\tkey: string,\n) {\n\tif (typeof payload !== \"object\" || payload === null) {\n\t\treturn undefined;\n\t}\n\n\tconst payloadPayload =\n\t\t\"payload\" in payload &&\n\t\ttypeof payload.payload === \"object\" &&\n\t\tpayload.payload !== null\n\t\t\t? payload.payload\n\t\t\t: undefined;\n\n\tlet configLabelKey: string = key;\n\n\tif (\n\t\tkey in payload &&\n\t\ttypeof payload[key as keyof typeof payload] === \"string\"\n\t) {\n\t\tconfigLabelKey = payload[key as keyof typeof payload] as string;\n\t} else if (\n\t\tpayloadPayload &&\n\t\tkey in payloadPayload &&\n\t\ttypeof payloadPayload[key as keyof typeof payloadPayload] === \"string\"\n\t) {\n\t\tconfigLabelKey = payloadPayload[\n\t\t\tkey as keyof typeof payloadPayload\n\t\t] as string;\n\t}\n\n\treturn configLabelKey in config\n\t\t? config[configLabelKey]\n\t\t: config[key as keyof typeof config];\n}\n\nexport {\n\tChartContainer,\n\tChartTooltip,\n\tChartTooltipContent,\n\tChartLegend,\n\tChartLegendContent,\n\tChartStyle,\n};\n"
  },
  {
    "path": "apps/dokploy/components/ui/checkbox.tsx",
    "content": "import * as CheckboxPrimitive from \"@radix-ui/react-checkbox\";\nimport { Check } from \"lucide-react\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Checkbox = React.forwardRef<\n\tReact.ElementRef<typeof CheckboxPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n\t<CheckboxPrimitive.Root\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t<CheckboxPrimitive.Indicator\n\t\t\tclassName={cn(\"flex items-center justify-center text-current\")}\n\t\t>\n\t\t\t<Check className=\"h-4 w-4\" />\n\t\t</CheckboxPrimitive.Indicator>\n\t</CheckboxPrimitive.Root>\n));\nCheckbox.displayName = CheckboxPrimitive.Root.displayName;\n\nexport { Checkbox };\n"
  },
  {
    "path": "apps/dokploy/components/ui/collapsible.tsx",
    "content": "import * as CollapsiblePrimitive from \"@radix-ui/react-collapsible\";\n\nconst Collapsible = CollapsiblePrimitive.Root;\n\nconst CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;\n\nconst CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;\n\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent };\n"
  },
  {
    "path": "apps/dokploy/components/ui/command.tsx",
    "content": "import type { DialogProps } from \"@radix-ui/react-dialog\";\nimport { Command as CommandPrimitive } from \"cmdk\";\nimport { Search } from \"lucide-react\";\nimport * as React from \"react\";\n\nimport { Dialog, DialogContent } from \"@/components/ui/dialog\";\nimport { cn } from \"@/lib/utils\";\n\nconst Command = React.forwardRef<\n\tReact.ElementRef<typeof CommandPrimitive>,\n\tReact.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n\t<CommandPrimitive\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground p-px\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nCommand.displayName = CommandPrimitive.displayName;\n\ninterface CommandDialogProps extends DialogProps {}\n\nconst CommandDialog = ({ children, ...props }: CommandDialogProps) => {\n\treturn (\n\t\t<Dialog {...props}>\n\t\t\t<DialogContent className=\"overflow-hidden p-0 shadow-lg\">\n\t\t\t\t<Command className=\"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n\t\t\t\t\t{children}\n\t\t\t\t</Command>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n\nconst CommandInput = React.forwardRef<\n\tReact.ElementRef<typeof CommandPrimitive.Input>,\n\tReact.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n\t<div className=\"flex items-center border-b px-3\" cmdk-input-wrapper=\"\">\n\t\t<Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n\t\t<CommandPrimitive.Input\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-0 focus-visible:ring-inset\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t</div>\n));\n\nCommandInput.displayName = CommandPrimitive.Input.displayName;\n\nconst CommandList = React.forwardRef<\n\tReact.ElementRef<typeof CommandPrimitive.List>,\n\tReact.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n\t<CommandPrimitive.List\n\t\tref={ref}\n\t\tclassName={cn(\"max-h-[300px] overflow-y-auto overflow-x-hidden\", className)}\n\t\t{...props}\n\t/>\n));\n\nCommandList.displayName = CommandPrimitive.List.displayName;\n\nconst CommandEmpty = React.forwardRef<\n\tReact.ElementRef<typeof CommandPrimitive.Empty>,\n\tReact.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => (\n\t<CommandPrimitive.Empty\n\t\tref={ref}\n\t\tclassName=\"py-6 text-center text-sm\"\n\t\t{...props}\n\t/>\n));\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName;\n\nconst CommandGroup = React.forwardRef<\n\tReact.ElementRef<typeof CommandPrimitive.Group>,\n\tReact.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n\t<CommandPrimitive.Group\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName;\n\nconst CommandSeparator = React.forwardRef<\n\tReact.ElementRef<typeof CommandPrimitive.Separator>,\n\tReact.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n\t<CommandPrimitive.Separator\n\t\tref={ref}\n\t\tclassName={cn(\"-mx-1 h-px bg-border\", className)}\n\t\t{...props}\n\t/>\n));\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName;\n\nconst CommandItem = React.forwardRef<\n\tReact.ElementRef<typeof CommandPrimitive.Item>,\n\tReact.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n\t<CommandPrimitive.Item\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\n\nCommandItem.displayName = CommandPrimitive.Item.displayName;\n\nconst CommandShortcut = ({\n\tclassName,\n\t...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n\treturn (\n\t\t<span\n\t\t\tclassName={cn(\n\t\t\t\t\"ml-auto text-xs tracking-widest text-muted-foreground\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\nCommandShortcut.displayName = \"CommandShortcut\";\n\nexport {\n\tCommand,\n\tCommandDialog,\n\tCommandInput,\n\tCommandList,\n\tCommandEmpty,\n\tCommandGroup,\n\tCommandItem,\n\tCommandShortcut,\n\tCommandSeparator,\n};\n"
  },
  {
    "path": "apps/dokploy/components/ui/dialog.tsx",
    "content": "import * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { X } from \"lucide-react\";\nimport * as React from \"react\";\nimport { cn } from \"@/lib/utils\";\n\nconst DialogContext = React.createContext<{\n\tonOpenChange?: (open: boolean) => void;\n\topen?: boolean;\n}>({});\n\nconst Dialog = ({\n\tonOpenChange,\n\topen,\n\t...props\n}: React.ComponentPropsWithoutRef<typeof DialogPrimitive.Root>) => {\n\tconst [isOpened, setIsOpened] = React.useState(false); // for internal control\n\n\tconst handleOpenChange = (open: boolean) => {\n\t\tif (onOpenChange) {\n\t\t\tonOpenChange(open);\n\t\t} else {\n\t\t\tsetIsOpened(open);\n\t\t}\n\t};\n\n\treturn (\n\t\t<DialogContext.Provider\n\t\t\tvalue={{ onOpenChange: handleOpenChange, open: open || isOpened }}\n\t\t>\n\t\t\t<DialogPrimitive.Root\n\t\t\t\topen={open || isOpened}\n\t\t\t\tonOpenChange={handleOpenChange}\n\t\t\t\t{...props}\n\t\t\t\tmodal={false}\n\t\t\t/>\n\t\t</DialogContext.Provider>\n\t);\n};\nDialog.displayName = DialogPrimitive.Root.displayName;\n\nconst DialogTrigger = DialogPrimitive.Trigger;\n\nconst DialogPortal = DialogPrimitive.Portal;\n\nconst DialogClose = DialogPrimitive.Close;\n\nconst DialogOverlay = React.forwardRef<\n\tReact.ElementRef<typeof DialogPrimitive.Overlay>,\n\tReact.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n\t<DialogPrimitive.Overlay\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"fixed inset-0 z-50 bg-black/80 pointer-events-auto data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\nconst DialogContent = React.forwardRef<\n\tReact.ElementRef<typeof DialogPrimitive.Content>,\n\tReact.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => {\n\tconst contentRef = React.useRef<HTMLDivElement>(null);\n\tconst { onOpenChange, open } = React.useContext(DialogContext);\n\n\tReact.useEffect(() => {\n\t\tif (!open) return;\n\n\t\tconst scrollbarWidth =\n\t\t\twindow.innerWidth - document.documentElement.clientWidth;\n\t\tconst body = document.body;\n\t\tconst originalPaddingRight = body.style.paddingRight;\n\t\tconst originalOverflow = body.style.overflow;\n\n\t\tif (scrollbarWidth > 0) {\n\t\t\tbody.style.paddingRight = `${scrollbarWidth}px`;\n\t\t}\n\n\t\treturn () => {\n\t\t\tbody.style.overflow = originalOverflow;\n\t\t\tbody.style.paddingRight = originalPaddingRight;\n\t\t};\n\t}, [open]);\n\n\t// Handle outside interactions properly with Command components\n\tconst handleInteractOutside = React.useCallback(\n\t\t(event: Event | React.MouseEvent) => {\n\t\t\t// Don't close when clicking inside popovers, dropdowns, or command components\n\t\t\tconst target = event.target as HTMLElement;\n\t\t\tif (\n\t\t\t\ttarget.closest(\"[data-radix-popper-content-wrapper]\") ||\n\t\t\t\ttarget.closest(\"[cmdk-root]\") ||\n\t\t\t\ttarget.closest(\"[data-radix-command-root]\")\n\t\t\t) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (onOpenChange) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tonOpenChange(false);\n\t\t\t}\n\t\t},\n\t\t[onOpenChange],\n\t);\n\n\tconst hasPaddingOverride = className?.includes(\"p-0\");\n\n\t// Separate DialogFooter from other children for proper layout\n\tconst childrenArray = React.Children.toArray(children);\n\tconst dialogFooter = childrenArray.find(\n\t\t(child) => React.isValidElement(child) && child.type === DialogFooter,\n\t);\n\tconst otherChildren = childrenArray.filter(\n\t\t(child) => !(React.isValidElement(child) && child.type === DialogFooter),\n\t);\n\n\treturn (\n\t\t<DialogPortal>\n\t\t\t{/* Custom overlay for modal=false - no click handler to avoid Command conflicts */}\n\t\t\t<div\n\t\t\t\tclassName=\"fixed inset-0 z-50 bg-black/80 pointer-events-auto data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\"\n\t\t\t\tonClick={handleInteractOutside}\n\t\t\t/>\n\t\t\t<DialogPrimitive.Content\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"fixed left-[50%] top-[50%] z-50 pointer-events-auto w-full max-w-lg translate-x-[-50%] translate-y-[-50%] border bg-background shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg\",\n\t\t\t\t\t\"flex flex-col max-h-[90vh]\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tstyle={{ pointerEvents: \"auto\" }}\n\t\t\t\tonInteractOutside={(event) => event.preventDefault()}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tref={contentRef}\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\"flex flex-col overflow-auto flex-1 min-h-0 overscroll-contain\",\n\t\t\t\t\t\t!hasPaddingOverride && \"p-6\",\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t{otherChildren}\n\t\t\t\t</div>\n\n\t\t\t\t{/* DialogFooter outside scrollable area with proper spacing */}\n\t\t\t\t{dialogFooter && (\n\t\t\t\t\t<div className=\"p-6 pt-0 border-t border-border/50\">\n\t\t\t\t\t\t{dialogFooter}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t<DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\">\n\t\t\t\t\t<X className=\"h-4 w-4\" />\n\t\t\t\t\t<span className=\"sr-only\">Close</span>\n\t\t\t\t</DialogPrimitive.Close>\n\t\t\t</DialogPrimitive.Content>\n\t\t</DialogPortal>\n\t);\n});\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nconst DialogHeader = ({\n\tclassName,\n\t...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n\t<div\n\t\tclassName={cn(\n\t\t\t\"flex flex-col space-y-1.5 text-center sm:text-left pb-4\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n);\nDialogHeader.displayName = \"DialogHeader\";\n\nconst DialogFooter = ({\n\tclassName,\n\t...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n\t<div\n\t\tclassName={cn(\n\t\t\t\"flex flex-col-reverse mt-4 sm:flex-row sm:justify-end sm:space-x-2\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n);\nDialogFooter.displayName = \"DialogFooter\";\n\nconst DialogTitle = React.forwardRef<\n\tReact.ElementRef<typeof DialogPrimitive.Title>,\n\tReact.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n\t<DialogPrimitive.Title\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"text-lg font-semibold leading-none tracking-tight\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\nconst DialogDescription = React.forwardRef<\n\tReact.ElementRef<typeof DialogPrimitive.Description>,\n\tReact.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n\t<DialogPrimitive.Description\n\t\tref={ref}\n\t\tclassName={cn(\"text-sm text-muted-foreground\", className)}\n\t\t{...props}\n\t/>\n));\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\nexport {\n\tDialog,\n\tDialogPortal,\n\tDialogOverlay,\n\tDialogClose,\n\tDialogTrigger,\n\tDialogContent,\n\tDialogHeader,\n\tDialogFooter,\n\tDialogTitle,\n\tDialogDescription,\n};\n"
  },
  {
    "path": "apps/dokploy/components/ui/dropdown-menu.tsx",
    "content": "import * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport { Check, ChevronRight, Circle } from \"lucide-react\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst DropdownMenu = DropdownMenuPrimitive.Root;\n\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\n\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal;\n\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub;\n\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n\tReact.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n\tReact.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n\t\tinset?: boolean;\n\t}\n>(({ className, inset, children, ...props }, ref) => (\n\t<DropdownMenuPrimitive.SubTrigger\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent\",\n\t\t\tinset && \"pl-8\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t{children}\n\t\t<ChevronRight className=\"ml-auto h-4 w-4\" />\n\t</DropdownMenuPrimitive.SubTrigger>\n));\nDropdownMenuSubTrigger.displayName =\n\tDropdownMenuPrimitive.SubTrigger.displayName;\n\nconst DropdownMenuSubContent = React.forwardRef<\n\tReact.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n\tReact.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n\t<DropdownMenuPrimitive.SubContent\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nDropdownMenuSubContent.displayName =\n\tDropdownMenuPrimitive.SubContent.displayName;\n\nconst DropdownMenuContent = React.forwardRef<\n\tReact.ElementRef<typeof DropdownMenuPrimitive.Content>,\n\tReact.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n\t<DropdownMenuPrimitive.Portal>\n\t\t<DropdownMenuPrimitive.Content\n\t\t\tref={ref}\n\t\t\tsideOffset={sideOffset}\n\t\t\tclassName={cn(\n\t\t\t\t\"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t</DropdownMenuPrimitive.Portal>\n));\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\n\nconst DropdownMenuItem = React.forwardRef<\n\tReact.ElementRef<typeof DropdownMenuPrimitive.Item>,\n\tReact.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n\t\tinset?: boolean;\n\t}\n>(({ className, inset, ...props }, ref) => (\n\t<DropdownMenuPrimitive.Item\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n\t\t\tinset && \"pl-8\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n\tReact.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n\tReact.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n\t<DropdownMenuPrimitive.CheckboxItem\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n\t\t\tclassName,\n\t\t)}\n\t\tchecked={checked}\n\t\t{...props}\n\t>\n\t\t<span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n\t\t\t<DropdownMenuPrimitive.ItemIndicator>\n\t\t\t\t<Check className=\"h-4 w-4\" />\n\t\t\t</DropdownMenuPrimitive.ItemIndicator>\n\t\t</span>\n\t\t{children}\n\t</DropdownMenuPrimitive.CheckboxItem>\n));\nDropdownMenuCheckboxItem.displayName =\n\tDropdownMenuPrimitive.CheckboxItem.displayName;\n\nconst DropdownMenuRadioItem = React.forwardRef<\n\tReact.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n\tReact.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n\t<DropdownMenuPrimitive.RadioItem\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t<span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n\t\t\t<DropdownMenuPrimitive.ItemIndicator>\n\t\t\t\t<Circle className=\"h-2 w-2 fill-current\" />\n\t\t\t</DropdownMenuPrimitive.ItemIndicator>\n\t\t</span>\n\t\t{children}\n\t</DropdownMenuPrimitive.RadioItem>\n));\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;\n\nconst DropdownMenuLabel = React.forwardRef<\n\tReact.ElementRef<typeof DropdownMenuPrimitive.Label>,\n\tReact.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n\t\tinset?: boolean;\n\t}\n>(({ className, inset, ...props }, ref) => (\n\t<DropdownMenuPrimitive.Label\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"px-2 py-1.5 text-sm font-semibold\",\n\t\t\tinset && \"pl-8\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\n\nconst DropdownMenuSeparator = React.forwardRef<\n\tReact.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n\tReact.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n\t<DropdownMenuPrimitive.Separator\n\t\tref={ref}\n\t\tclassName={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n\t\t{...props}\n\t/>\n));\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\n\nconst DropdownMenuShortcut = ({\n\tclassName,\n\t...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n\treturn (\n\t\t<span\n\t\t\tclassName={cn(\"ml-auto text-xs tracking-widest opacity-60\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\";\n\nexport {\n\tDropdownMenu,\n\tDropdownMenuTrigger,\n\tDropdownMenuContent,\n\tDropdownMenuItem,\n\tDropdownMenuCheckboxItem,\n\tDropdownMenuRadioItem,\n\tDropdownMenuLabel,\n\tDropdownMenuSeparator,\n\tDropdownMenuShortcut,\n\tDropdownMenuGroup,\n\tDropdownMenuPortal,\n\tDropdownMenuSub,\n\tDropdownMenuSubContent,\n\tDropdownMenuSubTrigger,\n\tDropdownMenuRadioGroup,\n};\n"
  },
  {
    "path": "apps/dokploy/components/ui/dropzone.tsx",
    "content": "import { FolderIcon } from \"lucide-react\";\nimport React, { type ChangeEvent, useRef } from \"react\";\nimport { Card, CardContent } from \"@/components/ui/card\";\nimport { Input } from \"@/components/ui/input\";\nimport { cn } from \"@/lib/utils\";\n\ninterface DropzoneProps\n\textends Omit<\n\t\tReact.InputHTMLAttributes<HTMLInputElement>,\n\t\t\"value\" | \"onChange\"\n\t> {\n\tclassNameWrapper?: string;\n\tclassName?: string;\n\tdropMessage: string;\n\tonChange: (acceptedFiles: FileList | null) => void;\n}\n\nexport const Dropzone = React.forwardRef<HTMLDivElement, DropzoneProps>(\n\t({ className, classNameWrapper, dropMessage, onChange, ...props }, ref) => {\n\t\tconst inputRef = useRef<HTMLInputElement | null>(null);\n\t\t// Function to handle drag over event\n\t\tconst handleDragOver = (e: React.DragEvent<HTMLDivElement>) => {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\tonChange(null);\n\t\t};\n\n\t\t// Function to handle drop event\n\t\tconst handleDrop = (e: React.DragEvent<HTMLDivElement>) => {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\tconst { files } = e.dataTransfer;\n\t\t\tif (inputRef.current) {\n\t\t\t\tinputRef.current.files = files;\n\t\t\t\tonChange(files);\n\t\t\t}\n\t\t};\n\n\t\t// Function to simulate a click on the file input element\n\t\tconst handleButtonClick = () => {\n\t\t\tif (inputRef.current) {\n\t\t\t\tinputRef.current.click();\n\t\t\t}\n\t\t};\n\t\treturn (\n\t\t\t<Card\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"border-2 border-dashed bg-muted/20 hover:cursor-pointer hover:border-muted-foreground/50 \",\n\t\t\t\t\tclassNameWrapper,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t<CardContent\n\t\t\t\t\tclassName=\"flex flex-col items-center justify-center space-y-2 px-2 py-4 text-xs h-96\"\n\t\t\t\t\tonDragOver={handleDragOver}\n\t\t\t\t\tonDrop={handleDrop}\n\t\t\t\t\tonClick={handleButtonClick}\n\t\t\t\t>\n\t\t\t\t\t<div className=\"flex items-center justify-center text-muted-foreground\">\n\t\t\t\t\t\t<span className=\"font-medium text-xl flex items-center gap-2\">\n\t\t\t\t\t\t\t<FolderIcon className=\"size-6 text-muted-foreground\" />\n\t\t\t\t\t\t\t{dropMessage}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t{...props}\n\t\t\t\t\t\t\tvalue={undefined}\n\t\t\t\t\t\t\tref={inputRef}\n\t\t\t\t\t\t\ttype=\"file\"\n\t\t\t\t\t\t\tclassName={cn(\"hidden\", className)}\n\t\t\t\t\t\t\tonChange={(e: ChangeEvent<HTMLInputElement>) => {\n\t\t\t\t\t\t\t\tonChange(e.target.files);\n\t\t\t\t\t\t\t\te.target.value = \"\";\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</CardContent>\n\t\t\t</Card>\n\t\t);\n\t},\n);\n"
  },
  {
    "path": "apps/dokploy/components/ui/file-tree.tsx",
    "content": "\"use client\";\n\nimport * as AccordionPrimitive from \"@radix-ui/react-accordion\";\n// import { ScrollArea } from \"@acme/components/ui/scroll-area\";\n// import { cn } from \"@acme/components/lib/utils\";\nimport { ChevronRight, type LucideIcon } from \"lucide-react\";\nimport React from \"react\";\nimport useResizeObserver from \"use-resize-observer\";\nimport { cn } from \"@/lib/utils\";\nimport { ScrollArea } from \"./scroll-area\";\n\ninterface TreeDataItem {\n\tid: string;\n\tname: string;\n\ticon?: LucideIcon;\n\ttype: \"file\" | \"directory\";\n\tchildren?: TreeDataItem[];\n}\n\ntype TreeProps = React.HTMLAttributes<HTMLDivElement> & {\n\tdata: TreeDataItem[] | TreeDataItem;\n\tinitialSlelectedItemId?: string;\n\tonSelectChange?: (item: TreeDataItem | undefined) => void;\n\texpandAll?: boolean;\n\tfolderIcon?: LucideIcon;\n\titemIcon?: LucideIcon;\n};\n\nconst Tree = React.forwardRef<HTMLDivElement, TreeProps>(\n\t(\n\t\t{\n\t\t\tdata,\n\t\t\tinitialSlelectedItemId,\n\t\t\tonSelectChange,\n\t\t\texpandAll,\n\t\t\tfolderIcon,\n\t\t\titemIcon,\n\t\t\tclassName,\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst [selectedItemId, setSelectedItemId] = React.useState<\n\t\t\tstring | undefined\n\t\t>(initialSlelectedItemId);\n\n\t\tconst handleSelectChange = React.useCallback(\n\t\t\t(item: TreeDataItem | undefined) => {\n\t\t\t\tsetSelectedItemId(item?.id);\n\t\t\t\tif (onSelectChange && item?.type === \"file\") {\n\t\t\t\t\tonSelectChange(item);\n\t\t\t\t}\n\t\t\t},\n\t\t\t[onSelectChange],\n\t\t);\n\n\t\tconst expandedItemIds = React.useMemo(() => {\n\t\t\tif (!initialSlelectedItemId) {\n\t\t\t\treturn [] as string[];\n\t\t\t}\n\n\t\t\tconst ids: string[] = [];\n\n\t\t\tfunction walkTreeItems(\n\t\t\t\titems: TreeDataItem[] | TreeDataItem,\n\t\t\t\ttargetId: string,\n\t\t\t) {\n\t\t\t\tif (Array.isArray(items)) {\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/prefer-for-of\n\t\t\t\t\tfor (let i = 0; i < items.length; i++) {\n\t\t\t\t\t\tids.push(items[i]!.id);\n\t\t\t\t\t\tif (walkTreeItems(items[i]!, targetId) && !expandAll) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!expandAll) ids.pop();\n\t\t\t\t\t}\n\t\t\t\t} else if (!expandAll && items.id === targetId) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else if (items.children) {\n\t\t\t\t\treturn walkTreeItems(items.children, targetId);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\twalkTreeItems(data, initialSlelectedItemId);\n\t\t\treturn ids;\n\t\t}, [data, initialSlelectedItemId]);\n\n\t\tconst { ref: refRoot } = useResizeObserver();\n\n\t\treturn (\n\t\t\t<div ref={refRoot} className={cn(\"overflow-y-auto\", className)}>\n\t\t\t\t<ScrollArea>\n\t\t\t\t\t<div className=\"relative p-2\">\n\t\t\t\t\t\t<TreeItem\n\t\t\t\t\t\t\tdata={data}\n\t\t\t\t\t\t\tref={ref}\n\t\t\t\t\t\t\tselectedItemId={selectedItemId}\n\t\t\t\t\t\t\thandleSelectChange={handleSelectChange}\n\t\t\t\t\t\t\texpandedItemIds={expandedItemIds}\n\t\t\t\t\t\t\tFolderIcon={folderIcon}\n\t\t\t\t\t\t\tItemIcon={itemIcon}\n\t\t\t\t\t\t\t{...props}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</ScrollArea>\n\t\t\t</div>\n\t\t);\n\t},\n);\n\nTree.displayName = \"Tree\";\n\ntype TreeItemProps = TreeProps & {\n\tselectedItemId?: string;\n\thandleSelectChange: (item: TreeDataItem | undefined) => void;\n\texpandedItemIds: string[];\n\tFolderIcon?: LucideIcon;\n\tItemIcon?: LucideIcon;\n};\n\nconst TreeItem = React.forwardRef<HTMLDivElement, TreeItemProps>(\n\t(\n\t\t{\n\t\t\tclassName,\n\t\t\tdata,\n\t\t\tselectedItemId,\n\t\t\thandleSelectChange,\n\t\t\texpandedItemIds,\n\t\t\tFolderIcon,\n\t\t\tItemIcon,\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => {\n\t\treturn (\n\t\t\t<div ref={ref} role=\"tree\" className={className} {...props}>\n\t\t\t\t<ul>\n\t\t\t\t\t{Array.isArray(data) ? (\n\t\t\t\t\t\tdata.map((item) => (\n\t\t\t\t\t\t\t<li key={item.id}>\n\t\t\t\t\t\t\t\t{item.children ? (\n\t\t\t\t\t\t\t\t\t<AccordionPrimitive.Root\n\t\t\t\t\t\t\t\t\t\ttype=\"multiple\"\n\t\t\t\t\t\t\t\t\t\tdefaultValue={expandedItemIds}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<AccordionPrimitive.Item value={item.id}>\n\t\t\t\t\t\t\t\t\t\t\t<AccordionTrigger\n\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"px-2 hover:before:opacity-100  before:absolute before:left-0 before:w-full before:opacity-0 before:bg-muted/80 before:h-[1.75rem] before:-z-10 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tselectedItemId === item.id &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"before:opacity-100 before:bg-accent text-accent-foreground before:border-l-2 before:border-l-accent-foreground/50 dark:before:border-0\",\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => handleSelectChange(item)}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{item.icon && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<item.icon\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-4 w-4 shrink-0 mr-2 text-accent-foreground/50\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t{!item.icon && FolderIcon && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FolderIcon\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"h-4 w-4 shrink-0 mr-2 text-accent-foreground/50\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm truncate font-mono\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{item.name}\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t</AccordionTrigger>\n\t\t\t\t\t\t\t\t\t\t\t<AccordionContent className=\"pl-6\">\n\t\t\t\t\t\t\t\t\t\t\t\t{item.children.length === 0 && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"text-sm text-muted-foreground pl-6\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tNo items\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t<TreeItem\n\t\t\t\t\t\t\t\t\t\t\t\t\tdata={item.children ? item.children : item}\n\t\t\t\t\t\t\t\t\t\t\t\t\tselectedItemId={selectedItemId}\n\t\t\t\t\t\t\t\t\t\t\t\t\thandleSelectChange={handleSelectChange}\n\t\t\t\t\t\t\t\t\t\t\t\t\texpandedItemIds={expandedItemIds}\n\t\t\t\t\t\t\t\t\t\t\t\t\tFolderIcon={FolderIcon}\n\t\t\t\t\t\t\t\t\t\t\t\t\tItemIcon={ItemIcon}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</AccordionContent>\n\t\t\t\t\t\t\t\t\t\t</AccordionPrimitive.Item>\n\t\t\t\t\t\t\t\t\t</AccordionPrimitive.Root>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<Leaf\n\t\t\t\t\t\t\t\t\t\titem={item}\n\t\t\t\t\t\t\t\t\t\tisSelected={selectedItemId === item.id}\n\t\t\t\t\t\t\t\t\t\tonClick={() => handleSelectChange(item)}\n\t\t\t\t\t\t\t\t\t\tIcon={ItemIcon}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t))\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<Leaf\n\t\t\t\t\t\t\t\titem={data}\n\t\t\t\t\t\t\t\tisSelected={selectedItemId === data.id}\n\t\t\t\t\t\t\t\tonClick={() => handleSelectChange(data)}\n\t\t\t\t\t\t\t\tIcon={ItemIcon}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t)}\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t);\n\t},\n);\n\nTreeItem.displayName = \"TreeItem\";\n\nconst Leaf = React.forwardRef<\n\tHTMLButtonElement,\n\tReact.HTMLAttributes<HTMLButtonElement> & {\n\t\titem: TreeDataItem;\n\t\tisSelected?: boolean;\n\t\tIcon?: LucideIcon;\n\t}\n>(({ className, item, isSelected, Icon, ...props }, ref) => {\n\treturn (\n\t\t<button\n\t\t\tref={ref}\n\t\t\ttype=\"button\"\n\t\t\tclassName={cn(\n\t\t\t\t\"flex items-center py-2 px-2 cursor-pointer \\\n\t\t\thover:before:opacity-100 before:absolute before:left-0 before:right-1 before:w-full transition-colors before:opacity-0 before:bg-muted/80 before:h-[1.75rem] before:-z-10 rounded-lg focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 relative focus-visible:z-10 w-full\",\n\t\t\t\tclassName,\n\t\t\t\tisSelected &&\n\t\t\t\t\t\"before:opacity-100 before:bg-accent bg-border rounded-lg   text-accent-foreground before:border-l-2 before:border-l-accent-foreground/50 dark:before:border-0\",\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{item.icon && (\n\t\t\t\t<item.icon\n\t\t\t\t\tclassName=\"h-4 w-4 shrink-0 mr-2 text-accent-foreground/50\"\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{!item.icon && Icon && (\n\t\t\t\t<Icon\n\t\t\t\t\tclassName=\"h-4 w-4 shrink-0 mr-2 text-accent-foreground/50\"\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t<p className=\"text-sm whitespace-normal font-mono text-left\">\n\t\t\t\t{item.name}\n\t\t\t</p>\n\t\t</button>\n\t);\n});\n\nLeaf.displayName = \"Leaf\";\n\nconst AccordionTrigger = React.forwardRef<\n\tReact.ElementRef<typeof AccordionPrimitive.Trigger>,\n\tReact.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n\t<AccordionPrimitive.Header>\n\t\t<AccordionPrimitive.Trigger\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"flex flex-1 w-full items-center py-2 transition-all last:[&[data-state=open]>svg]:rotate-90\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t\t<ChevronRight className=\"h-4 w-4 shrink-0 transition-transform duration-200 text-accent-foreground/50 ml-auto\" />\n\t\t</AccordionPrimitive.Trigger>\n\t</AccordionPrimitive.Header>\n));\nAccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;\n\nconst AccordionContent = React.forwardRef<\n\tReact.ElementRef<typeof AccordionPrimitive.Content>,\n\tReact.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n\t<AccordionPrimitive.Content\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t<div className=\"pb-1 pt-0\">{children}</div>\n\t</AccordionPrimitive.Content>\n));\nAccordionContent.displayName = AccordionPrimitive.Content.displayName;\n\nexport { Tree, type TreeDataItem };\n"
  },
  {
    "path": "apps/dokploy/components/ui/form.tsx",
    "content": "import type * as LabelPrimitive from \"@radix-ui/react-label\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport * as React from \"react\";\nimport {\n\tController,\n\ttype ControllerProps,\n\ttype FieldPath,\n\ttype FieldValues,\n\tFormProvider,\n\tuseFormContext,\n} from \"react-hook-form\";\n\nimport { Label } from \"@/components/ui/label\";\nimport { cn } from \"@/lib/utils\";\n\nconst Form = FormProvider;\n\ntype FormFieldContextValue<\n\tTFieldValues extends FieldValues = FieldValues,\n\tTName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = {\n\tname: TName;\n};\n\nconst FormFieldContext = React.createContext<FormFieldContextValue>(\n\t{} as FormFieldContextValue,\n);\n\nconst FormField = <\n\tTFieldValues extends FieldValues = FieldValues,\n\tTName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({\n\t...props\n}: ControllerProps<TFieldValues, TName>) => {\n\treturn (\n\t\t<FormFieldContext.Provider value={{ name: props.name }}>\n\t\t\t<Controller {...props} />\n\t\t</FormFieldContext.Provider>\n\t);\n};\n\nconst useFormField = () => {\n\tconst fieldContext = React.useContext(FormFieldContext);\n\tconst itemContext = React.useContext(FormItemContext);\n\tconst { getFieldState, formState } = useFormContext();\n\n\tconst fieldState = getFieldState(fieldContext.name, formState);\n\n\tif (!fieldContext) {\n\t\tthrow new Error(\"useFormField should be used within <FormField>\");\n\t}\n\n\tconst { id } = itemContext;\n\n\treturn {\n\t\tid,\n\t\tname: fieldContext.name,\n\t\tformItemId: `${id}-form-item`,\n\t\tformDescriptionId: `${id}-form-item-description`,\n\t\tformMessageId: `${id}-form-item-message`,\n\t\t...fieldState,\n\t};\n};\n\ntype FormItemContextValue = {\n\tid: string;\n};\n\nconst FormItemContext = React.createContext<FormItemContextValue>(\n\t{} as FormItemContextValue,\n);\n\nconst FormItem = React.forwardRef<\n\tHTMLDivElement,\n\tReact.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => {\n\tconst id = React.useId();\n\n\treturn (\n\t\t<FormItemContext.Provider value={{ id }}>\n\t\t\t<div ref={ref} className={cn(\"space-y-2\", className)} {...props} />\n\t\t</FormItemContext.Provider>\n\t);\n});\nFormItem.displayName = \"FormItem\";\n\nconst FormLabel = React.forwardRef<\n\tReact.ElementRef<typeof LabelPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>\n>(({ className, ...props }, ref) => {\n\tconst { formItemId } = useFormField();\n\n\treturn (\n\t\t<Label\n\t\t\tref={ref}\n\t\t\tclassName={cn(className)}\n\t\t\thtmlFor={formItemId}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nFormLabel.displayName = \"FormLabel\";\n\nconst FormControl = React.forwardRef<\n\tReact.ElementRef<typeof Slot>,\n\tReact.ComponentPropsWithoutRef<typeof Slot>\n>(({ ...props }, ref) => {\n\tconst { error, formItemId, formDescriptionId, formMessageId } =\n\t\tuseFormField();\n\n\treturn (\n\t\t<Slot\n\t\t\tref={ref}\n\t\t\tid={formItemId}\n\t\t\taria-describedby={\n\t\t\t\t!error\n\t\t\t\t\t? `${formDescriptionId}`\n\t\t\t\t\t: `${formDescriptionId} ${formMessageId}`\n\t\t\t}\n\t\t\taria-invalid={!!error}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nFormControl.displayName = \"FormControl\";\n\nconst FormDescription = React.forwardRef<\n\tHTMLParagraphElement,\n\tReact.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => {\n\tconst { formDescriptionId } = useFormField();\n\n\treturn (\n\t\t<p\n\t\t\tref={ref}\n\t\t\tid={formDescriptionId}\n\t\t\tclassName={cn(\"text-sm text-muted-foreground\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nFormDescription.displayName = \"FormDescription\";\n\nconst FormMessage = React.forwardRef<\n\tHTMLParagraphElement,\n\tReact.HTMLAttributes<HTMLParagraphElement>\n>(({ className, children, ...props }, ref) => {\n\tconst { error, formMessageId } = useFormField();\n\tconst body = error ? String(error?.message) : children;\n\tif (!body) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<p\n\t\t\tref={ref}\n\t\t\tid={formMessageId}\n\t\t\tclassName={cn(\"text-sm font-medium text-destructive\", className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{body}\n\t\t</p>\n\t);\n});\nFormMessage.displayName = \"FormMessage\";\n\nexport {\n\tuseFormField,\n\tForm,\n\tFormItem,\n\tFormLabel,\n\tFormControl,\n\tFormDescription,\n\tFormMessage,\n\tFormField,\n};\n"
  },
  {
    "path": "apps/dokploy/components/ui/input-otp.tsx",
    "content": "import { OTPInput, OTPInputContext } from \"input-otp\";\nimport { Dot } from \"lucide-react\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst InputOTP = React.forwardRef<\n\tReact.ElementRef<typeof OTPInput>,\n\tReact.ComponentPropsWithoutRef<typeof OTPInput>\n>(({ className, containerClassName, ...props }, ref) => (\n\t<OTPInput\n\t\tref={ref}\n\t\tcontainerClassName={cn(\n\t\t\t\"flex items-center gap-2 has-[:disabled]:opacity-50\",\n\t\t\tcontainerClassName,\n\t\t)}\n\t\tclassName={cn(\"disabled:cursor-not-allowed\", className)}\n\t\t{...props}\n\t/>\n));\nInputOTP.displayName = \"InputOTP\";\n\nconst InputOTPGroup = React.forwardRef<\n\tReact.ElementRef<\"div\">,\n\tReact.ComponentPropsWithoutRef<\"div\">\n>(({ className, ...props }, ref) => (\n\t<div ref={ref} className={cn(\"flex items-center\", className)} {...props} />\n));\nInputOTPGroup.displayName = \"InputOTPGroup\";\n\nconst InputOTPSlot = React.forwardRef<\n\tReact.ElementRef<\"div\">,\n\tReact.ComponentPropsWithoutRef<\"div\"> & { index: number }\n>(({ index, className, ...props }, ref) => {\n\tconst inputOTPContext = React.useContext(OTPInputContext);\n\t// @ts-ignore\n\tconst { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];\n\n\treturn (\n\t\t<div\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md\",\n\t\t\t\tisActive && \"z-10 ring-2 ring-ring ring-offset-background\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{char}\n\t\t\t{hasFakeCaret && (\n\t\t\t\t<div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n\t\t\t\t\t<div className=\"h-4 w-px animate-caret-blink bg-foreground duration-1000\" />\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n});\nInputOTPSlot.displayName = \"InputOTPSlot\";\n\nconst InputOTPSeparator = React.forwardRef<\n\tReact.ElementRef<\"div\">,\n\tReact.ComponentPropsWithoutRef<\"div\">\n>(({ ...props }, ref) => (\n\t<div ref={ref} {...props}>\n\t\t<Dot />\n\t</div>\n));\nInputOTPSeparator.displayName = \"InputOTPSeparator\";\n\nexport { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };\n"
  },
  {
    "path": "apps/dokploy/components/ui/input.tsx",
    "content": "import { EyeIcon, EyeOffIcon, RefreshCcw } from \"lucide-react\";\nimport * as React from \"react\";\nimport { generateRandomPassword } from \"@/lib/password-utils\";\nimport { cn } from \"@/lib/utils\";\n\nexport interface InputProps\n\textends React.InputHTMLAttributes<HTMLInputElement> {\n\terrorMessage?: string;\n\tenablePasswordGenerator?: boolean;\n\tpasswordGeneratorLength?: number;\n}\n\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n\t(\n\t\t{\n\t\t\tclassName,\n\t\t\terrorMessage,\n\t\t\ttype,\n\t\t\tenablePasswordGenerator = false,\n\t\t\tpasswordGeneratorLength,\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst [showPassword, setShowPassword] = React.useState(false);\n\t\tconst inputRef = React.useRef<HTMLInputElement>(null);\n\t\tconst isPassword = type === \"password\";\n\t\tconst shouldShowGenerator =\n\t\t\tisPassword &&\n\t\t\tenablePasswordGenerator !== false &&\n\t\t\t!props.disabled &&\n\t\t\t!props.readOnly;\n\t\tconst inputType = isPassword ? (showPassword ? \"text\" : \"password\") : type;\n\n\t\tconst setRefs = React.useCallback(\n\t\t\t(node: HTMLInputElement | null) => {\n\t\t\t\t// @ts-ignore\n\t\t\t\tinputRef.current = node;\n\t\t\t\tif (typeof ref === \"function\") {\n\t\t\t\t\tref(node);\n\t\t\t\t} else if (ref) {\n\t\t\t\t\tref.current = node;\n\t\t\t\t}\n\t\t\t},\n\t\t\t[ref],\n\t\t);\n\n\t\tconst handleGeneratePassword = () => {\n\t\t\tconst nextValue =\n\t\t\t\ttypeof passwordGeneratorLength === \"number\" &&\n\t\t\t\tpasswordGeneratorLength > 0\n\t\t\t\t\t? generateRandomPassword(Math.floor(passwordGeneratorLength))\n\t\t\t\t\t: generateRandomPassword();\n\n\t\t\tconst input = inputRef.current;\n\t\t\tif (!input) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst valueSetter = Object.getOwnPropertyDescriptor(\n\t\t\t\tHTMLInputElement.prototype,\n\t\t\t\t\"value\",\n\t\t\t)?.set;\n\t\t\tif (valueSetter) {\n\t\t\t\tvalueSetter.call(input, nextValue);\n\t\t\t} else {\n\t\t\t\tinput.value = nextValue;\n\t\t\t}\n\n\t\t\tinput.dispatchEvent(new Event(\"input\", { bubbles: true }));\n\t\t};\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<div className=\"relative w-full\">\n\t\t\t\t\t<input\n\t\t\t\t\t\ttype={inputType}\n\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t// bg-gray\n\t\t\t\t\t\t\t\"flex h-10 w-full rounded-md bg-input px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border disabled:cursor-not-allowed disabled:opacity-50\",\n\t\t\t\t\t\t\tisPassword && (shouldShowGenerator ? \"pr-16\" : \"pr-10\"),\n\t\t\t\t\t\t\tclassName,\n\t\t\t\t\t\t)}\n\t\t\t\t\t\tref={setRefs}\n\t\t\t\t\t\t{...props}\n\t\t\t\t\t/>\n\t\t\t\t\t{isPassword && (\n\t\t\t\t\t\t<div className=\"absolute inset-y-0 right-0 flex items-center gap-1 pr-3 text-muted-foreground\">\n\t\t\t\t\t\t\t{shouldShowGenerator && (\n\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\tclassName=\"hover:text-foreground focus:outline-none\"\n\t\t\t\t\t\t\t\t\tonClick={handleGeneratePassword}\n\t\t\t\t\t\t\t\t\taria-label=\"Generate password\"\n\t\t\t\t\t\t\t\t\ttitle=\"Generate password\"\n\t\t\t\t\t\t\t\t\ttabIndex={-1}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<RefreshCcw className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tclassName=\"hover:text-foreground focus:outline-none\"\n\t\t\t\t\t\t\t\tonClick={() => setShowPassword(!showPassword)}\n\t\t\t\t\t\t\t\ttabIndex={-1}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{showPassword ? (\n\t\t\t\t\t\t\t\t\t<EyeOffIcon className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<EyeIcon className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t{errorMessage && (\n\t\t\t\t\t<span className=\"text-sm text-red-600 text-secondary-foreground\">\n\t\t\t\t\t\t{errorMessage}\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\t\t\t</>\n\t\t);\n\t},\n);\nInput.displayName = \"Input\";\n\nconst NumberInput = React.forwardRef<HTMLInputElement, InputProps>(\n\t({ className, errorMessage, ...props }, ref) => {\n\t\treturn (\n\t\t\t<Input\n\t\t\t\ttype=\"text\"\n\t\t\t\tclassName={cn(\"text-left\", className)}\n\t\t\t\tref={ref}\n\t\t\t\t{...props}\n\t\t\t\tvalue={props.value === undefined ? undefined : String(props.value)}\n\t\t\t\tonChange={(e) => {\n\t\t\t\t\tconst value = e.target.value;\n\t\t\t\t\tif (value === \"\") {\n\t\t\t\t\t\tprops.onChange?.(e);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst number = Number.parseInt(value, 10);\n\t\t\t\t\t\tif (!Number.isNaN(number)) {\n\t\t\t\t\t\t\tconst syntheticEvent = {\n\t\t\t\t\t\t\t\t...e,\n\t\t\t\t\t\t\t\ttarget: {\n\t\t\t\t\t\t\t\t\t...e.target,\n\t\t\t\t\t\t\t\t\tvalue: number,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tprops.onChange?.(\n\t\t\t\t\t\t\t\tsyntheticEvent as unknown as React.ChangeEvent<HTMLInputElement>,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t/>\n\t\t);\n\t},\n);\nNumberInput.displayName = \"NumberInput\";\n\nexport { Input, NumberInput };\n"
  },
  {
    "path": "apps/dokploy/components/ui/label.tsx",
    "content": "import * as LabelPrimitive from \"@radix-ui/react-label\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst labelVariants = cva(\n\t\"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\",\n);\n\nconst Label = React.forwardRef<\n\tReact.ElementRef<typeof LabelPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &\n\t\tVariantProps<typeof labelVariants>\n>(({ className, ...props }, ref) => (\n\t<LabelPrimitive.Root\n\t\tref={ref}\n\t\tclassName={cn(labelVariants(), className)}\n\t\t{...props}\n\t/>\n));\nLabel.displayName = LabelPrimitive.Root.displayName;\n\nexport { Label };\n"
  },
  {
    "path": "apps/dokploy/components/ui/modeToggle.tsx",
    "content": "\"use client\";\n\nimport { Moon, Sun } from \"lucide-react\";\nimport { useTheme } from \"next-themes\";\nimport { Button } from \"@/components/ui/button\";\n\nexport function ModeToggle() {\n\tconst { theme, setTheme } = useTheme();\n\n\tconst toggleTheme = () => {\n\t\tif (theme === \"dark\") {\n\t\t\tsetTheme(\"light\");\n\t\t} else {\n\t\t\tsetTheme(\"dark\");\n\t\t}\n\t};\n\n\treturn (\n\t\t<Button variant=\"outline\" size=\"icon\" onClick={toggleTheme}>\n\t\t\t<Sun className=\"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0\" />\n\t\t\t<Moon className=\"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100\" />\n\t\t\t<span className=\"sr-only\">Toggle theme</span>\n\t\t</Button>\n\t);\n}\n"
  },
  {
    "path": "apps/dokploy/components/ui/number-input.tsx",
    "content": "import { MinusIcon, PlusIcon } from \"lucide-react\";\nimport { Button } from \"@/components/ui/button\";\nimport { Input } from \"@/components/ui/input\";\n\nexport interface UnitConverter {\n\ttoValue: (raw: string | undefined) => number;\n\tfromValue: (value: number) => string;\n\tformatDisplay: (value: number) => string;\n}\n\nexport const createConverter = (\n\tmultiplier: number,\n\tformatDisplay: (value: number) => string,\n): UnitConverter => ({\n\ttoValue: (raw) => {\n\t\tif (!raw) return 0;\n\t\tconst value = Number.parseInt(raw, 10);\n\t\treturn Number.isNaN(value) ? 0 : value / multiplier;\n\t},\n\tfromValue: (value) =>\n\t\tvalue <= 0 ? \"\" : String(Math.round(value * multiplier)),\n\tformatDisplay,\n});\n\ninterface NumberInputWithStepsProps {\n\tvalue: string | undefined;\n\tonChange: (value: string) => void;\n\tplaceholder: string;\n\tstep: number;\n\tconverter: UnitConverter;\n}\n\nexport const NumberInputWithSteps = ({\n\tvalue,\n\tonChange,\n\tplaceholder,\n\tstep,\n\tconverter,\n}: NumberInputWithStepsProps) => {\n\tconst numericValue = converter.toValue(value);\n\tconst displayValue = converter.formatDisplay(numericValue);\n\n\tconst handleIncrement = () =>\n\t\tonChange(converter.fromValue(numericValue + step));\n\tconst handleDecrement = () =>\n\t\tonChange(converter.fromValue(Math.max(0, numericValue - step)));\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t<Button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\tclassName=\"h-9 w-9 shrink-0\"\n\t\t\t\t\tonClick={handleDecrement}\n\t\t\t\t\tdisabled={numericValue <= 0}\n\t\t\t\t>\n\t\t\t\t\t<MinusIcon className=\"h-4 w-4\" />\n\t\t\t\t</Button>\n\t\t\t\t<Input\n\t\t\t\t\tplaceholder={placeholder}\n\t\t\t\t\tvalue={value || \"\"}\n\t\t\t\t\tonChange={(e) => onChange(e.target.value)}\n\t\t\t\t\tclassName=\"text-center\"\n\t\t\t\t/>\n\t\t\t\t<Button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\tclassName=\"h-9 w-9 shrink-0\"\n\t\t\t\t\tonClick={handleIncrement}\n\t\t\t\t>\n\t\t\t\t\t<PlusIcon className=\"h-4 w-4\" />\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t\t{displayValue && (\n\t\t\t\t<span className=\"text-xs text-muted-foreground text-center\">\n\t\t\t\t\t{displayValue}\n\t\t\t\t</span>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/ui/popover.tsx",
    "content": "import * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Popover = PopoverPrimitive.Root;\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\n\nconst PopoverContent = React.forwardRef<\n\tReact.ElementRef<typeof PopoverPrimitive.Content>,\n\tReact.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n\t<PopoverPrimitive.Portal>\n\t\t<PopoverPrimitive.Content\n\t\t\tref={ref}\n\t\t\talign={align}\n\t\t\tsideOffset={sideOffset}\n\t\t\tclassName={cn(\n\t\t\t\t\"z-50 w-full rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t</PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\nexport { Popover, PopoverTrigger, PopoverContent };\n"
  },
  {
    "path": "apps/dokploy/components/ui/progress.tsx",
    "content": "import * as ProgressPrimitive from \"@radix-ui/react-progress\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Progress = React.forwardRef<\n\tReact.ElementRef<typeof ProgressPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>\n>(({ className, value, ...props }, ref) => (\n\t<ProgressPrimitive.Root\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"relative h-4 w-full overflow-hidden rounded-full bg-secondary\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t<ProgressPrimitive.Indicator\n\t\t\tclassName=\"h-full w-full flex-1 bg-primary transition-all\"\n\t\t\tstyle={{ transform: `translateX(-${100 - (value || 0)}%)` }}\n\t\t/>\n\t</ProgressPrimitive.Root>\n));\nProgress.displayName = ProgressPrimitive.Root.displayName;\n\nexport { Progress };\n"
  },
  {
    "path": "apps/dokploy/components/ui/radio-group.tsx",
    "content": "import * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\";\nimport { Circle } from \"lucide-react\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst RadioGroup = React.forwardRef<\n\tReact.ElementRef<typeof RadioGroupPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\n>(({ className, ...props }, ref) => {\n\treturn (\n\t\t<RadioGroupPrimitive.Root\n\t\t\tclassName={cn(\"grid gap-2\", className)}\n\t\t\t{...props}\n\t\t\tref={ref}\n\t\t/>\n\t);\n});\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName;\n\nconst RadioGroupItem = React.forwardRef<\n\tReact.ElementRef<typeof RadioGroupPrimitive.Item>,\n\tReact.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>\n>(({ className, ...props }, ref) => {\n\treturn (\n\t\t<RadioGroupPrimitive.Item\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\n\t\t\t\t<Circle className=\"h-2.5 w-2.5 fill-current text-current\" />\n\t\t\t</RadioGroupPrimitive.Indicator>\n\t\t</RadioGroupPrimitive.Item>\n\t);\n});\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;\n\nexport { RadioGroup, RadioGroupItem };\n"
  },
  {
    "path": "apps/dokploy/components/ui/scroll-area.tsx",
    "content": "import * as ScrollAreaPrimitive from \"@radix-ui/react-scroll-area\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst ScrollArea = React.forwardRef<\n\tReact.ElementRef<typeof ScrollAreaPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root> & {\n\t\tviewPortClassName?: string;\n\t}\n>(({ className, children, ...props }, ref) => (\n\t<ScrollAreaPrimitive.Root\n\t\tref={ref}\n\t\tclassName={cn(\"relative overflow-hidden\", className)}\n\t\t{...props}\n\t>\n\t\t<ScrollAreaPrimitive.Viewport\n\t\t\t// [&>div]:!block\n\t\t\tclassName={cn(\"h-full w-full rounded-[inherit] \")}\n\t\t>\n\t\t\t{children}\n\t\t</ScrollAreaPrimitive.Viewport>\n\t\t<ScrollBar />\n\t\t<ScrollAreaPrimitive.Corner />\n\t</ScrollAreaPrimitive.Root>\n));\nScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;\n\nconst ScrollBar = React.forwardRef<\n\tReact.ElementRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>,\n\tReact.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>\n>(({ className, orientation = \"vertical\", ...props }, ref) => (\n\t<ScrollAreaPrimitive.ScrollAreaScrollbar\n\t\tref={ref}\n\t\torientation={orientation}\n\t\tclassName={cn(\n\t\t\t\"flex touch-none select-none transition-colors\",\n\t\t\torientation === \"vertical\" &&\n\t\t\t\t\"h-full w-2.5 border-l border-l-transparent p-[1px]\",\n\t\t\torientation === \"horizontal\" &&\n\t\t\t\t\"h-2.5 flex-col border-t border-t-transparent p-[1px]\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t<ScrollAreaPrimitive.ScrollAreaThumb className=\"relative flex-1 rounded-full bg-border\" />\n\t</ScrollAreaPrimitive.ScrollAreaScrollbar>\n));\nScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;\n\nexport { ScrollArea, ScrollBar };\n"
  },
  {
    "path": "apps/dokploy/components/ui/secrets.tsx",
    "content": "import { EyeIcon, EyeOffIcon } from \"lucide-react\";\nimport { type CSSProperties, type ReactNode, useState } from \"react\";\nimport { useFormContext } from \"react-hook-form\";\nimport { CodeEditor } from \"@/components/shared/code-editor\";\nimport {\n\tCardContent,\n\tCardDescription,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport {\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Toggle } from \"@/components/ui/toggle\";\n\ninterface Props {\n\tname: string;\n\ttitle: string;\n\tdescription: ReactNode;\n\tplaceholder: string;\n}\n\nexport const Secrets = (props: Props) => {\n\tconst [isVisible, setIsVisible] = useState(true);\n\tconst form = useFormContext<Record<string, string>>();\n\n\treturn (\n\t\t<>\n\t\t\t<CardHeader className=\"flex flex-row w-full items-center justify-between px-0\">\n\t\t\t\t<div>\n\t\t\t\t\t<CardTitle className=\"text-xl\">{props.title}</CardTitle>\n\t\t\t\t\t<CardDescription>{props.description}</CardDescription>\n\t\t\t\t</div>\n\n\t\t\t\t<Toggle\n\t\t\t\t\taria-label=\"Toggle bold\"\n\t\t\t\t\tpressed={isVisible}\n\t\t\t\t\tonPressedChange={setIsVisible}\n\t\t\t\t>\n\t\t\t\t\t{isVisible ? (\n\t\t\t\t\t\t<EyeOffIcon className=\"h-4 w-4 text-muted-foreground\" />\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<EyeIcon className=\"h-4 w-4 text-muted-foreground\" />\n\t\t\t\t\t)}\n\t\t\t\t</Toggle>\n\t\t\t</CardHeader>\n\t\t\t<CardContent className=\"w-full space-y-4 p-0\">\n\t\t\t\t<FormField\n\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\tname={props.name}\n\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t<FormItem className=\"w-full\">\n\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t<CodeEditor\n\t\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tWebkitTextSecurity: isVisible ? \"disc\" : null,\n\t\t\t\t\t\t\t\t\t\t} as CSSProperties\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tlanguage=\"properties\"\n\t\t\t\t\t\t\t\t\tdisabled={isVisible}\n\t\t\t\t\t\t\t\t\tlineWrapping\n\t\t\t\t\t\t\t\t\tplaceholder={props.placeholder}\n\t\t\t\t\t\t\t\t\tclassName=\"h-96 font-mono\"\n\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</FormControl>\n\n\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t)}\n\t\t\t\t/>\n\t\t\t</CardContent>\n\t\t</>\n\t);\n};\n"
  },
  {
    "path": "apps/dokploy/components/ui/select.tsx",
    "content": "import * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { Check, ChevronDown, ChevronUp } from \"lucide-react\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Select = SelectPrimitive.Root;\n\nconst SelectGroup = SelectPrimitive.Group;\n\nconst SelectValue = SelectPrimitive.Value;\n\nconst SelectTrigger = React.forwardRef<\n\tReact.ElementRef<typeof SelectPrimitive.Trigger>,\n\tReact.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n\t<SelectPrimitive.Trigger\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"flex h-10 w-full items-center justify-between rounded-md border border-input bg-input px-3 py-2 text-sm  placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t{children}\n\t\t<SelectPrimitive.Icon asChild>\n\t\t\t<ChevronDown className=\"h-4 w-4 opacity-50\" />\n\t\t</SelectPrimitive.Icon>\n\t</SelectPrimitive.Trigger>\n));\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\n\nconst SelectScrollUpButton = React.forwardRef<\n\tReact.ElementRef<typeof SelectPrimitive.ScrollUpButton>,\n\tReact.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\n>(({ className, ...props }, ref) => (\n\t<SelectPrimitive.ScrollUpButton\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"flex cursor-default items-center justify-center py-1\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t<ChevronUp className=\"h-4 w-4\" />\n\t</SelectPrimitive.ScrollUpButton>\n));\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;\n\nconst SelectScrollDownButton = React.forwardRef<\n\tReact.ElementRef<typeof SelectPrimitive.ScrollDownButton>,\n\tReact.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\n>(({ className, ...props }, ref) => (\n\t<SelectPrimitive.ScrollDownButton\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"flex cursor-default items-center justify-center py-1\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t<ChevronDown className=\"h-4 w-4\" />\n\t</SelectPrimitive.ScrollDownButton>\n));\nSelectScrollDownButton.displayName =\n\tSelectPrimitive.ScrollDownButton.displayName;\n\nconst SelectContent = React.forwardRef<\n\tReact.ElementRef<typeof SelectPrimitive.Content>,\n\tReact.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>\n>(({ className, children, position = \"popper\", ...props }, ref) => (\n\t<SelectPrimitive.Portal>\n\t\t<SelectPrimitive.Content\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n\t\t\t\tposition === \"popper\" &&\n\t\t\t\t\t\"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tposition={position}\n\t\t\t{...props}\n\t\t>\n\t\t\t<SelectScrollUpButton />\n\t\t\t<SelectPrimitive.Viewport\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"p-1\",\n\t\t\t\t\tposition === \"popper\" &&\n\t\t\t\t\t\t\"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]\",\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</SelectPrimitive.Viewport>\n\t\t\t<SelectScrollDownButton />\n\t\t</SelectPrimitive.Content>\n\t</SelectPrimitive.Portal>\n));\nSelectContent.displayName = SelectPrimitive.Content.displayName;\n\nconst SelectLabel = React.forwardRef<\n\tReact.ElementRef<typeof SelectPrimitive.Label>,\n\tReact.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>\n>(({ className, ...props }, ref) => (\n\t<SelectPrimitive.Label\n\t\tref={ref}\n\t\tclassName={cn(\"py-1.5 pl-8 pr-2 text-sm font-semibold\", className)}\n\t\t{...props}\n\t/>\n));\nSelectLabel.displayName = SelectPrimitive.Label.displayName;\n\nconst SelectItem = React.forwardRef<\n\tReact.ElementRef<typeof SelectPrimitive.Item>,\n\tReact.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\n>(({ className, children, ...props }, ref) => (\n\t<SelectPrimitive.Item\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t<span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n\t\t\t<SelectPrimitive.ItemIndicator>\n\t\t\t\t<Check className=\"h-4 w-4\" />\n\t\t\t</SelectPrimitive.ItemIndicator>\n\t\t</span>\n\n\t\t<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n\t</SelectPrimitive.Item>\n));\nSelectItem.displayName = SelectPrimitive.Item.displayName;\n\nconst SelectSeparator = React.forwardRef<\n\tReact.ElementRef<typeof SelectPrimitive.Separator>,\n\tReact.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n\t<SelectPrimitive.Separator\n\t\tref={ref}\n\t\tclassName={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n\t\t{...props}\n\t/>\n));\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName;\n\nexport {\n\tSelect,\n\tSelectGroup,\n\tSelectValue,\n\tSelectTrigger,\n\tSelectContent,\n\tSelectLabel,\n\tSelectItem,\n\tSelectSeparator,\n\tSelectScrollUpButton,\n\tSelectScrollDownButton,\n};\n"
  },
  {
    "path": "apps/dokploy/components/ui/separator.tsx",
    "content": "import * as SeparatorPrimitive from \"@radix-ui/react-separator\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Separator = React.forwardRef<\n\tReact.ElementRef<typeof SeparatorPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>\n>(\n\t(\n\t\t{ className, orientation = \"horizontal\", decorative = true, ...props },\n\t\tref,\n\t) => (\n\t\t<SeparatorPrimitive.Root\n\t\t\tref={ref}\n\t\t\tdecorative={decorative}\n\t\t\torientation={orientation}\n\t\t\tclassName={cn(\n\t\t\t\t\"shrink-0 bg-border\",\n\t\t\t\torientation === \"horizontal\" ? \"h-[1px] w-full\" : \"h-full w-[1px]\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t),\n);\nSeparator.displayName = SeparatorPrimitive.Root.displayName;\n\nexport { Separator };\n"
  },
  {
    "path": "apps/dokploy/components/ui/sheet.tsx",
    "content": "import * as SheetPrimitive from \"@radix-ui/react-dialog\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { X } from \"lucide-react\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Sheet = SheetPrimitive.Root;\n\nconst SheetTrigger = SheetPrimitive.Trigger;\n\nconst SheetClose = SheetPrimitive.Close;\n\nconst SheetPortal = SheetPrimitive.Portal;\n\nconst SheetOverlay = React.forwardRef<\n\tReact.ElementRef<typeof SheetPrimitive.Overlay>,\n\tReact.ComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n\t<SheetPrimitive.Overlay\n\t\tclassName={cn(\n\t\t\t\"fixed inset-0 z-50 bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t\tref={ref}\n\t/>\n));\nSheetOverlay.displayName = SheetPrimitive.Overlay.displayName;\n\nconst sheetVariants = cva(\n\t\"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-300\",\n\t{\n\t\tvariants: {\n\t\t\tside: {\n\t\t\t\ttop: \"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top\",\n\t\t\t\tbottom:\n\t\t\t\t\t\"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom\",\n\t\t\t\tleft: \"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm\",\n\t\t\t\tright:\n\t\t\t\t\t\"inset-y-0 right-0 h-full w-3/4  border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tside: \"right\",\n\t\t},\n\t},\n);\n\ninterface SheetContentProps\n\textends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>,\n\t\tVariantProps<typeof sheetVariants> {}\n\nconst SheetContent = React.forwardRef<\n\tReact.ElementRef<typeof SheetPrimitive.Content>,\n\tSheetContentProps\n>(({ side = \"right\", className, children, ...props }, ref) => (\n\t<SheetPortal>\n\t\t<SheetOverlay />\n\t\t<SheetPrimitive.Content\n\t\t\tref={ref}\n\t\t\tclassName={cn(sheetVariants({ side }), className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t\t<SheetPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary\">\n\t\t\t\t<X className=\"h-4 w-4\" />\n\t\t\t\t<span className=\"sr-only\">Close</span>\n\t\t\t</SheetPrimitive.Close>\n\t\t</SheetPrimitive.Content>\n\t</SheetPortal>\n));\nSheetContent.displayName = SheetPrimitive.Content.displayName;\n\nconst SheetHeader = ({\n\tclassName,\n\t...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n\t<div\n\t\tclassName={cn(\n\t\t\t\"flex flex-col space-y-2 text-center sm:text-left\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n);\nSheetHeader.displayName = \"SheetHeader\";\n\nconst SheetFooter = ({\n\tclassName,\n\t...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n\t<div\n\t\tclassName={cn(\n\t\t\t\"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n);\nSheetFooter.displayName = \"SheetFooter\";\n\nconst SheetTitle = React.forwardRef<\n\tReact.ElementRef<typeof SheetPrimitive.Title>,\n\tReact.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>\n>(({ className, ...props }, ref) => (\n\t<SheetPrimitive.Title\n\t\tref={ref}\n\t\tclassName={cn(\"text-lg font-semibold text-foreground\", className)}\n\t\t{...props}\n\t/>\n));\nSheetTitle.displayName = SheetPrimitive.Title.displayName;\n\nconst SheetDescription = React.forwardRef<\n\tReact.ElementRef<typeof SheetPrimitive.Description>,\n\tReact.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>\n>(({ className, ...props }, ref) => (\n\t<SheetPrimitive.Description\n\t\tref={ref}\n\t\tclassName={cn(\"text-sm text-muted-foreground\", className)}\n\t\t{...props}\n\t/>\n));\nSheetDescription.displayName = SheetPrimitive.Description.displayName;\n\nexport {\n\tSheet,\n\tSheetPortal,\n\tSheetOverlay,\n\tSheetTrigger,\n\tSheetClose,\n\tSheetContent,\n\tSheetHeader,\n\tSheetFooter,\n\tSheetTitle,\n\tSheetDescription,\n};\n"
  },
  {
    "path": "apps/dokploy/components/ui/sidebar.tsx",
    "content": "import { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { PanelLeft } from \"lucide-react\";\nimport * as React from \"react\";\n\nimport { Button } from \"@/components/ui/button\";\nimport { Input } from \"@/components/ui/input\";\nimport { Separator } from \"@/components/ui/separator\";\nimport { Sheet, SheetContent } from \"@/components/ui/sheet\";\nimport { Skeleton } from \"@/components/ui/skeleton\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { useIsMobile } from \"@/hooks/use-mobile\";\nimport { cn } from \"@/lib/utils\";\n\nexport const SIDEBAR_COOKIE_NAME = \"sidebar:state\";\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;\nconst SIDEBAR_WIDTH = \"16rem\";\nconst SIDEBAR_WIDTH_MOBILE = \"18rem\";\nconst SIDEBAR_WIDTH_ICON = \"3rem\";\nconst SIDEBAR_KEYBOARD_SHORTCUT = \"b\";\n\ntype SidebarContext = {\n\tstate: \"expanded\" | \"collapsed\";\n\topen: boolean;\n\tsetOpen: (open: boolean) => void;\n\topenMobile: boolean;\n\tsetOpenMobile: (open: boolean) => void;\n\tisMobile: boolean;\n\ttoggleSidebar: () => void;\n};\n\nconst SidebarContext = React.createContext<SidebarContext | null>(null);\n\nfunction useSidebar() {\n\tconst context = React.useContext(SidebarContext);\n\tif (!context) {\n\t\tthrow new Error(\"useSidebar must be used within a SidebarProvider.\");\n\t}\n\n\treturn context;\n}\n\nconst SidebarProvider = React.forwardRef<\n\tHTMLDivElement,\n\tReact.ComponentProps<\"div\"> & {\n\t\tdefaultOpen?: boolean;\n\t\topen?: boolean;\n\t\tonOpenChange?: (open: boolean) => void;\n\t}\n>(\n\t(\n\t\t{\n\t\t\tdefaultOpen = true,\n\t\t\topen: openProp,\n\t\t\tonOpenChange: setOpenProp,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\tchildren,\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst isMobile = useIsMobile();\n\t\tconst [openMobile, setOpenMobile] = React.useState(false);\n\n\t\t// This is the internal state of the sidebar.\n\t\t// We use openProp and setOpenProp for control from outside the component.\n\t\tconst [_open, _setOpen] = React.useState(defaultOpen);\n\t\tconst open = openProp ?? _open;\n\t\tconst setOpen = React.useCallback(\n\t\t\t(value: boolean | ((value: boolean) => boolean)) => {\n\t\t\t\tif (setOpenProp) {\n\t\t\t\t\treturn setOpenProp?.(\n\t\t\t\t\t\ttypeof value === \"function\" ? value(open) : value,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t_setOpen(value);\n\n\t\t\t\t// biome-ignore lint/suspicious/noDocumentCookie: This sets the cookie to keep the sidebar state.\n\t\t\t\tdocument.cookie = `${SIDEBAR_COOKIE_NAME}=${open}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;\n\t\t\t},\n\t\t\t[setOpenProp, open],\n\t\t);\n\n\t\t// Helper to toggle the sidebar.\n\t\tconst toggleSidebar = React.useCallback(() => {\n\t\t\treturn isMobile\n\t\t\t\t? setOpenMobile((open) => !open)\n\t\t\t\t: setOpen((open) => !open);\n\t\t}, [isMobile, setOpen, setOpenMobile]);\n\n\t\t// Adds a keyboard shortcut to toggle the sidebar.\n\t\tReact.useEffect(() => {\n\t\t\tconst handleKeyDown = (event: KeyboardEvent) => {\n\t\t\t\tif (\n\t\t\t\t\tevent.key === SIDEBAR_KEYBOARD_SHORTCUT &&\n\t\t\t\t\t(event.metaKey || event.ctrlKey)\n\t\t\t\t) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\ttoggleSidebar();\n\t\t\t\t}\n\t\t\t};\n\n\t\t\twindow.addEventListener(\"keydown\", handleKeyDown);\n\t\t\treturn () => window.removeEventListener(\"keydown\", handleKeyDown);\n\t\t}, [toggleSidebar]);\n\n\t\t// We add a state so that we can do data-state=\"expanded\" or \"collapsed\".\n\t\t// This makes it easier to style the sidebar with Tailwind classes.\n\t\tconst state = open ? \"expanded\" : \"collapsed\";\n\n\t\tconst contextValue = React.useMemo<SidebarContext>(\n\t\t\t() => ({\n\t\t\t\tstate,\n\t\t\t\topen,\n\t\t\t\tsetOpen,\n\t\t\t\tisMobile,\n\t\t\t\topenMobile,\n\t\t\t\tsetOpenMobile,\n\t\t\t\ttoggleSidebar,\n\t\t\t}),\n\t\t\t[\n\t\t\t\tstate,\n\t\t\t\topen,\n\t\t\t\tsetOpen,\n\t\t\t\tisMobile,\n\t\t\t\topenMobile,\n\t\t\t\tsetOpenMobile,\n\t\t\t\ttoggleSidebar,\n\t\t\t],\n\t\t);\n\n\t\treturn (\n\t\t\t<SidebarContext.Provider value={contextValue}>\n\t\t\t\t<TooltipProvider delayDuration={0}>\n\t\t\t\t\t<div\n\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"--sidebar-width\": SIDEBAR_WIDTH,\n\t\t\t\t\t\t\t\t\"--sidebar-width-icon\": SIDEBAR_WIDTH_ICON,\n\t\t\t\t\t\t\t\t...style,\n\t\t\t\t\t\t\t} as React.CSSProperties\n\t\t\t\t\t\t}\n\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\"group/sidebar-wrapper flex h-svh w-full has-[[data-variant=inset]]:bg-sidebar\",\n\t\t\t\t\t\t\tclassName,\n\t\t\t\t\t\t)}\n\t\t\t\t\t\tref={ref}\n\t\t\t\t\t\t{...props}\n\t\t\t\t\t>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</div>\n\t\t\t\t</TooltipProvider>\n\t\t\t</SidebarContext.Provider>\n\t\t);\n\t},\n);\nSidebarProvider.displayName = \"SidebarProvider\";\n\nconst Sidebar = React.forwardRef<\n\tHTMLDivElement,\n\tReact.ComponentProps<\"div\"> & {\n\t\tside?: \"left\" | \"right\";\n\t\tvariant?: \"sidebar\" | \"floating\" | \"inset\";\n\t\tcollapsible?: \"offcanvas\" | \"icon\" | \"none\";\n\t}\n>(\n\t(\n\t\t{\n\t\t\tside = \"left\",\n\t\t\tvariant = \"sidebar\",\n\t\t\tcollapsible = \"offcanvas\",\n\t\t\tclassName,\n\t\t\tchildren,\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst { isMobile, state, openMobile, setOpenMobile } = useSidebar();\n\n\t\tif (collapsible === \"none\") {\n\t\t\treturn (\n\t\t\t\t<div\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\"flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground\",\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t)}\n\t\t\t\t\tref={ref}\n\t\t\t\t\t{...props}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\tif (isMobile) {\n\t\t\treturn (\n\t\t\t\t<Sheet open={openMobile} onOpenChange={setOpenMobile} {...props}>\n\t\t\t\t\t<SheetContent\n\t\t\t\t\t\tdata-sidebar=\"sidebar\"\n\t\t\t\t\t\tdata-mobile=\"true\"\n\t\t\t\t\t\tclassName=\"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden\"\n\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"--sidebar-width\": SIDEBAR_WIDTH_MOBILE,\n\t\t\t\t\t\t\t} as React.CSSProperties\n\t\t\t\t\t\t}\n\t\t\t\t\t\tside={side}\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"flex h-full w-full flex-col overflow-hidden\">\n\t\t\t\t\t\t\t{children}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</SheetContent>\n\t\t\t\t</Sheet>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref={ref}\n\t\t\t\tclassName=\"group peer hidden md:block text-sidebar-foreground\"\n\t\t\t\tdata-state={state}\n\t\t\t\tdata-collapsible={state === \"collapsed\" ? collapsible : \"\"}\n\t\t\t\tdata-variant={variant}\n\t\t\t\tdata-side={side}\n\t\t\t>\n\t\t\t\t{/* This is what handles the sidebar gap on desktop */}\n\t\t\t\t<div\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\"duration-200 relative h-svh w-[--sidebar-width] bg-transparent transition-[width] ease-out\",\n\t\t\t\t\t\t\"group-data-[collapsible=offcanvas]:w-0\",\n\t\t\t\t\t\t\"group-data-[side=right]:rotate-180\",\n\t\t\t\t\t\tvariant === \"floating\" || variant === \"inset\"\n\t\t\t\t\t\t\t? \"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]\"\n\t\t\t\t\t\t\t: \"group-data-[collapsible=icon]:w-[--sidebar-width-icon]\",\n\t\t\t\t\t)}\n\t\t\t\t/>\n\t\t\t\t<div\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\"duration-200 fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] ease-out md:flex\",\n\t\t\t\t\t\tside === \"left\"\n\t\t\t\t\t\t\t? \"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]\"\n\t\t\t\t\t\t\t: \"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]\",\n\t\t\t\t\t\t// Adjust the padding for floating and inset variants.\n\t\t\t\t\t\tvariant === \"floating\" || variant === \"inset\"\n\t\t\t\t\t\t\t? \"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]\"\n\t\t\t\t\t\t\t: \"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l\",\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t)}\n\t\t\t\t\t{...props}\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tdata-sidebar=\"sidebar\"\n\t\t\t\t\t\tclassName=\"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t},\n);\nSidebar.displayName = \"Sidebar\";\n\nconst SidebarTrigger = React.forwardRef<\n\tReact.ElementRef<typeof Button>,\n\tReact.ComponentProps<typeof Button>\n>(({ className, onClick, ...props }, ref) => {\n\tconst { toggleSidebar } = useSidebar();\n\n\treturn (\n\t\t<Button\n\t\t\tref={ref}\n\t\t\tdata-sidebar=\"trigger\"\n\t\t\tvariant=\"ghost\"\n\t\t\tsize=\"icon\"\n\t\t\tclassName={cn(\"h-7 w-7\", className)}\n\t\t\tonClick={(event) => {\n\t\t\t\tonClick?.(event);\n\t\t\t\ttoggleSidebar();\n\t\t\t}}\n\t\t\t{...props}\n\t\t>\n\t\t\t<PanelLeft />\n\t\t\t<span className=\"sr-only\">Toggle Sidebar</span>\n\t\t</Button>\n\t);\n});\nSidebarTrigger.displayName = \"SidebarTrigger\";\n\nconst SidebarRail = React.forwardRef<\n\tHTMLButtonElement,\n\tReact.ComponentProps<\"button\">\n>(({ className, ...props }, ref) => {\n\tconst { toggleSidebar } = useSidebar();\n\n\treturn (\n\t\t<button\n\t\t\tref={ref}\n\t\t\tdata-sidebar=\"rail\"\n\t\t\taria-label=\"Toggle Sidebar\"\n\t\t\ttabIndex={-1}\n\t\t\tonClick={toggleSidebar}\n\t\t\ttitle=\"Toggle Sidebar\"\n\t\t\tclassName={cn(\n\t\t\t\t\"absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex\",\n\t\t\t\t\"[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize\",\n\t\t\t\t\"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize\",\n\t\t\t\t\"group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar\",\n\t\t\t\t\"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2\",\n\t\t\t\t\"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nSidebarRail.displayName = \"SidebarRail\";\n\nconst SidebarInset = React.forwardRef<\n\tHTMLDivElement,\n\tReact.ComponentProps<\"main\">\n>(({ className, ...props }, ref) => {\n\treturn (\n\t\t<main\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"relative flex min-h-svh overflow-auto w-full flex-col bg-background\",\n\t\t\t\t\"peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tstyle={{ scrollbarGutter: \"stable\" }}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nSidebarInset.displayName = \"SidebarInset\";\n\nconst SidebarInput = React.forwardRef<\n\tReact.ElementRef<typeof Input>,\n\tReact.ComponentProps<typeof Input>\n>(({ className, ...props }, ref) => {\n\treturn (\n\t\t<Input\n\t\t\tref={ref}\n\t\t\tdata-sidebar=\"input\"\n\t\t\tclassName={cn(\n\t\t\t\t\"h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nSidebarInput.displayName = \"SidebarInput\";\n\nconst SidebarHeader = React.forwardRef<\n\tHTMLDivElement,\n\tReact.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => {\n\treturn (\n\t\t<div\n\t\t\tref={ref}\n\t\t\tdata-sidebar=\"header\"\n\t\t\tclassName={cn(\"flex flex-col gap-2 p-2\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nSidebarHeader.displayName = \"SidebarHeader\";\n\nconst SidebarFooter = React.forwardRef<\n\tHTMLDivElement,\n\tReact.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => {\n\treturn (\n\t\t<div\n\t\t\tref={ref}\n\t\t\tdata-sidebar=\"footer\"\n\t\t\tclassName={cn(\"flex flex-col gap-2 p-2\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nSidebarFooter.displayName = \"SidebarFooter\";\n\nconst SidebarSeparator = React.forwardRef<\n\tReact.ElementRef<typeof Separator>,\n\tReact.ComponentProps<typeof Separator>\n>(({ className, ...props }, ref) => {\n\treturn (\n\t\t<Separator\n\t\t\tref={ref}\n\t\t\tdata-sidebar=\"separator\"\n\t\t\tclassName={cn(\"mx-2 w-auto bg-sidebar-border\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nSidebarSeparator.displayName = \"SidebarSeparator\";\n\nconst SidebarContent = React.forwardRef<\n\tHTMLDivElement,\n\tReact.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => {\n\treturn (\n\t\t<div\n\t\t\tref={ref}\n\t\t\tdata-sidebar=\"content\"\n\t\t\tclassName={cn(\n\t\t\t\t\"flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-y-auto\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nSidebarContent.displayName = \"SidebarContent\";\n\nconst SidebarGroup = React.forwardRef<\n\tHTMLDivElement,\n\tReact.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => {\n\treturn (\n\t\t<div\n\t\t\tref={ref}\n\t\t\tdata-sidebar=\"group\"\n\t\t\tclassName={cn(\"relative flex w-full min-w-0 flex-col p-2\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nSidebarGroup.displayName = \"SidebarGroup\";\n\nconst SidebarGroupLabel = React.forwardRef<\n\tHTMLDivElement,\n\tReact.ComponentProps<\"div\"> & { asChild?: boolean }\n>(({ className, asChild = false, ...props }, ref) => {\n\tconst Comp = asChild ? Slot : \"div\";\n\n\treturn (\n\t\t<Comp\n\t\t\tref={ref}\n\t\t\tdata-sidebar=\"group-label\"\n\t\t\tclassName={cn(\n\t\t\t\t\"duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0\",\n\t\t\t\t\"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nSidebarGroupLabel.displayName = \"SidebarGroupLabel\";\n\nconst SidebarGroupAction = React.forwardRef<\n\tHTMLButtonElement,\n\tReact.ComponentProps<\"button\"> & { asChild?: boolean }\n>(({ className, asChild = false, ...props }, ref) => {\n\tconst Comp = asChild ? Slot : \"button\";\n\n\treturn (\n\t\t<Comp\n\t\t\tref={ref}\n\t\t\tdata-sidebar=\"group-action\"\n\t\t\tclassName={cn(\n\t\t\t\t\"absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0\",\n\t\t\t\t// Increases the hit area of the button on mobile.\n\t\t\t\t\"after:absolute after:-inset-2 after:md:hidden\",\n\t\t\t\t\"group-data-[collapsible=icon]:hidden\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nSidebarGroupAction.displayName = \"SidebarGroupAction\";\n\nconst SidebarGroupContent = React.forwardRef<\n\tHTMLDivElement,\n\tReact.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => (\n\t<div\n\t\tref={ref}\n\t\tdata-sidebar=\"group-content\"\n\t\tclassName={cn(\"w-full text-sm\", className)}\n\t\t{...props}\n\t/>\n));\nSidebarGroupContent.displayName = \"SidebarGroupContent\";\n\nconst SidebarMenu = React.forwardRef<\n\tHTMLUListElement,\n\tReact.ComponentProps<\"ul\">\n>(({ className, ...props }, ref) => (\n\t<ul\n\t\tref={ref}\n\t\tdata-sidebar=\"menu\"\n\t\tclassName={cn(\"flex w-full min-w-0 flex-col gap-1\", className)}\n\t\t{...props}\n\t/>\n));\nSidebarMenu.displayName = \"SidebarMenu\";\n\nconst SidebarMenuItem = React.forwardRef<\n\tHTMLLIElement,\n\tReact.ComponentProps<\"li\">\n>(({ className, ...props }, ref) => (\n\t<li\n\t\tref={ref}\n\t\tdata-sidebar=\"menu-item\"\n\t\tclassName={cn(\"group/menu-item relative\", className)}\n\t\t{...props}\n\t/>\n));\nSidebarMenuItem.displayName = \"SidebarMenuItem\";\n\nconst sidebarMenuButtonVariants = cva(\n\t\"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0\",\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault: \"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground\",\n\t\t\t\toutline:\n\t\t\t\t\t\"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]\",\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tdefault: \"h-8 text-sm\",\n\t\t\t\tsm: \"h-7 text-xs\",\n\t\t\t\tlg: \"h-12 text-sm group-data-[collapsible=icon]:!p-0\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: \"default\",\n\t\t\tsize: \"default\",\n\t\t},\n\t},\n);\n\nconst SidebarMenuButton = React.forwardRef<\n\tHTMLButtonElement,\n\tReact.ComponentProps<\"button\"> & {\n\t\tasChild?: boolean;\n\t\tisActive?: boolean;\n\t\ttooltip?: string | React.ComponentProps<typeof TooltipContent>;\n\t} & VariantProps<typeof sidebarMenuButtonVariants>\n>(\n\t(\n\t\t{\n\t\t\tasChild = false,\n\t\t\tisActive = false,\n\t\t\tvariant = \"default\",\n\t\t\tsize = \"default\",\n\t\t\ttooltip,\n\t\t\tclassName,\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst Comp = asChild ? Slot : \"button\";\n\t\tconst { isMobile, state } = useSidebar();\n\n\t\tconst button = (\n\t\t\t<Comp\n\t\t\t\tref={ref}\n\t\t\t\tdata-sidebar=\"menu-button\"\n\t\t\t\tdata-size={size}\n\t\t\t\tdata-active={isActive}\n\t\t\t\tclassName={cn(sidebarMenuButtonVariants({ variant, size }), className)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\n\t\tif (!tooltip) {\n\t\t\treturn button;\n\t\t}\n\n\t\tif (typeof tooltip === \"string\") {\n\t\t\ttooltip = {\n\t\t\t\tchildren: tooltip,\n\t\t\t};\n\t\t}\n\n\t\treturn (\n\t\t\t<Tooltip>\n\t\t\t\t<TooltipTrigger asChild>{button}</TooltipTrigger>\n\t\t\t\t<TooltipContent\n\t\t\t\t\tside=\"right\"\n\t\t\t\t\talign=\"center\"\n\t\t\t\t\thidden={state !== \"collapsed\" || isMobile}\n\t\t\t\t\t{...tooltip}\n\t\t\t\t/>\n\t\t\t</Tooltip>\n\t\t);\n\t},\n);\nSidebarMenuButton.displayName = \"SidebarMenuButton\";\n\nconst SidebarMenuAction = React.forwardRef<\n\tHTMLButtonElement,\n\tReact.ComponentProps<\"button\"> & {\n\t\tasChild?: boolean;\n\t\tshowOnHover?: boolean;\n\t}\n>(({ className, asChild = false, showOnHover = false, ...props }, ref) => {\n\tconst Comp = asChild ? Slot : \"button\";\n\n\treturn (\n\t\t<Comp\n\t\t\tref={ref}\n\t\t\tdata-sidebar=\"menu-action\"\n\t\t\tclassName={cn(\n\t\t\t\t\"absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0\",\n\t\t\t\t// Increases the hit area of the button on mobile.\n\t\t\t\t\"after:absolute after:-inset-2 after:md:hidden\",\n\t\t\t\t\"peer-data-[size=sm]/menu-button:top-1\",\n\t\t\t\t\"peer-data-[size=default]/menu-button:top-1.5\",\n\t\t\t\t\"peer-data-[size=lg]/menu-button:top-2.5\",\n\t\t\t\t\"group-data-[collapsible=icon]:hidden\",\n\t\t\t\tshowOnHover &&\n\t\t\t\t\t\"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nSidebarMenuAction.displayName = \"SidebarMenuAction\";\n\nconst SidebarMenuBadge = React.forwardRef<\n\tHTMLDivElement,\n\tReact.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => (\n\t<div\n\t\tref={ref}\n\t\tdata-sidebar=\"menu-badge\"\n\t\tclassName={cn(\n\t\t\t\"absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none\",\n\t\t\t\"peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground\",\n\t\t\t\"peer-data-[size=sm]/menu-button:top-1\",\n\t\t\t\"peer-data-[size=default]/menu-button:top-1.5\",\n\t\t\t\"peer-data-[size=lg]/menu-button:top-2.5\",\n\t\t\t\"group-data-[collapsible=icon]:hidden\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nSidebarMenuBadge.displayName = \"SidebarMenuBadge\";\n\nconst SidebarMenuSkeleton = React.forwardRef<\n\tHTMLDivElement,\n\tReact.ComponentProps<\"div\"> & {\n\t\tshowIcon?: boolean;\n\t}\n>(({ className, showIcon = false, ...props }, ref) => {\n\t// Random width between 50 to 90%.\n\tconst width = React.useMemo(() => {\n\t\treturn `${Math.floor(Math.random() * 40) + 50}%`;\n\t}, []);\n\n\treturn (\n\t\t<div\n\t\t\tref={ref}\n\t\t\tdata-sidebar=\"menu-skeleton\"\n\t\t\tclassName={cn(\"rounded-md h-8 flex gap-2 px-2 items-center\", className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{showIcon && (\n\t\t\t\t<Skeleton\n\t\t\t\t\tclassName=\"size-4 rounded-md\"\n\t\t\t\t\tdata-sidebar=\"menu-skeleton-icon\"\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t<Skeleton\n\t\t\t\tclassName=\"h-4 flex-1 max-w-[--skeleton-width]\"\n\t\t\t\tdata-sidebar=\"menu-skeleton-text\"\n\t\t\t\tstyle={\n\t\t\t\t\t{\n\t\t\t\t\t\t\"--skeleton-width\": width,\n\t\t\t\t\t} as React.CSSProperties\n\t\t\t\t}\n\t\t\t/>\n\t\t</div>\n\t);\n});\nSidebarMenuSkeleton.displayName = \"SidebarMenuSkeleton\";\n\nconst SidebarMenuSub = React.forwardRef<\n\tHTMLUListElement,\n\tReact.ComponentProps<\"ul\">\n>(({ className, ...props }, ref) => (\n\t<ul\n\t\tref={ref}\n\t\tdata-sidebar=\"menu-sub\"\n\t\tclassName={cn(\n\t\t\t\"mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5\",\n\t\t\t\"group-data-[collapsible=icon]:hidden\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nSidebarMenuSub.displayName = \"SidebarMenuSub\";\n\nconst SidebarMenuSubItem = React.forwardRef<\n\tHTMLLIElement,\n\tReact.ComponentProps<\"li\">\n>(({ ...props }, ref) => <li ref={ref} {...props} />);\nSidebarMenuSubItem.displayName = \"SidebarMenuSubItem\";\n\nconst SidebarMenuSubButton = React.forwardRef<\n\tHTMLAnchorElement,\n\tReact.ComponentProps<\"a\"> & {\n\t\tasChild?: boolean;\n\t\tsize?: \"sm\" | \"md\";\n\t\tisActive?: boolean;\n\t}\n>(({ asChild = false, size = \"md\", isActive, className, ...props }, ref) => {\n\tconst Comp = asChild ? Slot : \"a\";\n\n\treturn (\n\t\t<Comp\n\t\t\tref={ref}\n\t\t\tdata-sidebar=\"menu-sub-button\"\n\t\t\tdata-size={size}\n\t\t\tdata-active={isActive}\n\t\t\tclassName={cn(\n\t\t\t\t\"flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground\",\n\t\t\t\t\"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground\",\n\t\t\t\tsize === \"sm\" && \"text-xs\",\n\t\t\t\tsize === \"md\" && \"text-sm\",\n\t\t\t\t\"group-data-[collapsible=icon]:hidden\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nSidebarMenuSubButton.displayName = \"SidebarMenuSubButton\";\n\nexport {\n\tSidebar,\n\tSidebarContent,\n\tSidebarFooter,\n\tSidebarGroup,\n\tSidebarGroupAction,\n\tSidebarGroupContent,\n\tSidebarGroupLabel,\n\tSidebarHeader,\n\tSidebarInput,\n\tSidebarInset,\n\tSidebarMenu,\n\tSidebarMenuAction,\n\tSidebarMenuBadge,\n\tSidebarMenuButton,\n\tSidebarMenuItem,\n\tSidebarMenuSkeleton,\n\tSidebarMenuSub,\n\tSidebarMenuSubButton,\n\tSidebarMenuSubItem,\n\tSidebarProvider,\n\tSidebarRail,\n\tSidebarSeparator,\n\tSidebarTrigger,\n\tuseSidebar,\n};\n"
  },
  {
    "path": "apps/dokploy/components/ui/skeleton.tsx",
    "content": "import { cn } from \"@/lib/utils\";\n\nfunction Skeleton({\n\tclassName,\n\t...props\n}: React.HTMLAttributes<HTMLDivElement>) {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\"animate-pulse rounded-md bg-muted\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Skeleton };\n"
  },
  {
    "path": "apps/dokploy/components/ui/sonner.tsx",
    "content": "import { useTheme } from \"next-themes\";\nimport { Toaster as Sonner } from \"sonner\";\n\ntype ToasterProps = React.ComponentProps<typeof Sonner>;\n\nconst Toaster = ({ ...props }: ToasterProps) => {\n\tconst { theme = \"system\" } = useTheme();\n\treturn (\n\t\t<Sonner\n\t\t\ttheme={theme as ToasterProps[\"theme\"]}\n\t\t\tclassName=\"toaster group\"\n\t\t\ttoastOptions={{\n\t\t\t\tclassNames: {\n\t\t\t\t\ttoast:\n\t\t\t\t\t\t\"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg\",\n\t\t\t\t\tdescription: \"group-[.toast]:text-muted-foreground\",\n\t\t\t\t\tactionButton:\n\t\t\t\t\t\t\"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground\",\n\t\t\t\t\tcancelButton:\n\t\t\t\t\t\t\"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground\",\n\t\t\t\t},\n\t\t\t}}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\n\nexport { Toaster };\n"
  },
  {
    "path": "apps/dokploy/components/ui/switch.tsx",
    "content": "\"use client\";\n\nimport * as SwitchPrimitives from \"@radix-ui/react-switch\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Switch = React.forwardRef<\n\tReact.ElementRef<typeof SwitchPrimitives.Root>,\n\tReact.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>\n>(({ className, ...props }, ref) => (\n\t<SwitchPrimitives.Root\n\t\tclassName={cn(\n\t\t\t\"peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-muted-foreground/80\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t\tref={ref}\n\t>\n\t\t<SwitchPrimitives.Thumb\n\t\t\tclassName={cn(\n\t\t\t\t\"pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0\",\n\t\t\t)}\n\t\t/>\n\t</SwitchPrimitives.Root>\n));\nSwitch.displayName = SwitchPrimitives.Root.displayName;\n\nexport { Switch };\n"
  },
  {
    "path": "apps/dokploy/components/ui/table.tsx",
    "content": "import * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Table = React.forwardRef<\n\tHTMLTableElement,\n\tReact.HTMLAttributes<HTMLTableElement>\n>(({ className, ...props }, ref) => (\n\t<div className=\"relative w-full overflow-auto\">\n\t\t<table\n\t\t\tref={ref}\n\t\t\tclassName={cn(\"w-full caption-bottom text-sm\", className)}\n\t\t\t{...props}\n\t\t/>\n\t</div>\n));\nTable.displayName = \"Table\";\n\nconst TableHeader = React.forwardRef<\n\tHTMLTableSectionElement,\n\tReact.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n\t<thead ref={ref} className={cn(\"[&_tr]:border-b\", className)} {...props} />\n));\nTableHeader.displayName = \"TableHeader\";\n\nconst TableBody = React.forwardRef<\n\tHTMLTableSectionElement,\n\tReact.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n\t<tbody\n\t\tref={ref}\n\t\tclassName={cn(\"[&_tr:last-child]:border-0\", className)}\n\t\t{...props}\n\t/>\n));\nTableBody.displayName = \"TableBody\";\n\nconst TableFooter = React.forwardRef<\n\tHTMLTableSectionElement,\n\tReact.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n\t<tfoot\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nTableFooter.displayName = \"TableFooter\";\n\nconst TableRow = React.forwardRef<\n\tHTMLTableRowElement,\n\tReact.HTMLAttributes<HTMLTableRowElement>\n>(({ className, ...props }, ref) => (\n\t<tr\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nTableRow.displayName = \"TableRow\";\n\nconst TableHead = React.forwardRef<\n\tHTMLTableCellElement,\n\tReact.ThHTMLAttributes<HTMLTableCellElement>\n>(({ className, ...props }, ref) => (\n\t<th\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nTableHead.displayName = \"TableHead\";\n\nconst TableCell = React.forwardRef<\n\tHTMLTableCellElement,\n\tReact.TdHTMLAttributes<HTMLTableCellElement>\n>(({ className, ...props }, ref) => (\n\t<td\n\t\tref={ref}\n\t\tclassName={cn(\"p-4 align-middle [&:has([role=checkbox])]:pr-0\", className)}\n\t\t{...props}\n\t/>\n));\nTableCell.displayName = \"TableCell\";\n\nconst TableCaption = React.forwardRef<\n\tHTMLTableCaptionElement,\n\tReact.HTMLAttributes<HTMLTableCaptionElement>\n>(({ className, ...props }, ref) => (\n\t<caption\n\t\tref={ref}\n\t\tclassName={cn(\"mt-4 text-sm text-muted-foreground\", className)}\n\t\t{...props}\n\t/>\n));\nTableCaption.displayName = \"TableCaption\";\n\nexport {\n\tTable,\n\tTableHeader,\n\tTableBody,\n\tTableFooter,\n\tTableHead,\n\tTableRow,\n\tTableCell,\n\tTableCaption,\n};\n"
  },
  {
    "path": "apps/dokploy/components/ui/tabs.tsx",
    "content": "import * as TabsPrimitive from \"@radix-ui/react-tabs\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Tabs = TabsPrimitive.Root;\n\nconst TabsList = React.forwardRef<\n\tReact.ElementRef<typeof TabsPrimitive.List>,\n\tReact.ComponentPropsWithoutRef<typeof TabsPrimitive.List>\n>(({ className, ...props }, ref) => (\n\t<TabsPrimitive.List\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nTabsList.displayName = TabsPrimitive.List.displayName;\n\nconst TabsTrigger = React.forwardRef<\n\tReact.ElementRef<typeof TabsPrimitive.Trigger>,\n\tReact.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n\t<TabsPrimitive.Trigger\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName;\n\nconst TabsContent = React.forwardRef<\n\tReact.ElementRef<typeof TabsPrimitive.Content>,\n\tReact.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>\n>(({ className, tabIndex, ...props }, ref) => (\n\t<TabsPrimitive.Content\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n\t\t\tclassName,\n\t\t)}\n\t\ttabIndex={tabIndex}\n\t\t{...props}\n\t/>\n));\nTabsContent.displayName = TabsPrimitive.Content.displayName;\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent };\n"
  },
  {
    "path": "apps/dokploy/components/ui/textarea.tsx",
    "content": "import * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nexport interface TextareaProps\n\textends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}\n\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n\t({ className, ...props }, ref) => {\n\t\treturn (\n\t\t\t<textarea\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"flex min-h-[80px] w-full rounded-md border border-input bg-input px-3 py-2 text-sm  placeholder:text-muted-foreground focus-visible:outline-none   focus-visible:ring-2 focus-visible:ring-border  disabled:cursor-not-allowed disabled:opacity-50\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tref={ref}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nTextarea.displayName = \"Textarea\";\n\nexport { Textarea };\n"
  },
  {
    "path": "apps/dokploy/components/ui/time-badge.tsx",
    "content": "\"use client\";\n\nimport { useEffect, useState } from \"react\";\nimport { api } from \"@/utils/api\";\n\nexport function TimeBadge() {\n\tconst { data: serverTime } = api.server.getServerTime.useQuery(undefined);\n\tconst [time, setTime] = useState<Date | null>(null);\n\n\tuseEffect(() => {\n\t\tif (serverTime?.time) {\n\t\t\tsetTime(new Date(serverTime.time));\n\t\t}\n\t}, [serverTime]);\n\n\tuseEffect(() => {\n\t\tconst timer = setInterval(() => {\n\t\t\tsetTime((prevTime) => {\n\t\t\t\tif (!prevTime) return null;\n\t\t\t\tconst newTime = new Date(prevTime.getTime() + 1000);\n\t\t\t\treturn newTime;\n\t\t\t});\n\t\t}, 1000);\n\n\t\treturn () => {\n\t\t\tclearInterval(timer);\n\t\t};\n\t}, []);\n\n\tif (!time || !serverTime?.timezone) {\n\t\treturn null;\n\t}\n\n\tconst getUtcOffset = (timeZone: string) => {\n\t\tconst date = new Date();\n\t\tconst utcDate = new Date(date.toLocaleString(\"en-US\", { timeZone: \"UTC\" }));\n\t\tconst tzDate = new Date(date.toLocaleString(\"en-US\", { timeZone }));\n\t\tconst offset = (tzDate.getTime() - utcDate.getTime()) / (1000 * 60 * 60);\n\t\tconst sign = offset >= 0 ? \"+\" : \"-\";\n\t\tconst hours = Math.floor(Math.abs(offset));\n\t\tconst minutes = (Math.abs(offset) * 60) % 60;\n\t\treturn `UTC${sign}${hours.toString().padStart(2, \"0\")}:${minutes\n\t\t\t.toString()\n\t\t\t.padStart(2, \"0\")}`;\n\t};\n\n\tconst formattedTime = new Intl.DateTimeFormat(\"en-US\", {\n\t\ttimeZone: serverTime.timezone,\n\t\ttimeStyle: \"medium\",\n\t\thour12: false,\n\t}).format(time);\n\n\treturn (\n\t\t<div className=\"inline-flex items-center rounded-full border p-1 text-xs whitespace-nowrap max-w-full overflow-hidden gap-1\">\n\t\t\t<div className=\"inline-flex items-center px-1 gap-1\">\n\t\t\t\t<span className=\"hidden sm:inline\">Server Time:</span>\n\t\t\t\t<span className=\"font-medium tabular-nums\">{formattedTime}</span>\n\t\t\t</div>\n\t\t\t<span className=\"hidden sm:inline text-primary/70 border rounded-full bg-foreground/5 px-1.5 py-0.5\">\n\t\t\t\t{serverTime.timezone} | {getUtcOffset(serverTime.timezone)}\n\t\t\t</span>\n\t\t</div>\n\t);\n}\n"
  },
  {
    "path": "apps/dokploy/components/ui/toggle.tsx",
    "content": "import * as TogglePrimitive from \"@radix-ui/react-toggle\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst toggleVariants = cva(\n\t\"inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground\",\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault: \"bg-transparent\",\n\t\t\t\toutline:\n\t\t\t\t\t\"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground\",\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tdefault: \"h-10 px-3\",\n\t\t\t\tsm: \"h-9 px-2.5\",\n\t\t\t\tlg: \"h-11 px-5\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: \"default\",\n\t\t\tsize: \"default\",\n\t\t},\n\t},\n);\n\nconst Toggle = React.forwardRef<\n\tReact.ElementRef<typeof TogglePrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof TogglePrimitive.Root> &\n\t\tVariantProps<typeof toggleVariants>\n>(({ className, variant, size, ...props }, ref) => (\n\t<TogglePrimitive.Root\n\t\tref={ref}\n\t\tclassName={cn(toggleVariants({ variant, size, className }))}\n\t\t{...props}\n\t/>\n));\n\nToggle.displayName = TogglePrimitive.Root.displayName;\n\nexport { Toggle, toggleVariants };\n"
  },
  {
    "path": "apps/dokploy/components/ui/tooltip.tsx",
    "content": "import * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst TooltipProvider = TooltipPrimitive.Provider;\n\nconst Tooltip = TooltipPrimitive.Root;\n\nconst TooltipTrigger = React.forwardRef<\n\tReact.ElementRef<typeof TooltipPrimitive.Trigger>,\n\tReact.ComponentPropsWithoutRef<typeof TooltipPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n\t<TooltipPrimitive.Trigger\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\n\nconst TooltipPortal = TooltipPrimitive.Portal;\n\nconst TooltipContent = React.forwardRef<\n\tReact.ElementRef<typeof TooltipPrimitive.Content>,\n\tReact.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n\t<TooltipPrimitive.Content\n\t\tref={ref}\n\t\tsideOffset={sideOffset}\n\t\tclassName={cn(\n\t\t\t\"z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 \",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nTooltipContent.displayName = TooltipPrimitive.Content.displayName;\n\nexport {\n\tTooltip,\n\tTooltipTrigger,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipPortal,\n};\n"
  },
  {
    "path": "apps/dokploy/components.json",
    "content": "{\n\t\"$schema\": \"https://ui.shadcn.com/schema.json\",\n\t\"style\": \"default\",\n\t\"rsc\": false,\n\t\"tsx\": true,\n\t\"tailwind\": {\n\t\t\"config\": \"tailwind.config.ts\",\n\t\t\"css\": \"styles/globals.css\",\n\t\t\"baseColor\": \"zinc\",\n\t\t\"cssVariables\": true,\n\t\t\"prefix\": \"\"\n\t},\n\t\"aliases\": {\n\t\t\"components\": \"@/components\",\n\t\t\"utils\": \"@/lib/utils\"\n\t}\n}\n"
  },
  {
    "path": "apps/dokploy/docker/build.sh",
    "content": "#!/bin/bash\n\n# Determine the type of build based on the first script argument\nBUILD_TYPE=${1:-production}\n\nif [ \"$BUILD_TYPE\" == \"canary\" ]; then\n    TAG=\"canary\"\nelse\n    VERSION=$(node -p \"require('./package.json').version\")\n    TAG=\"$VERSION\"\nfi\n\nBUILDER=$(docker buildx create --use)\n\ndocker buildx build --platform linux/amd64,linux/arm64 --pull --rm -t \"dokploy/dokploy:${TAG}\" -f 'Dockerfile' .\n\ndocker buildx rm $BUILDER\n"
  },
  {
    "path": "apps/dokploy/docker/feat.sh",
    "content": "\n\n\n# BUILDER=$(docker buildx create --use)\n\n# docker buildx build --platform linux/amd64,linux/arm64 --pull --rm -t \"dokploy/dokploy:feature\" -f 'Dockerfile' --push .\n\ndocker build --platform linux/amd64 --pull --rm -t \"dokploy/dokploy:feature\" -f 'Dockerfile' .\n\n# docker  build --platform linux/amd64 --pull --rm -t \"dokploy/dokploy:feature\" -f 'Dockerfile' .\n"
  },
  {
    "path": "apps/dokploy/docker/push.sh",
    "content": "#!/bin/bash\n\n# Determine the type of build based on the first script argument\nBUILD_TYPE=${1:-production}\n\nBUILDER=$(docker buildx create --use)\n\nif [ \"$BUILD_TYPE\" == \"canary\" ]; then\n    TAG=\"canary\"\n    echo PUSHING CANARY\n        docker buildx build --platform linux/amd64,linux/arm64 --pull --rm -t \"dokploy/dokploy:${TAG}\" -f 'Dockerfile' --push .\nelse\n    echo  \"PUSHING PRODUCTION\"\n    VERSION=$(node -p \"require('./package.json').version\")\n    docker buildx build --platform linux/amd64,linux/arm64 --pull --rm -t \"dokploy/dokploy:latest\" -t \"dokploy/dokploy:${VERSION}\" -f 'Dockerfile' --push .\nfi\n\ndocker buildx rm $BUILDER\n\n"
  },
  {
    "path": "apps/dokploy/drizzle/0000_reflective_puck.sql",
    "content": "DO $$ BEGIN\n CREATE TYPE \"buildType\" AS ENUM('dockerfile', 'heroku_buildpacks', 'paketo_buildpacks', 'nixpacks');\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n CREATE TYPE \"sourceType\" AS ENUM('docker', 'git', 'github');\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n CREATE TYPE \"Roles\" AS ENUM('admin', 'user');\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n CREATE TYPE \"databaseType\" AS ENUM('postgres', 'mariadb', 'mysql', 'mongo');\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n CREATE TYPE \"deploymentStatus\" AS ENUM('running', 'done', 'error');\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n CREATE TYPE \"mountType\" AS ENUM('bind', 'volume', 'file');\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n CREATE TYPE \"serviceType\" AS ENUM('application', 'postgres', 'mysql', 'mariadb', 'mongo', 'redis');\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n CREATE TYPE \"protocolType\" AS ENUM('tcp', 'udp');\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n CREATE TYPE \"applicationStatus\" AS ENUM('idle', 'running', 'done', 'error');\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n CREATE TYPE \"certificateType\" AS ENUM('letsencrypt', 'none');\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nCREATE TABLE IF NOT EXISTS \"application\" (\n\t\"applicationId\" text PRIMARY KEY NOT NULL,\n\t\"name\" text NOT NULL,\n\t\"appName\" text NOT NULL,\n\t\"description\" text,\n\t\"env\" text,\n\t\"memoryReservation\" integer,\n\t\"memoryLimit\" integer,\n\t\"cpuReservation\" integer,\n\t\"cpuLimit\" integer,\n\t\"title\" text,\n\t\"enabled\" boolean,\n\t\"subtitle\" text,\n\t\"command\" text,\n\t\"customLogo\" text,\n\t\"customCss\" text,\n\t\"hideLogo\" boolean,\n\t\"hideLinks\" boolean,\n\t\"refreshToken\" text,\n\t\"sourceType\" \"sourceType\" DEFAULT 'github' NOT NULL,\n\t\"repository\" text,\n\t\"owner\" text,\n\t\"branch\" text,\n\t\"buildPath\" text DEFAULT '/',\n\t\"autoDeploy\" boolean,\n\t\"username\" text,\n\t\"password\" text,\n\t\"dockerImage\" text,\n\t\"customGitUrl\" text,\n\t\"customGitBranch\" text,\n\t\"customGitBuildPath\" text,\n\t\"customGitSSHKey\" text,\n\t\"dockerfile\" text,\n\t\"applicationStatus\" \"applicationStatus\" DEFAULT 'idle' NOT NULL,\n\t\"buildType\" \"buildType\" DEFAULT 'nixpacks' NOT NULL,\n\t\"createdAt\" text NOT NULL,\n\t\"projectId\" text NOT NULL,\n\tCONSTRAINT \"application_appName_unique\" UNIQUE(\"appName\")\n);\n--> statement-breakpoint\nCREATE TABLE IF NOT EXISTS \"postgres\" (\n\t\"postgresId\" text PRIMARY KEY NOT NULL,\n\t\"name\" text NOT NULL,\n\t\"appName\" text NOT NULL,\n\t\"databaseName\" text NOT NULL,\n\t\"databaseUser\" text NOT NULL,\n\t\"databasePassword\" text NOT NULL,\n\t\"description\" text,\n\t\"dockerImage\" text NOT NULL,\n\t\"command\" text,\n\t\"env\" text,\n\t\"memoryReservation\" integer,\n\t\"externalPort\" integer,\n\t\"memoryLimit\" integer,\n\t\"cpuReservation\" integer,\n\t\"cpuLimit\" integer,\n\t\"applicationStatus\" \"applicationStatus\" DEFAULT 'idle' NOT NULL,\n\t\"createdAt\" text NOT NULL,\n\t\"projectId\" text NOT NULL,\n\tCONSTRAINT \"postgres_appName_unique\" UNIQUE(\"appName\")\n);\n--> statement-breakpoint\nCREATE TABLE IF NOT EXISTS \"user\" (\n\t\"userId\" text PRIMARY KEY NOT NULL,\n\t\"token\" text NOT NULL,\n\t\"isRegistered\" boolean DEFAULT false NOT NULL,\n\t\"expirationDate\" timestamp(3) NOT NULL,\n\t\"createdAt\" text NOT NULL,\n\t\"canCreateProjects\" boolean DEFAULT false NOT NULL,\n\t\"canCreateServices\" boolean DEFAULT false NOT NULL,\n\t\"canDeleteProjects\" boolean DEFAULT false NOT NULL,\n\t\"canDeleteServices\" boolean DEFAULT false NOT NULL,\n\t\"canAccessToTraefikFiles\" boolean DEFAULT false NOT NULL,\n\t\"accesedProjects\" text[] DEFAULT ARRAY[]::text[] NOT NULL,\n\t\"accesedServices\" text[] DEFAULT ARRAY[]::text[] NOT NULL,\n\t\"adminId\" text NOT NULL,\n\t\"authId\" text NOT NULL\n);\n--> statement-breakpoint\nCREATE TABLE IF NOT EXISTS \"admin\" (\n\t\"adminId\" text PRIMARY KEY NOT NULL,\n\t\"githubAppId\" integer,\n\t\"githubAppName\" text,\n\t\"serverIp\" text,\n\t\"certificateType\" \"certificateType\" DEFAULT 'none' NOT NULL,\n\t\"host\" text,\n\t\"githubClientId\" text,\n\t\"githubClientSecret\" text,\n\t\"githubInstallationId\" text,\n\t\"githubPrivateKey\" text,\n\t\"letsEncryptEmail\" text,\n\t\"sshPrivateKey\" text,\n\t\"enableDockerCleanup\" boolean DEFAULT false NOT NULL,\n\t\"authId\" text NOT NULL,\n\t\"createdAt\" text NOT NULL\n);\n--> statement-breakpoint\nCREATE TABLE IF NOT EXISTS \"auth\" (\n\t\"id\" text PRIMARY KEY NOT NULL,\n\t\"email\" text NOT NULL,\n\t\"password\" text NOT NULL,\n\t\"rol\" \"Roles\" NOT NULL,\n\t\"image\" text,\n\t\"createdAt\" text NOT NULL,\n\tCONSTRAINT \"auth_email_unique\" UNIQUE(\"email\")\n);\n--> statement-breakpoint\nCREATE TABLE IF NOT EXISTS \"project\" (\n\t\"projectId\" text PRIMARY KEY NOT NULL,\n\t\"name\" text NOT NULL,\n\t\"description\" text,\n\t\"createdAt\" text NOT NULL,\n\t\"adminId\" text NOT NULL\n);\n--> statement-breakpoint\nCREATE TABLE IF NOT EXISTS \"domain\" (\n\t\"domainId\" text PRIMARY KEY NOT NULL,\n\t\"host\" text NOT NULL,\n\t\"https\" boolean DEFAULT false NOT NULL,\n\t\"port\" integer DEFAULT 80,\n\t\"path\" text DEFAULT '/',\n\t\"uniqueConfigKey\" serial NOT NULL,\n\t\"createdAt\" text NOT NULL,\n\t\"applicationId\" text NOT NULL,\n\t\"certificateType\" \"certificateType\" DEFAULT 'none' NOT NULL\n);\n--> statement-breakpoint\nCREATE TABLE IF NOT EXISTS \"mariadb\" (\n\t\"mariadbId\" text PRIMARY KEY NOT NULL,\n\t\"name\" text NOT NULL,\n\t\"appName\" text NOT NULL,\n\t\"description\" text,\n\t\"databaseName\" text NOT NULL,\n\t\"databaseUser\" text NOT NULL,\n\t\"databasePassword\" text NOT NULL,\n\t\"rootPassword\" text NOT NULL,\n\t\"dockerImage\" text NOT NULL,\n\t\"command\" text,\n\t\"env\" text,\n\t\"memoryReservation\" integer,\n\t\"memoryLimit\" integer,\n\t\"cpuReservation\" integer,\n\t\"cpuLimit\" integer,\n\t\"externalPort\" integer,\n\t\"applicationStatus\" \"applicationStatus\" DEFAULT 'idle' NOT NULL,\n\t\"createdAt\" text NOT NULL,\n\t\"projectId\" text NOT NULL,\n\tCONSTRAINT \"mariadb_appName_unique\" UNIQUE(\"appName\")\n);\n--> statement-breakpoint\nCREATE TABLE IF NOT EXISTS \"mongo\" (\n\t\"mongoId\" text PRIMARY KEY NOT NULL,\n\t\"name\" text NOT NULL,\n\t\"appName\" text NOT NULL,\n\t\"description\" text,\n\t\"databaseUser\" text NOT NULL,\n\t\"databasePassword\" text NOT NULL,\n\t\"dockerImage\" text NOT NULL,\n\t\"command\" text,\n\t\"env\" text,\n\t\"memoryReservation\" integer,\n\t\"memoryLimit\" integer,\n\t\"cpuReservation\" integer,\n\t\"cpuLimit\" integer,\n\t\"externalPort\" integer,\n\t\"applicationStatus\" \"applicationStatus\" DEFAULT 'idle' NOT NULL,\n\t\"createdAt\" text NOT NULL,\n\t\"projectId\" text NOT NULL,\n\tCONSTRAINT \"mongo_appName_unique\" UNIQUE(\"appName\")\n);\n--> statement-breakpoint\nCREATE TABLE IF NOT EXISTS \"mysql\" (\n\t\"mysqlId\" text PRIMARY KEY NOT NULL,\n\t\"name\" text NOT NULL,\n\t\"appName\" text NOT NULL,\n\t\"description\" text,\n\t\"databaseName\" text NOT NULL,\n\t\"databaseUser\" text NOT NULL,\n\t\"databasePassword\" text NOT NULL,\n\t\"rootPassword\" text NOT NULL,\n\t\"dockerImage\" text NOT NULL,\n\t\"command\" text,\n\t\"env\" text,\n\t\"memoryReservation\" integer,\n\t\"memoryLimit\" integer,\n\t\"cpuReservation\" integer,\n\t\"cpuLimit\" integer,\n\t\"externalPort\" integer,\n\t\"applicationStatus\" \"applicationStatus\" DEFAULT 'idle' NOT NULL,\n\t\"createdAt\" text NOT NULL,\n\t\"projectId\" text NOT NULL,\n\tCONSTRAINT \"mysql_appName_unique\" UNIQUE(\"appName\")\n);\n--> statement-breakpoint\nCREATE TABLE IF NOT EXISTS \"backup\" (\n\t\"backupId\" text PRIMARY KEY NOT NULL,\n\t\"schedule\" text NOT NULL,\n\t\"enabled\" boolean,\n\t\"database\" text NOT NULL,\n\t\"prefix\" text NOT NULL,\n\t\"destinationId\" text NOT NULL,\n\t\"databaseType\" \"databaseType\" NOT NULL,\n\t\"postgresId\" text,\n\t\"mariadbId\" text,\n\t\"mysqlId\" text,\n\t\"mongoId\" text\n);\n--> statement-breakpoint\nCREATE TABLE IF NOT EXISTS \"destination\" (\n\t\"destinationId\" text PRIMARY KEY NOT NULL,\n\t\"name\" text NOT NULL,\n\t\"accessKey\" text NOT NULL,\n\t\"secretAccessKey\" text NOT NULL,\n\t\"bucket\" text NOT NULL,\n\t\"region\" text NOT NULL,\n\t\"endpoint\" text NOT NULL,\n\t\"adminId\" text NOT NULL\n);\n--> statement-breakpoint\nCREATE TABLE IF NOT EXISTS \"deployment\" (\n\t\"deploymentId\" text PRIMARY KEY NOT NULL,\n\t\"title\" text NOT NULL,\n\t\"status\" \"deploymentStatus\" DEFAULT 'running',\n\t\"logPath\" text NOT NULL,\n\t\"applicationId\" text NOT NULL,\n\t\"createdAt\" text NOT NULL\n);\n--> statement-breakpoint\nCREATE TABLE IF NOT EXISTS \"mount\" (\n\t\"mountId\" text PRIMARY KEY NOT NULL,\n\t\"type\" \"mountType\" NOT NULL,\n\t\"hostPath\" text,\n\t\"volumeName\" text,\n\t\"content\" text,\n\t\"serviceType\" \"serviceType\" DEFAULT 'application' NOT NULL,\n\t\"mountPath\" text NOT NULL,\n\t\"applicationId\" text,\n\t\"postgresId\" text,\n\t\"mariadbId\" text,\n\t\"mongoId\" text,\n\t\"mysqlId\" text,\n\t\"redisId\" text\n);\n--> statement-breakpoint\nCREATE TABLE IF NOT EXISTS \"certificate\" (\n\t\"certificateId\" text PRIMARY KEY NOT NULL,\n\t\"name\" text NOT NULL,\n\t\"certificateData\" text NOT NULL,\n\t\"privateKey\" text NOT NULL,\n\t\"certificatePath\" text NOT NULL,\n\t\"autoRenew\" boolean,\n\tCONSTRAINT \"certificate_certificatePath_unique\" UNIQUE(\"certificatePath\")\n);\n--> statement-breakpoint\nCREATE TABLE IF NOT EXISTS \"session\" (\n\t\"id\" text PRIMARY KEY NOT NULL,\n\t\"user_id\" text NOT NULL,\n\t\"expires_at\" timestamp with time zone NOT NULL\n);\n--> statement-breakpoint\nCREATE TABLE IF NOT EXISTS \"redirect\" (\n\t\"redirectId\" text PRIMARY KEY NOT NULL,\n\t\"regex\" text NOT NULL,\n\t\"replacement\" text NOT NULL,\n\t\"permanent\" boolean DEFAULT false NOT NULL,\n\t\"uniqueConfigKey\" serial NOT NULL,\n\t\"createdAt\" text NOT NULL,\n\t\"applicationId\" text NOT NULL\n);\n--> statement-breakpoint\nCREATE TABLE IF NOT EXISTS \"security\" (\n\t\"securityId\" text PRIMARY KEY NOT NULL,\n\t\"username\" text NOT NULL,\n\t\"password\" text NOT NULL,\n\t\"createdAt\" text NOT NULL,\n\t\"applicationId\" text NOT NULL,\n\tCONSTRAINT \"security_username_applicationId_unique\" UNIQUE(\"username\",\"applicationId\")\n);\n--> statement-breakpoint\nCREATE TABLE IF NOT EXISTS \"port\" (\n\t\"portId\" text PRIMARY KEY NOT NULL,\n\t\"publishedPort\" integer NOT NULL,\n\t\"targetPort\" integer NOT NULL,\n\t\"protocol\" \"protocolType\" NOT NULL,\n\t\"applicationId\" text NOT NULL\n);\n--> statement-breakpoint\nCREATE TABLE IF NOT EXISTS \"redis\" (\n\t\"redisId\" text PRIMARY KEY NOT NULL,\n\t\"name\" text NOT NULL,\n\t\"appName\" text NOT NULL,\n\t\"description\" text,\n\t\"password\" text NOT NULL,\n\t\"dockerImage\" text NOT NULL,\n\t\"command\" text,\n\t\"env\" text,\n\t\"memoryReservation\" integer,\n\t\"memoryLimit\" integer,\n\t\"cpuReservation\" integer,\n\t\"cpuLimit\" integer,\n\t\"externalPort\" integer,\n\t\"createdAt\" text NOT NULL,\n\t\"applicationStatus\" \"applicationStatus\" DEFAULT 'idle' NOT NULL,\n\t\"projectId\" text NOT NULL,\n\tCONSTRAINT \"redis_appName_unique\" UNIQUE(\"appName\")\n);\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"application\" ADD CONSTRAINT \"application_projectId_project_projectId_fk\" FOREIGN KEY (\"projectId\") REFERENCES \"project\"(\"projectId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"postgres\" ADD CONSTRAINT \"postgres_projectId_project_projectId_fk\" FOREIGN KEY (\"projectId\") REFERENCES \"project\"(\"projectId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"user\" ADD CONSTRAINT \"user_adminId_admin_adminId_fk\" FOREIGN KEY (\"adminId\") REFERENCES \"admin\"(\"adminId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"user\" ADD CONSTRAINT \"user_authId_auth_id_fk\" FOREIGN KEY (\"authId\") REFERENCES \"auth\"(\"id\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"admin\" ADD CONSTRAINT \"admin_authId_auth_id_fk\" FOREIGN KEY (\"authId\") REFERENCES \"auth\"(\"id\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"project\" ADD CONSTRAINT \"project_adminId_admin_adminId_fk\" FOREIGN KEY (\"adminId\") REFERENCES \"admin\"(\"adminId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"domain\" ADD CONSTRAINT \"domain_applicationId_application_applicationId_fk\" FOREIGN KEY (\"applicationId\") REFERENCES \"application\"(\"applicationId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"mariadb\" ADD CONSTRAINT \"mariadb_projectId_project_projectId_fk\" FOREIGN KEY (\"projectId\") REFERENCES \"project\"(\"projectId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"mongo\" ADD CONSTRAINT \"mongo_projectId_project_projectId_fk\" FOREIGN KEY (\"projectId\") REFERENCES \"project\"(\"projectId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"mysql\" ADD CONSTRAINT \"mysql_projectId_project_projectId_fk\" FOREIGN KEY (\"projectId\") REFERENCES \"project\"(\"projectId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"backup\" ADD CONSTRAINT \"backup_destinationId_destination_destinationId_fk\" FOREIGN KEY (\"destinationId\") REFERENCES \"destination\"(\"destinationId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"backup\" ADD CONSTRAINT \"backup_postgresId_postgres_postgresId_fk\" FOREIGN KEY (\"postgresId\") REFERENCES \"postgres\"(\"postgresId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"backup\" ADD CONSTRAINT \"backup_mariadbId_mariadb_mariadbId_fk\" FOREIGN KEY (\"mariadbId\") REFERENCES \"mariadb\"(\"mariadbId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"backup\" ADD CONSTRAINT \"backup_mysqlId_mysql_mysqlId_fk\" FOREIGN KEY (\"mysqlId\") REFERENCES \"mysql\"(\"mysqlId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"backup\" ADD CONSTRAINT \"backup_mongoId_mongo_mongoId_fk\" FOREIGN KEY (\"mongoId\") REFERENCES \"mongo\"(\"mongoId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"destination\" ADD CONSTRAINT \"destination_adminId_admin_adminId_fk\" FOREIGN KEY (\"adminId\") REFERENCES \"admin\"(\"adminId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"deployment\" ADD CONSTRAINT \"deployment_applicationId_application_applicationId_fk\" FOREIGN KEY (\"applicationId\") REFERENCES \"application\"(\"applicationId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"mount\" ADD CONSTRAINT \"mount_applicationId_application_applicationId_fk\" FOREIGN KEY (\"applicationId\") REFERENCES \"application\"(\"applicationId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"mount\" ADD CONSTRAINT \"mount_postgresId_postgres_postgresId_fk\" FOREIGN KEY (\"postgresId\") REFERENCES \"postgres\"(\"postgresId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"mount\" ADD CONSTRAINT \"mount_mariadbId_mariadb_mariadbId_fk\" FOREIGN KEY (\"mariadbId\") REFERENCES \"mariadb\"(\"mariadbId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"mount\" ADD CONSTRAINT \"mount_mongoId_mongo_mongoId_fk\" FOREIGN KEY (\"mongoId\") REFERENCES \"mongo\"(\"mongoId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"mount\" ADD CONSTRAINT \"mount_mysqlId_mysql_mysqlId_fk\" FOREIGN KEY (\"mysqlId\") REFERENCES \"mysql\"(\"mysqlId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"mount\" ADD CONSTRAINT \"mount_redisId_redis_redisId_fk\" FOREIGN KEY (\"redisId\") REFERENCES \"redis\"(\"redisId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"session\" ADD CONSTRAINT \"session_user_id_auth_id_fk\" FOREIGN KEY (\"user_id\") REFERENCES \"auth\"(\"id\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"redirect\" ADD CONSTRAINT \"redirect_applicationId_application_applicationId_fk\" FOREIGN KEY (\"applicationId\") REFERENCES \"application\"(\"applicationId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"security\" ADD CONSTRAINT \"security_applicationId_application_applicationId_fk\" FOREIGN KEY (\"applicationId\") REFERENCES \"application\"(\"applicationId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"port\" ADD CONSTRAINT \"port_applicationId_application_applicationId_fk\" FOREIGN KEY (\"applicationId\") REFERENCES \"application\"(\"applicationId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"redis\" ADD CONSTRAINT \"redis_projectId_project_projectId_fk\" FOREIGN KEY (\"projectId\") REFERENCES \"project\"(\"projectId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n"
  },
  {
    "path": "apps/dokploy/drizzle/0001_striped_tattoo.sql",
    "content": "ALTER TABLE \"auth\" ADD COLUMN \"secret\" text;"
  },
  {
    "path": "apps/dokploy/drizzle/0002_ambiguous_carlie_cooper.sql",
    "content": "ALTER TABLE \"auth\" ADD COLUMN \"is2FAEnabled\" boolean DEFAULT false NOT NULL;"
  },
  {
    "path": "apps/dokploy/drizzle/0003_square_lightspeed.sql",
    "content": "ALTER TABLE \"user\" ADD COLUMN \"canAccessToDocker\" boolean DEFAULT false NOT NULL;"
  },
  {
    "path": "apps/dokploy/drizzle/0004_nice_tenebrous.sql",
    "content": "ALTER TABLE \"application\" DROP COLUMN IF EXISTS \"customLogo\";--> statement-breakpoint\nALTER TABLE \"application\" DROP COLUMN IF EXISTS \"customCss\";--> statement-breakpoint\nALTER TABLE \"application\" DROP COLUMN IF EXISTS \"hideLogo\";--> statement-breakpoint\nALTER TABLE \"application\" DROP COLUMN IF EXISTS \"hideLinks\";"
  },
  {
    "path": "apps/dokploy/drizzle/0005_cute_terror.sql",
    "content": "DO $$ BEGIN\n CREATE TYPE \"RegistryType\" AS ENUM('selfHosted', 'cloud');\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nCREATE TABLE IF NOT EXISTS \"registry\" (\n\t\"registryId\" text PRIMARY KEY NOT NULL,\n\t\"registryName\" text NOT NULL,\n\t\"username\" text NOT NULL,\n\t\"password\" text NOT NULL,\n\t\"registryUrl\" text NOT NULL,\n\t\"createdAt\" text NOT NULL,\n\t\"selfHosted\" \"RegistryType\" DEFAULT 'cloud' NOT NULL,\n\t\"adminId\" text NOT NULL\n);\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"registry\" ADD CONSTRAINT \"registry_adminId_admin_adminId_fk\" FOREIGN KEY (\"adminId\") REFERENCES \"admin\"(\"adminId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n"
  },
  {
    "path": "apps/dokploy/drizzle/0006_oval_jimmy_woo.sql",
    "content": "ALTER TABLE \"application\" ADD COLUMN \"registryId\" text;--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"application\" ADD CONSTRAINT \"application_registryId_registry_registryId_fk\" FOREIGN KEY (\"registryId\") REFERENCES \"public\".\"registry\"(\"registryId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n"
  },
  {
    "path": "apps/dokploy/drizzle/0007_cute_guardsmen.sql",
    "content": "ALTER TABLE \"application\" ADD COLUMN \"replicas\" integer DEFAULT 1;"
  },
  {
    "path": "apps/dokploy/drizzle/0008_lazy_sage.sql",
    "content": "ALTER TABLE \"application\" DROP CONSTRAINT \"application_registryId_registry_registryId_fk\";\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"application\" ADD CONSTRAINT \"application_registryId_registry_registryId_fk\" FOREIGN KEY (\"registryId\") REFERENCES \"public\".\"registry\"(\"registryId\") ON DELETE set null ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n"
  },
  {
    "path": "apps/dokploy/drizzle/0009_majestic_spencer_smythe.sql",
    "content": "ALTER TABLE \"application\" ALTER COLUMN \"replicas\" SET NOT NULL;"
  },
  {
    "path": "apps/dokploy/drizzle/0010_lean_black_widow.sql",
    "content": "ALTER TABLE \"registry\" ADD COLUMN \"imagePrefix\" text NOT NULL;"
  },
  {
    "path": "apps/dokploy/drizzle/0011_petite_calypso.sql",
    "content": "ALTER TABLE \"registry\" ALTER COLUMN \"imagePrefix\" DROP NOT NULL;"
  },
  {
    "path": "apps/dokploy/drizzle/0012_chubby_umar.sql",
    "content": "ALTER TABLE \"application\" ADD COLUMN \"healthCheckSwarm\" json;--> statement-breakpoint\nALTER TABLE \"application\" ADD COLUMN \"restartPolicySwarm\" json;--> statement-breakpoint\nALTER TABLE \"application\" ADD COLUMN \"placementSwarm\" json;--> statement-breakpoint\nALTER TABLE \"application\" ADD COLUMN \"updateConfigSwarm\" json;--> statement-breakpoint\nALTER TABLE \"application\" ADD COLUMN \"rollbackConfigSwarm\" json;--> statement-breakpoint\nALTER TABLE \"application\" ADD COLUMN \"modeSwarm\" json;--> statement-breakpoint\nALTER TABLE \"application\" ADD COLUMN \"labelsSwarm\" json;"
  },
  {
    "path": "apps/dokploy/drizzle/0013_blushing_starjammers.sql",
    "content": "ALTER TABLE \"application\" ADD COLUMN \"networkSwarm\" json;"
  },
  {
    "path": "apps/dokploy/drizzle/0014_same_hammerhead.sql",
    "content": "DO $$ BEGIN\n CREATE TYPE \"public\".\"composeType\" AS ENUM('docker-compose', 'stack');\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n CREATE TYPE \"public\".\"sourceTypeCompose\" AS ENUM('git', 'github', 'raw');\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nALTER TYPE \"serviceType\" ADD VALUE 'compose';--> statement-breakpoint\nCREATE TABLE IF NOT EXISTS \"compose\" (\n\t\"composeId\" text PRIMARY KEY NOT NULL,\n\t\"name\" text NOT NULL,\n\t\"appName\" text NOT NULL,\n\t\"description\" text,\n\t\"env\" text,\n\t\"composeFile\" text DEFAULT '' NOT NULL,\n\t\"refreshToken\" text,\n\t\"sourceType\" \"sourceTypeCompose\" DEFAULT 'github' NOT NULL,\n\t\"composeType\" \"composeType\" DEFAULT 'docker-compose' NOT NULL,\n\t\"repository\" text,\n\t\"owner\" text,\n\t\"branch\" text,\n\t\"autoDeploy\" boolean,\n\t\"customGitUrl\" text,\n\t\"customGitBranch\" text,\n\t\"customGitSSHKey\" text,\n\t\"command\" text DEFAULT '' NOT NULL,\n\t\"composePath\" text DEFAULT './docker-compose.yml' NOT NULL,\n\t\"composeStatus\" \"applicationStatus\" DEFAULT 'idle' NOT NULL,\n\t\"projectId\" text NOT NULL,\n\t\"createdAt\" text NOT NULL\n);\n--> statement-breakpoint\nALTER TABLE \"deployment\" ALTER COLUMN \"applicationId\" DROP NOT NULL;--> statement-breakpoint\nALTER TABLE \"deployment\" ADD COLUMN \"composeId\" text;--> statement-breakpoint\nALTER TABLE \"mount\" ADD COLUMN \"composeId\" text;--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"compose\" ADD CONSTRAINT \"compose_projectId_project_projectId_fk\" FOREIGN KEY (\"projectId\") REFERENCES \"public\".\"project\"(\"projectId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"deployment\" ADD CONSTRAINT \"deployment_composeId_compose_composeId_fk\" FOREIGN KEY (\"composeId\") REFERENCES \"public\".\"compose\"(\"composeId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"mount\" ADD CONSTRAINT \"mount_composeId_compose_composeId_fk\" FOREIGN KEY (\"composeId\") REFERENCES \"public\".\"compose\"(\"composeId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n"
  },
  {
    "path": "apps/dokploy/drizzle/0015_fearless_callisto.sql",
    "content": "ALTER TABLE \"auth\" ADD COLUMN \"token\" text;"
  },
  {
    "path": "apps/dokploy/drizzle/0016_chunky_leopardon.sql",
    "content": "ALTER TABLE \"user\" ADD COLUMN \"canAccessToAPI\" boolean DEFAULT false NOT NULL;"
  },
  {
    "path": "apps/dokploy/drizzle/0017_minor_post.sql",
    "content": "ALTER TABLE \"deployment\" ADD COLUMN \"description\" text;"
  },
  {
    "path": "apps/dokploy/drizzle/0018_careful_killmonger.sql",
    "content": "ALTER TABLE \"admin\" ADD COLUMN \"githubWebhookSecret\" text;"
  },
  {
    "path": "apps/dokploy/drizzle/0019_heavy_freak.sql",
    "content": "DO $$ BEGIN\n CREATE TYPE \"public\".\"notificationType\" AS ENUM('slack', 'telegram', 'discord', 'email');\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nCREATE TABLE IF NOT EXISTS \"discord\" (\n\t\"discordId\" text PRIMARY KEY NOT NULL,\n\t\"webhookUrl\" text NOT NULL\n);\n--> statement-breakpoint\nCREATE TABLE IF NOT EXISTS \"email\" (\n\t\"emailId\" text PRIMARY KEY NOT NULL,\n\t\"smtpServer\" text NOT NULL,\n\t\"smtpPort\" integer NOT NULL,\n\t\"username\" text NOT NULL,\n\t\"password\" text NOT NULL,\n\t\"fromAddress\" text NOT NULL,\n\t\"toAddress\" text[] NOT NULL\n);\n--> statement-breakpoint\nCREATE TABLE IF NOT EXISTS \"notification\" (\n\t\"notificationId\" text PRIMARY KEY NOT NULL,\n\t\"name\" text NOT NULL,\n\t\"appDeploy\" boolean DEFAULT false NOT NULL,\n\t\"userJoin\" boolean DEFAULT false NOT NULL,\n\t\"appBuildError\" boolean DEFAULT false NOT NULL,\n\t\"databaseBackup\" boolean DEFAULT false NOT NULL,\n\t\"dokployRestart\" boolean DEFAULT false NOT NULL,\n\t\"notificationType\" \"notificationType\" NOT NULL,\n\t\"createdAt\" text NOT NULL,\n\t\"slackId\" text,\n\t\"telegramId\" text,\n\t\"discordId\" text,\n\t\"emailId\" text\n);\n--> statement-breakpoint\nCREATE TABLE IF NOT EXISTS \"slack\" (\n\t\"slackId\" text PRIMARY KEY NOT NULL,\n\t\"webhookUrl\" text NOT NULL,\n\t\"channel\" text\n);\n--> statement-breakpoint\nCREATE TABLE IF NOT EXISTS \"telegram\" (\n\t\"telegramId\" text PRIMARY KEY NOT NULL,\n\t\"botToken\" text NOT NULL,\n\t\"chatId\" text NOT NULL\n);\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"notification\" ADD CONSTRAINT \"notification_slackId_slack_slackId_fk\" FOREIGN KEY (\"slackId\") REFERENCES \"public\".\"slack\"(\"slackId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"notification\" ADD CONSTRAINT \"notification_telegramId_telegram_telegramId_fk\" FOREIGN KEY (\"telegramId\") REFERENCES \"public\".\"telegram\"(\"telegramId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"notification\" ADD CONSTRAINT \"notification_discordId_discord_discordId_fk\" FOREIGN KEY (\"discordId\") REFERENCES \"public\".\"discord\"(\"discordId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"notification\" ADD CONSTRAINT \"notification_emailId_email_emailId_fk\" FOREIGN KEY (\"emailId\") REFERENCES \"public\".\"email\"(\"emailId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n"
  },
  {
    "path": "apps/dokploy/drizzle/0020_fantastic_slapstick.sql",
    "content": "ALTER TABLE \"notification\" ADD COLUMN \"dockerCleanup\" boolean DEFAULT false NOT NULL;"
  },
  {
    "path": "apps/dokploy/drizzle/0021_premium_sebastian_shaw.sql",
    "content": "ALTER TABLE \"notification\" DROP COLUMN IF EXISTS \"userJoin\";"
  },
  {
    "path": "apps/dokploy/drizzle/0022_warm_colonel_america.sql",
    "content": "ALTER TYPE \"sourceType\" ADD VALUE 'drop';"
  },
  {
    "path": "apps/dokploy/drizzle/0023_icy_maverick.sql",
    "content": "ALTER TABLE \"application\" ADD COLUMN \"dropBuildPath\" text;"
  },
  {
    "path": "apps/dokploy/drizzle/0024_dapper_supernaut.sql",
    "content": "ALTER TABLE \"mount\" ADD COLUMN \"filePath\" text;"
  },
  {
    "path": "apps/dokploy/drizzle/0025_lying_mephisto.sql",
    "content": "ALTER TABLE \"application\" ADD COLUMN \"buildArgs\" text;"
  },
  {
    "path": "apps/dokploy/drizzle/0026_known_dormammu.sql",
    "content": "CREATE TABLE IF NOT EXISTS \"ssh-key\" (\n\t\"sshKeyId\" text PRIMARY KEY NOT NULL,\n\t\"publicKey\" text NOT NULL,\n\t\"name\" text NOT NULL,\n\t\"description\" text,\n\t\"createdAt\" text NOT NULL,\n\t\"lastUsedAt\" text\n);\n--> statement-breakpoint\nALTER TABLE \"application\" ADD COLUMN \"customGitSSHKeyId\" text;--> statement-breakpoint\nALTER TABLE \"compose\" ADD COLUMN \"customGitSSHKeyId\" text;--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"application\" ADD CONSTRAINT \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\" FOREIGN KEY (\"customGitSSHKeyId\") REFERENCES \"public\".\"ssh-key\"(\"sshKeyId\") ON DELETE set null ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"compose\" ADD CONSTRAINT \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\" FOREIGN KEY (\"customGitSSHKeyId\") REFERENCES \"public\".\"ssh-key\"(\"sshKeyId\") ON DELETE set null ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nALTER TABLE \"application\" DROP COLUMN IF EXISTS \"customGitSSHKey\";--> statement-breakpoint\nALTER TABLE \"compose\" DROP COLUMN IF EXISTS \"customGitSSHKey\";"
  },
  {
    "path": "apps/dokploy/drizzle/0027_red_lady_bullseye.sql",
    "content": "ALTER TABLE \"application\" ADD COLUMN \"publishDirectory\" text;"
  },
  {
    "path": "apps/dokploy/drizzle/0028_jittery_eternity.sql",
    "content": "ALTER TYPE \"buildType\" ADD VALUE 'static';"
  },
  {
    "path": "apps/dokploy/drizzle/0029_colossal_zodiak.sql",
    "content": "ALTER TABLE \"application\" ADD COLUMN \"dockerContextPath\" text;"
  },
  {
    "path": "apps/dokploy/drizzle/0030_little_kabuki.sql",
    "content": "ALTER TABLE \"user\" ADD COLUMN \"canAccessToSSHKeys\" boolean DEFAULT false NOT NULL;"
  },
  {
    "path": "apps/dokploy/drizzle/0031_steep_vulture.sql",
    "content": "DO $$ BEGIN\n CREATE TYPE \"public\".\"domainType\" AS ENUM('compose', 'application');\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nALTER TABLE \"domain\" ALTER COLUMN \"applicationId\" DROP NOT NULL;--> statement-breakpoint\nALTER TABLE \"domain\" ADD COLUMN \"serviceName\" text;--> statement-breakpoint\nALTER TABLE \"domain\" ADD COLUMN \"domainType\" \"domainType\" DEFAULT 'application';--> statement-breakpoint\nALTER TABLE \"domain\" ADD COLUMN \"composeId\" text;--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"domain\" ADD CONSTRAINT \"domain_composeId_compose_composeId_fk\" FOREIGN KEY (\"composeId\") REFERENCES \"public\".\"compose\"(\"composeId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n"
  },
  {
    "path": "apps/dokploy/drizzle/0032_flashy_shadow_king.sql",
    "content": "ALTER TABLE \"domain\" ALTER COLUMN \"port\" SET DEFAULT 3000;"
  },
  {
    "path": "apps/dokploy/drizzle/0033_white_hawkeye.sql",
    "content": "DO $$ BEGIN\n CREATE TYPE \"public\".\"gitProviderType\" AS ENUM('github', 'gitlab', 'bitbucket');\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nALTER TYPE \"sourceType\" ADD VALUE 'gitlab';--> statement-breakpoint\nALTER TYPE \"sourceType\" ADD VALUE 'bitbucket';--> statement-breakpoint\nALTER TYPE \"sourceTypeCompose\" ADD VALUE 'gitlab';--> statement-breakpoint\nALTER TYPE \"sourceTypeCompose\" ADD VALUE 'bitbucket';--> statement-breakpoint\nCREATE TABLE IF NOT EXISTS \"git_provider\" (\n\t\"gitProviderId\" text PRIMARY KEY NOT NULL,\n\t\"name\" text NOT NULL,\n\t\"providerType\" \"gitProviderType\" DEFAULT 'github' NOT NULL,\n\t\"createdAt\" text NOT NULL,\n\t\"authId\" text NOT NULL\n);\n--> statement-breakpoint\nCREATE TABLE IF NOT EXISTS \"bitbucket\" (\n\t\"bitbucketId\" text PRIMARY KEY NOT NULL,\n\t\"bitbucketUsername\" text,\n\t\"appPassword\" text,\n\t\"bitbucketWorkspaceName\" text,\n\t\"gitProviderId\" text NOT NULL\n);\n--> statement-breakpoint\nCREATE TABLE IF NOT EXISTS \"github\" (\n\t\"githubId\" text PRIMARY KEY NOT NULL,\n\t\"githubAppName\" text,\n\t\"githubAppId\" integer,\n\t\"githubClientId\" text,\n\t\"githubClientSecret\" text,\n\t\"githubInstallationId\" text,\n\t\"githubPrivateKey\" text,\n\t\"githubWebhookSecret\" text,\n\t\"gitProviderId\" text NOT NULL\n);\n--> statement-breakpoint\nCREATE TABLE IF NOT EXISTS \"gitlab\" (\n\t\"gitlabId\" text PRIMARY KEY NOT NULL,\n\t\"application_id\" text,\n\t\"redirect_uri\" text,\n\t\"secret\" text,\n\t\"access_token\" text,\n\t\"refresh_token\" text,\n\t\"group_name\" text,\n\t\"expires_at\" integer,\n\t\"gitProviderId\" text NOT NULL\n);\n--> statement-breakpoint\nALTER TABLE \"application\" ADD COLUMN \"gitlabProjectId\" integer;--> statement-breakpoint\nALTER TABLE \"application\" ADD COLUMN \"gitlabRepository\" text;--> statement-breakpoint\nALTER TABLE \"application\" ADD COLUMN \"gitlabOwner\" text;--> statement-breakpoint\nALTER TABLE \"application\" ADD COLUMN \"gitlabBranch\" text;--> statement-breakpoint\nALTER TABLE \"application\" ADD COLUMN \"gitlabBuildPath\" text DEFAULT '/';--> statement-breakpoint\nALTER TABLE \"application\" ADD COLUMN \"gitlabPathNamespace\" text;--> statement-breakpoint\nALTER TABLE \"application\" ADD COLUMN \"bitbucketRepository\" text;--> statement-breakpoint\nALTER TABLE \"application\" ADD COLUMN \"bitbucketOwner\" text;--> statement-breakpoint\nALTER TABLE \"application\" ADD COLUMN \"bitbucketBranch\" text;--> statement-breakpoint\nALTER TABLE \"application\" ADD COLUMN \"bitbucketBuildPath\" text DEFAULT '/';--> statement-breakpoint\nALTER TABLE \"application\" ADD COLUMN \"githubId\" text;--> statement-breakpoint\nALTER TABLE \"application\" ADD COLUMN \"gitlabId\" text;--> statement-breakpoint\nALTER TABLE \"application\" ADD COLUMN \"bitbucketId\" text;--> statement-breakpoint\nALTER TABLE \"user\" ADD COLUMN \"canAccessToGitProviders\" boolean DEFAULT false NOT NULL;--> statement-breakpoint\nALTER TABLE \"compose\" ADD COLUMN \"gitlabProjectId\" integer;--> statement-breakpoint\nALTER TABLE \"compose\" ADD COLUMN \"gitlabRepository\" text;--> statement-breakpoint\nALTER TABLE \"compose\" ADD COLUMN \"gitlabOwner\" text;--> statement-breakpoint\nALTER TABLE \"compose\" ADD COLUMN \"gitlabBranch\" text;--> statement-breakpoint\nALTER TABLE \"compose\" ADD COLUMN \"gitlabPathNamespace\" text;--> statement-breakpoint\nALTER TABLE \"compose\" ADD COLUMN \"bitbucketRepository\" text;--> statement-breakpoint\nALTER TABLE \"compose\" ADD COLUMN \"bitbucketOwner\" text;--> statement-breakpoint\nALTER TABLE \"compose\" ADD COLUMN \"bitbucketBranch\" text;--> statement-breakpoint\nALTER TABLE \"compose\" ADD COLUMN \"githubId\" text;--> statement-breakpoint\nALTER TABLE \"compose\" ADD COLUMN \"gitlabId\" text;--> statement-breakpoint\nALTER TABLE \"compose\" ADD COLUMN \"bitbucketId\" text;--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"git_provider\" ADD CONSTRAINT \"git_provider_authId_auth_id_fk\" FOREIGN KEY (\"authId\") REFERENCES \"public\".\"auth\"(\"id\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"bitbucket\" ADD CONSTRAINT \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\" FOREIGN KEY (\"gitProviderId\") REFERENCES \"public\".\"git_provider\"(\"gitProviderId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"github\" ADD CONSTRAINT \"github_gitProviderId_git_provider_gitProviderId_fk\" FOREIGN KEY (\"gitProviderId\") REFERENCES \"public\".\"git_provider\"(\"gitProviderId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"gitlab\" ADD CONSTRAINT \"gitlab_gitProviderId_git_provider_gitProviderId_fk\" FOREIGN KEY (\"gitProviderId\") REFERENCES \"public\".\"git_provider\"(\"gitProviderId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"application\" ADD CONSTRAINT \"application_githubId_github_githubId_fk\" FOREIGN KEY (\"githubId\") REFERENCES \"public\".\"github\"(\"githubId\") ON DELETE set null ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"application\" ADD CONSTRAINT \"application_gitlabId_gitlab_gitlabId_fk\" FOREIGN KEY (\"gitlabId\") REFERENCES \"public\".\"gitlab\"(\"gitlabId\") ON DELETE set null ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"application\" ADD CONSTRAINT \"application_bitbucketId_bitbucket_bitbucketId_fk\" FOREIGN KEY (\"bitbucketId\") REFERENCES \"public\".\"bitbucket\"(\"bitbucketId\") ON DELETE set null ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"compose\" ADD CONSTRAINT \"compose_githubId_github_githubId_fk\" FOREIGN KEY (\"githubId\") REFERENCES \"public\".\"github\"(\"githubId\") ON DELETE set null ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"compose\" ADD CONSTRAINT \"compose_gitlabId_gitlab_gitlabId_fk\" FOREIGN KEY (\"gitlabId\") REFERENCES \"public\".\"gitlab\"(\"gitlabId\") ON DELETE set null ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"compose\" ADD CONSTRAINT \"compose_bitbucketId_bitbucket_bitbucketId_fk\" FOREIGN KEY (\"bitbucketId\") REFERENCES \"public\".\"bitbucket\"(\"bitbucketId\") ON DELETE set null ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nALTER TABLE \"admin\" DROP COLUMN IF EXISTS \"githubAppId\";--> statement-breakpoint\nALTER TABLE \"admin\" DROP COLUMN IF EXISTS \"githubAppName\";--> statement-breakpoint\nALTER TABLE \"admin\" DROP COLUMN IF EXISTS \"githubClientId\";--> statement-breakpoint\nALTER TABLE \"admin\" DROP COLUMN IF EXISTS \"githubClientSecret\";--> statement-breakpoint\nALTER TABLE \"admin\" DROP COLUMN IF EXISTS \"githubInstallationId\";--> statement-breakpoint\nALTER TABLE \"admin\" DROP COLUMN IF EXISTS \"githubPrivateKey\";--> statement-breakpoint\nALTER TABLE \"admin\" DROP COLUMN IF EXISTS \"githubWebhookSecret\";"
  },
  {
    "path": "apps/dokploy/drizzle/0034_aspiring_secret_warriors.sql",
    "content": "ALTER TABLE \"application\" ADD COLUMN \"dockerBuildStage\" text;"
  },
  {
    "path": "apps/dokploy/drizzle/0035_cool_gravity.sql",
    "content": "ALTER TABLE \"compose\" ADD COLUMN \"suffix\" text DEFAULT '' NOT NULL;--> statement-breakpoint\nALTER TABLE \"compose\" ADD COLUMN \"randomize\" boolean DEFAULT false NOT NULL;"
  },
  {
    "path": "apps/dokploy/drizzle/0036_tired_ronan.sql",
    "content": "ALTER TABLE \"admin\" ADD COLUMN \"enableLogRotation\" boolean DEFAULT false NOT NULL;"
  },
  {
    "path": "apps/dokploy/drizzle/0037_legal_namor.sql",
    "content": "CREATE TABLE IF NOT EXISTS \"server\" (\n\t\"serverId\" text PRIMARY KEY NOT NULL,\n\t\"name\" text NOT NULL,\n\t\"description\" text,\n\t\"ipAddress\" text NOT NULL,\n\t\"port\" integer NOT NULL,\n\t\"username\" text DEFAULT 'root' NOT NULL,\n\t\"appName\" text NOT NULL,\n\t\"enableDockerCleanup\" boolean DEFAULT false NOT NULL,\n\t\"createdAt\" text NOT NULL,\n\t\"adminId\" text NOT NULL,\n\t\"sshKeyId\" text\n);\n--> statement-breakpoint\nALTER TABLE \"application\" ADD COLUMN \"serverId\" text;--> statement-breakpoint\nALTER TABLE \"postgres\" ADD COLUMN \"serverId\" text;--> statement-breakpoint\nALTER TABLE \"mariadb\" ADD COLUMN \"serverId\" text;--> statement-breakpoint\nALTER TABLE \"mongo\" ADD COLUMN \"serverId\" text;--> statement-breakpoint\nALTER TABLE \"mysql\" ADD COLUMN \"serverId\" text;--> statement-breakpoint\nALTER TABLE \"deployment\" ADD COLUMN \"serverId\" text;--> statement-breakpoint\nALTER TABLE \"redis\" ADD COLUMN \"serverId\" text;--> statement-breakpoint\nALTER TABLE \"compose\" ADD COLUMN \"serverId\" text;--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"server\" ADD CONSTRAINT \"server_adminId_admin_adminId_fk\" FOREIGN KEY (\"adminId\") REFERENCES \"public\".\"admin\"(\"adminId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"server\" ADD CONSTRAINT \"server_sshKeyId_ssh-key_sshKeyId_fk\" FOREIGN KEY (\"sshKeyId\") REFERENCES \"public\".\"ssh-key\"(\"sshKeyId\") ON DELETE set null ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"application\" ADD CONSTRAINT \"application_serverId_server_serverId_fk\" FOREIGN KEY (\"serverId\") REFERENCES \"public\".\"server\"(\"serverId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"postgres\" ADD CONSTRAINT \"postgres_serverId_server_serverId_fk\" FOREIGN KEY (\"serverId\") REFERENCES \"public\".\"server\"(\"serverId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"mariadb\" ADD CONSTRAINT \"mariadb_serverId_server_serverId_fk\" FOREIGN KEY (\"serverId\") REFERENCES \"public\".\"server\"(\"serverId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"mongo\" ADD CONSTRAINT \"mongo_serverId_server_serverId_fk\" FOREIGN KEY (\"serverId\") REFERENCES \"public\".\"server\"(\"serverId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"mysql\" ADD CONSTRAINT \"mysql_serverId_server_serverId_fk\" FOREIGN KEY (\"serverId\") REFERENCES \"public\".\"server\"(\"serverId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"deployment\" ADD CONSTRAINT \"deployment_serverId_server_serverId_fk\" FOREIGN KEY (\"serverId\") REFERENCES \"public\".\"server\"(\"serverId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"redis\" ADD CONSTRAINT \"redis_serverId_server_serverId_fk\" FOREIGN KEY (\"serverId\") REFERENCES \"public\".\"server\"(\"serverId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"compose\" ADD CONSTRAINT \"compose_serverId_server_serverId_fk\" FOREIGN KEY (\"serverId\") REFERENCES \"public\".\"server\"(\"serverId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n"
  },
  {
    "path": "apps/dokploy/drizzle/0038_rapid_landau.sql",
    "content": "ALTER TABLE \"registry\" ALTER COLUMN \"registryUrl\" SET DEFAULT '';"
  },
  {
    "path": "apps/dokploy/drizzle/0039_many_tiger_shark.sql",
    "content": "ALTER TABLE \"git_provider\" DROP CONSTRAINT \"git_provider_authId_auth_id_fk\";\n--> statement-breakpoint\nALTER TABLE \"notification\" ADD COLUMN \"adminId\" text;--> statement-breakpoint\nALTER TABLE \"ssh-key\" ADD COLUMN \"privateKey\" text DEFAULT '' NOT NULL;--> statement-breakpoint\nALTER TABLE \"ssh-key\" ADD COLUMN \"adminId\" text;--> statement-breakpoint\nALTER TABLE \"git_provider\" ADD COLUMN \"adminId\" text;--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"notification\" ADD CONSTRAINT \"notification_adminId_admin_adminId_fk\" FOREIGN KEY (\"adminId\") REFERENCES \"public\".\"admin\"(\"adminId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"ssh-key\" ADD CONSTRAINT \"ssh-key_adminId_admin_adminId_fk\" FOREIGN KEY (\"adminId\") REFERENCES \"public\".\"admin\"(\"adminId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"git_provider\" ADD CONSTRAINT \"git_provider_adminId_admin_adminId_fk\" FOREIGN KEY (\"adminId\") REFERENCES \"public\".\"admin\"(\"adminId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nALTER TABLE \"git_provider\" DROP COLUMN IF EXISTS \"authId\";"
  },
  {
    "path": "apps/dokploy/drizzle/0040_graceful_wolfsbane.sql",
    "content": "ALTER TABLE \"certificate\" ADD COLUMN \"adminId\" text;--> statement-breakpoint\nALTER TABLE \"certificate\" ADD COLUMN \"serverId\" text;--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"certificate\" ADD CONSTRAINT \"certificate_adminId_admin_adminId_fk\" FOREIGN KEY (\"adminId\") REFERENCES \"public\".\"admin\"(\"adminId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"certificate\" ADD CONSTRAINT \"certificate_serverId_server_serverId_fk\" FOREIGN KEY (\"serverId\") REFERENCES \"public\".\"server\"(\"serverId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n"
  },
  {
    "path": "apps/dokploy/drizzle/0041_huge_bruce_banner.sql",
    "content": "DO $$ BEGIN\n CREATE TYPE \"public\".\"serverStatus\" AS ENUM('active', 'inactive');\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nALTER TABLE \"admin\" ADD COLUMN \"stripeCustomerId\" text;--> statement-breakpoint\nALTER TABLE \"admin\" ADD COLUMN \"stripeSubscriptionId\" text;--> statement-breakpoint\nALTER TABLE \"admin\" ADD COLUMN \"serversQuantity\" integer DEFAULT 0 NOT NULL;--> statement-breakpoint\nALTER TABLE \"auth\" ADD COLUMN \"resetPasswordToken\" text;--> statement-breakpoint\nALTER TABLE \"auth\" ADD COLUMN \"resetPasswordExpiresAt\" text;--> statement-breakpoint\nALTER TABLE \"server\" ADD COLUMN \"serverStatus\" \"serverStatus\" DEFAULT 'active' NOT NULL;"
  },
  {
    "path": "apps/dokploy/drizzle/0042_fancy_havok.sql",
    "content": "ALTER TABLE \"auth\" ADD COLUMN \"confirmationToken\" text;--> statement-breakpoint\nALTER TABLE \"auth\" ADD COLUMN \"confirmationExpiresAt\" text;"
  },
  {
    "path": "apps/dokploy/drizzle/0043_closed_naoko.sql",
    "content": "ALTER TABLE \"admin\" ADD COLUMN \"env\" text DEFAULT '' NOT NULL;--> statement-breakpoint\nALTER TABLE \"project\" ADD COLUMN \"env\" text DEFAULT '' NOT NULL;"
  },
  {
    "path": "apps/dokploy/drizzle/0044_sour_true_believers.sql",
    "content": "ALTER TABLE \"admin\" DROP COLUMN IF EXISTS \"env\";"
  },
  {
    "path": "apps/dokploy/drizzle/0045_smiling_blur.sql",
    "content": "ALTER TABLE \"destination\" ADD COLUMN \"provider\" text;"
  },
  {
    "path": "apps/dokploy/drizzle/0046_purple_sleeper.sql",
    "content": "ALTER TABLE \"application\" ADD COLUMN \"registryUrl\" text;"
  },
  {
    "path": "apps/dokploy/drizzle/0047_tidy_revanche.sql",
    "content": "ALTER TABLE \"application\" ADD COLUMN \"herokuVersion\" text;"
  },
  {
    "path": "apps/dokploy/drizzle/0048_flat_expediter.sql",
    "content": "ALTER TABLE \"application\" ALTER COLUMN \"herokuVersion\" SET DEFAULT '24';"
  },
  {
    "path": "apps/dokploy/drizzle/0049_dark_leopardon.sql",
    "content": "ALTER TYPE \"domainType\" ADD VALUE 'preview';--> statement-breakpoint\nCREATE TABLE IF NOT EXISTS \"preview_deployments\" (\n\t\"previewDeploymentId\" text PRIMARY KEY NOT NULL,\n\t\"branch\" text NOT NULL,\n\t\"pullRequestId\" text NOT NULL,\n\t\"pullRequestNumber\" text NOT NULL,\n\t\"pullRequestURL\" text NOT NULL,\n\t\"pullRequestTitle\" text NOT NULL,\n\t\"pullRequestCommentId\" text NOT NULL,\n\t\"previewStatus\" \"applicationStatus\" DEFAULT 'idle' NOT NULL,\n\t\"appName\" text NOT NULL,\n\t\"applicationId\" text NOT NULL,\n\t\"domainId\" text,\n\t\"createdAt\" text NOT NULL,\n\t\"expiresAt\" text,\n\tCONSTRAINT \"preview_deployments_appName_unique\" UNIQUE(\"appName\")\n);\n--> statement-breakpoint\nALTER TABLE \"application\" ADD COLUMN \"previewEnv\" text;--> statement-breakpoint\nALTER TABLE \"application\" ADD COLUMN \"previewBuildArgs\" text;--> statement-breakpoint\nALTER TABLE \"application\" ADD COLUMN \"previewWildcard\" text;--> statement-breakpoint\nALTER TABLE \"application\" ADD COLUMN \"previewPort\" integer DEFAULT 3000;--> statement-breakpoint\nALTER TABLE \"application\" ADD COLUMN \"previewHttps\" boolean DEFAULT false NOT NULL;--> statement-breakpoint\nALTER TABLE \"application\" ADD COLUMN \"previewPath\" text DEFAULT '/';--> statement-breakpoint\nALTER TABLE \"application\" ADD COLUMN \"certificateType\" \"certificateType\" DEFAULT 'none' NOT NULL;--> statement-breakpoint\nALTER TABLE \"application\" ADD COLUMN \"previewLimit\" integer DEFAULT 3;--> statement-breakpoint\nALTER TABLE \"application\" ADD COLUMN \"isPreviewDeploymentsActive\" boolean DEFAULT false;--> statement-breakpoint\nALTER TABLE \"domain\" ADD COLUMN \"previewDeploymentId\" text;--> statement-breakpoint\nALTER TABLE \"deployment\" ADD COLUMN \"isPreviewDeployment\" boolean DEFAULT false;--> statement-breakpoint\nALTER TABLE \"deployment\" ADD COLUMN \"previewDeploymentId\" text;--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"preview_deployments\" ADD CONSTRAINT \"preview_deployments_applicationId_application_applicationId_fk\" FOREIGN KEY (\"applicationId\") REFERENCES \"public\".\"application\"(\"applicationId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"preview_deployments\" ADD CONSTRAINT \"preview_deployments_domainId_domain_domainId_fk\" FOREIGN KEY (\"domainId\") REFERENCES \"public\".\"domain\"(\"domainId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"domain\" ADD CONSTRAINT \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\" FOREIGN KEY (\"previewDeploymentId\") REFERENCES \"public\".\"preview_deployments\"(\"previewDeploymentId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"deployment\" ADD CONSTRAINT \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\" FOREIGN KEY (\"previewDeploymentId\") REFERENCES \"public\".\"preview_deployments\"(\"previewDeploymentId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n"
  },
  {
    "path": "apps/dokploy/drizzle/0050_nappy_wrecker.sql",
    "content": "ALTER TABLE \"gitlab\" ADD COLUMN \"gitlabUrl\" text DEFAULT 'https://gitlab.com' NOT NULL;"
  },
  {
    "path": "apps/dokploy/drizzle/0051_hard_gorgon.sql",
    "content": "ALTER TABLE \"server\" ADD COLUMN \"command\" text DEFAULT '' NOT NULL;"
  },
  {
    "path": "apps/dokploy/drizzle/0052_bumpy_luckman.sql",
    "content": "ALTER TABLE \"discord\" ADD COLUMN \"decoration\" boolean;"
  },
  {
    "path": "apps/dokploy/drizzle/0053_broken_kulan_gath.sql",
    "content": "ALTER TABLE \"mongo\" ADD COLUMN \"replicaSets\" boolean DEFAULT false;"
  },
  {
    "path": "apps/dokploy/drizzle/0054_nervous_spencer_smythe.sql",
    "content": "ALTER TABLE \"application\" ALTER COLUMN \"memoryReservation\" SET DATA TYPE text;--> statement-breakpoint\nALTER TABLE \"application\" ALTER COLUMN \"memoryLimit\" SET DATA TYPE text;--> statement-breakpoint\nALTER TABLE \"application\" ALTER COLUMN \"cpuReservation\" SET DATA TYPE text;--> statement-breakpoint\nALTER TABLE \"application\" ALTER COLUMN \"cpuLimit\" SET DATA TYPE text;"
  },
  {
    "path": "apps/dokploy/drizzle/0055_next_serpent_society.sql",
    "content": "ALTER TABLE \"postgres\" ALTER COLUMN \"memoryReservation\" SET DATA TYPE text;--> statement-breakpoint\nALTER TABLE \"postgres\" ALTER COLUMN \"memoryLimit\" SET DATA TYPE text;--> statement-breakpoint\nALTER TABLE \"postgres\" ALTER COLUMN \"cpuReservation\" SET DATA TYPE text;--> statement-breakpoint\nALTER TABLE \"postgres\" ALTER COLUMN \"cpuLimit\" SET DATA TYPE text;--> statement-breakpoint\nALTER TABLE \"mariadb\" ALTER COLUMN \"memoryReservation\" SET DATA TYPE text;--> statement-breakpoint\nALTER TABLE \"mariadb\" ALTER COLUMN \"memoryLimit\" SET DATA TYPE text;--> statement-breakpoint\nALTER TABLE \"mariadb\" ALTER COLUMN \"cpuReservation\" SET DATA TYPE text;--> statement-breakpoint\nALTER TABLE \"mariadb\" ALTER COLUMN \"cpuLimit\" SET DATA TYPE text;--> statement-breakpoint\nALTER TABLE \"mongo\" ALTER COLUMN \"memoryReservation\" SET DATA TYPE text;--> statement-breakpoint\nALTER TABLE \"mongo\" ALTER COLUMN \"memoryLimit\" SET DATA TYPE text;--> statement-breakpoint\nALTER TABLE \"mongo\" ALTER COLUMN \"cpuReservation\" SET DATA TYPE text;--> statement-breakpoint\nALTER TABLE \"mongo\" ALTER COLUMN \"cpuLimit\" SET DATA TYPE text;--> statement-breakpoint\nALTER TABLE \"mysql\" ALTER COLUMN \"memoryReservation\" SET DATA TYPE text;--> statement-breakpoint\nALTER TABLE \"mysql\" ALTER COLUMN \"memoryLimit\" SET DATA TYPE text;--> statement-breakpoint\nALTER TABLE \"mysql\" ALTER COLUMN \"cpuReservation\" SET DATA TYPE text;--> statement-breakpoint\nALTER TABLE \"mysql\" ALTER COLUMN \"cpuLimit\" SET DATA TYPE text;--> statement-breakpoint\nALTER TABLE \"redis\" ALTER COLUMN \"memoryReservation\" SET DATA TYPE text;--> statement-breakpoint\nALTER TABLE \"redis\" ALTER COLUMN \"memoryLimit\" SET DATA TYPE text;--> statement-breakpoint\nALTER TABLE \"redis\" ALTER COLUMN \"cpuReservation\" SET DATA TYPE text;--> statement-breakpoint\nALTER TABLE \"redis\" ALTER COLUMN \"cpuLimit\" SET DATA TYPE text;"
  },
  {
    "path": "apps/dokploy/drizzle/0056_majestic_skaar.sql",
    "content": "ALTER TYPE \"notificationType\" ADD VALUE 'gotify';--> statement-breakpoint\nCREATE TABLE IF NOT EXISTS \"gotify\" (\n\t\"gotifyId\" text PRIMARY KEY NOT NULL,\n\t\"serverUrl\" text NOT NULL,\n\t\"appToken\" text NOT NULL,\n\t\"priority\" integer DEFAULT 5 NOT NULL,\n\t\"decoration\" boolean\n);\n--> statement-breakpoint\nALTER TABLE \"notification\" ADD COLUMN \"gotifyId\" text;--> statement-breakpoint\nDO $$ BEGIN\n ALTER TABLE \"notification\" ADD CONSTRAINT \"notification_gotifyId_gotify_gotifyId_fk\" FOREIGN KEY (\"gotifyId\") REFERENCES \"public\".\"gotify\"(\"gotifyId\") ON DELETE cascade ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;\n"
  },
  {
    "path": "apps/dokploy/drizzle/0057_tricky_living_tribunal.sql",
    "content": "ALTER TABLE \"admin\" ADD COLUMN \"cleanupCacheApplications\" boolean DEFAULT true NOT NULL;--> statement-breakpoint\nALTER TABLE \"admin\" ADD COLUMN \"cleanupCacheOnPreviews\" boolean DEFAULT false NOT NULL;--> statement-breakpoint\nALTER TABLE \"admin\" ADD COLUMN \"cleanupCacheOnCompose\" boolean DEFAULT false NOT NULL;"
  },
  {
    "path": "apps/dokploy/drizzle/0058_brown_sharon_carter.sql",
    "content": "ALTER TABLE \"deployment\" ADD COLUMN \"errorMessage\" text;"
  },
  {
    "path": "apps/dokploy/drizzle/0059_striped_bill_hollister.sql",
    "content": "ALTER TABLE \"admin\" ALTER COLUMN \"cleanupCacheApplications\" SET DEFAULT false;"
  },
  {
    "path": "apps/dokploy/drizzle/0060_disable-aggressive-cache.sql",
    "content": "-- Custom SQL migration file, put you code below!\n\nUPDATE \"admin\" SET \"cleanupCacheApplications\" = false;\n"
  },
  {
    "path": "apps/dokploy/drizzle/0061_many_molten_man.sql",
    "content": "ALTER TABLE \"admin\" ADD COLUMN \"enablePaidFeatures\" boolean DEFAULT false NOT NULL;--> statement-breakpoint\nALTER TABLE \"admin\" ADD COLUMN \"metricsConfig\" jsonb DEFAULT '{\"server\":{\"refreshRate\":20,\"port\":4500,\"token\":\"\",\"retentionDays\":2,\"cronJob\":\"\",\"urlCallback\":\"\",\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":20,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb NOT NULL;--> statement-breakpoint\nALTER TABLE \"notification\" ADD COLUMN \"serverThreshold\" boolean DEFAULT false NOT NULL;--> statement-breakpoint\nALTER TABLE \"server\" ADD COLUMN \"metricsConfig\" jsonb DEFAULT '{\"server\":{\"refreshRate\":20,\"port\":4500,\"token\":\"\",\"urlCallback\":\"\",\"cronJob\":\"\",\"retentionDays\":2,\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":20,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb NOT NULL;"
  },
  {
    "path": "apps/dokploy/drizzle/0062_slippery_white_tiger.sql",
    "content": "ALTER TABLE \"admin\" ALTER COLUMN \"metricsConfig\" SET DEFAULT '{\"server\":{\"type\":\"Dokploy\",\"refreshRate\":20,\"port\":4500,\"token\":\"\",\"retentionDays\":2,\"cronJob\":\"\",\"urlCallback\":\"\",\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":20,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb;--> statement-breakpoint\nALTER TABLE \"server\" ALTER COLUMN \"metricsConfig\" SET DEFAULT '{\"server\":{\"type\":\"Remote\",\"refreshRate\":20,\"port\":4500,\"token\":\"\",\"urlCallback\":\"\",\"cronJob\":\"\",\"retentionDays\":2,\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":20,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb;"
  },
  {
    "path": "apps/dokploy/drizzle/0063_panoramic_dreadnoughts.sql",
    "content": "ALTER TABLE \"admin\" ALTER COLUMN \"metricsConfig\" SET DEFAULT '{\"server\":{\"type\":\"Dokploy\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"retentionDays\":2,\"cronJob\":\"\",\"urlCallback\":\"\",\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb;--> statement-breakpoint\nALTER TABLE \"server\" ALTER COLUMN \"metricsConfig\" SET DEFAULT '{\"server\":{\"type\":\"Remote\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"urlCallback\":\"\",\"cronJob\":\"\",\"retentionDays\":2,\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb;"
  },
  {
    "path": "apps/dokploy/drizzle/0064_previous_agent_brand.sql",
    "content": "ALTER TABLE \"compose\" ADD COLUMN \"deployable\" boolean DEFAULT false NOT NULL;"
  },
  {
    "path": "apps/dokploy/drizzle/0065_daily_zaladane.sql",
    "content": "ALTER TABLE \"compose\" RENAME COLUMN \"deployable\" TO \"isolatedDeployment\";"
  },
  {
    "path": "apps/dokploy/drizzle/0066_yielding_echo.sql",
    "content": "CREATE TABLE \"user_temp\" (\n\t\"id\" text PRIMARY KEY NOT NULL,\n\t\"name\" text DEFAULT '' NOT NULL,\n\t\"isRegistered\" boolean DEFAULT false NOT NULL,\n\t\"expirationDate\" text NOT NULL,\n\t\"createdAt\" text NOT NULL,\n\t\"two_factor_enabled\" boolean DEFAULT false NOT NULL,\n\t\"email\" text NOT NULL,\n\t\"email_verified\" boolean NOT NULL,\n\t\"image\" text,\n\t\"banned\" boolean,\n\t\"ban_reason\" text,\n\t\"ban_expires\" timestamp,\n\t\"updated_at\" timestamp NOT NULL,\n\t\"serverIp\" text,\n\t\"certificateType\" \"certificateType\" DEFAULT 'none' NOT NULL,\n\t\"host\" text,\n\t\"letsEncryptEmail\" text,\n\t\"sshPrivateKey\" text,\n\t\"enableDockerCleanup\" boolean DEFAULT false NOT NULL,\n\t\"enableLogRotation\" boolean DEFAULT false NOT NULL,\n\t\"enablePaidFeatures\" boolean DEFAULT false NOT NULL,\n\t\"metricsConfig\" jsonb DEFAULT '{\"server\":{\"type\":\"Dokploy\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"retentionDays\":2,\"cronJob\":\"\",\"urlCallback\":\"\",\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb NOT NULL,\n\t\"cleanupCacheApplications\" boolean DEFAULT false NOT NULL,\n\t\"cleanupCacheOnPreviews\" boolean DEFAULT false NOT NULL,\n\t\"cleanupCacheOnCompose\" boolean DEFAULT false NOT NULL,\n\t\"stripeCustomerId\" text,\n\t\"stripeSubscriptionId\" text,\n\t\"serversQuantity\" integer DEFAULT 0 NOT NULL,\n\tCONSTRAINT \"user_temp_email_unique\" UNIQUE(\"email\")\n);\n--> statement-breakpoint\nCREATE TABLE \"session_temp\" (\n\t\"id\" text PRIMARY KEY NOT NULL,\n\t\"expires_at\" timestamp NOT NULL,\n\t\"token\" text NOT NULL,\n\t\"created_at\" timestamp NOT NULL,\n\t\"updated_at\" timestamp NOT NULL,\n\t\"ip_address\" text,\n\t\"user_agent\" text,\n\t\"user_id\" text NOT NULL,\n\t\"impersonated_by\" text,\n\t\"active_organization_id\" text,\n\tCONSTRAINT \"session_temp_token_unique\" UNIQUE(\"token\")\n);\n--> statement-breakpoint\nCREATE TABLE \"account\" (\n\t\"id\" text PRIMARY KEY NOT NULL,\n\t\"account_id\" text NOT NULL,\n\t\"provider_id\" text NOT NULL,\n\t\"user_id\" text NOT NULL,\n\t\"access_token\" text,\n\t\"refresh_token\" text,\n\t\"id_token\" text,\n\t\"access_token_expires_at\" timestamp,\n\t\"refresh_token_expires_at\" timestamp,\n\t\"scope\" text,\n\t\"password\" text,\n\t\"is2FAEnabled\" boolean DEFAULT false NOT NULL,\n\t\"created_at\" timestamp NOT NULL,\n\t\"updated_at\" timestamp NOT NULL,\n\t\"resetPasswordToken\" text,\n\t\"resetPasswordExpiresAt\" text,\n\t\"confirmationToken\" text,\n\t\"confirmationExpiresAt\" text\n);\n--> statement-breakpoint\nCREATE TABLE \"invitation\" (\n\t\"id\" text PRIMARY KEY NOT NULL,\n\t\"organization_id\" text NOT NULL,\n\t\"email\" text NOT NULL,\n\t\"role\" text,\n\t\"status\" text NOT NULL,\n\t\"expires_at\" timestamp NOT NULL,\n\t\"inviter_id\" text NOT NULL,\n\t\"team_id\" text\n);\n--> statement-breakpoint\nCREATE TABLE \"member\" (\n\t\"id\" text PRIMARY KEY NOT NULL,\n\t\"organization_id\" text NOT NULL,\n\t\"user_id\" text NOT NULL,\n\t\"role\" text NOT NULL,\n\t\"created_at\" timestamp NOT NULL,\n\t\"canCreateProjects\" boolean DEFAULT false NOT NULL,\n\t\"canAccessToSSHKeys\" boolean DEFAULT false NOT NULL,\n\t\"canCreateServices\" boolean DEFAULT false NOT NULL,\n\t\"canDeleteProjects\" boolean DEFAULT false NOT NULL,\n\t\"canDeleteServices\" boolean DEFAULT false NOT NULL,\n\t\"canAccessToDocker\" boolean DEFAULT false NOT NULL,\n\t\"canAccessToAPI\" boolean DEFAULT false NOT NULL,\n\t\"canAccessToGitProviders\" boolean DEFAULT false NOT NULL,\n\t\"canAccessToTraefikFiles\" boolean DEFAULT false NOT NULL,\n\t\"accesedProjects\" text[] DEFAULT ARRAY[]::text[] NOT NULL,\n\t\"accesedServices\" text[] DEFAULT ARRAY[]::text[] NOT NULL,\n\t\"team_id\" text\n);\n--> statement-breakpoint\nCREATE TABLE \"organization\" (\n\t\"id\" text PRIMARY KEY NOT NULL,\n\t\"name\" text NOT NULL,\n\t\"slug\" text,\n\t\"logo\" text,\n\t\"created_at\" timestamp NOT NULL,\n\t\"metadata\" text,\n\t\"owner_id\" text NOT NULL,\n\tCONSTRAINT \"organization_slug_unique\" UNIQUE(\"slug\")\n);\n--> statement-breakpoint\nCREATE TABLE \"verification\" (\n\t\"id\" text PRIMARY KEY NOT NULL,\n\t\"identifier\" text NOT NULL,\n\t\"value\" text NOT NULL,\n\t\"expires_at\" timestamp NOT NULL,\n\t\"created_at\" timestamp,\n\t\"updated_at\" timestamp\n);\n\nCREATE TABLE \"two_factor\" (\n\t\"id\" text PRIMARY KEY NOT NULL,\n\t\"secret\" text NOT NULL,\n\t\"backup_codes\" text NOT NULL,\n\t\"user_id\" text NOT NULL\n);\n\nCREATE TABLE \"apikey\" (\n\t\"id\" text PRIMARY KEY NOT NULL,\n\t\"name\" text,\n\t\"start\" text,\n\t\"prefix\" text,\n\t\"key\" text NOT NULL,\n\t\"user_id\" text NOT NULL,\n\t\"refill_interval\" integer,\n\t\"refill_amount\" integer,\n\t\"last_refill_at\" timestamp,\n\t\"enabled\" boolean,\n\t\"rate_limit_enabled\" boolean,\n\t\"rate_limit_time_window\" integer,\n\t\"rate_limit_max\" integer,\n\t\"request_count\" integer,\n\t\"remaining\" integer,\n\t\"last_request\" timestamp,\n\t\"expires_at\" timestamp,\n\t\"created_at\" timestamp NOT NULL,\n\t\"updated_at\" timestamp NOT NULL,\n\t\"permissions\" text,\n\t\"metadata\" text\n);\n--> statement-breakpoint\nDELETE FROM \"certificate\" WHERE \"adminId\" IS NULL;\nDELETE FROM \"notification\" WHERE \"adminId\" IS NULL;\nDELETE FROM \"ssh-key\" WHERE \"adminId\" IS NULL;\nDELETE FROM \"git_provider\" WHERE \"adminId\" IS NULL;\n\nALTER TABLE \"certificate\" ALTER COLUMN \"adminId\" SET NOT NULL ;--> statement-breakpoint\nALTER TABLE \"notification\" ALTER COLUMN \"adminId\" SET NOT NULL ;--> statement-breakpoint\nALTER TABLE \"ssh-key\" ALTER COLUMN \"adminId\" SET NOT NULL ;--> statement-breakpoint\nALTER TABLE \"git_provider\" ALTER COLUMN \"adminId\" SET NOT NULL ;--> statement-breakpoint\nALTER TABLE \"session_temp\" ADD CONSTRAINT \"session_temp_user_id_user_temp_id_fk\" FOREIGN KEY (\"user_id\") REFERENCES \"public\".\"user_temp\"(\"id\") ON DELETE no action ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"account\" ADD CONSTRAINT \"account_user_id_user_temp_id_fk\" FOREIGN KEY (\"user_id\") REFERENCES \"public\".\"user_temp\"(\"id\") ON DELETE no action ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"invitation\" ADD CONSTRAINT \"invitation_organization_id_organization_id_fk\" FOREIGN KEY (\"organization_id\") REFERENCES \"public\".\"organization\"(\"id\") ON DELETE no action ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"invitation\" ADD CONSTRAINT \"invitation_inviter_id_user_temp_id_fk\" FOREIGN KEY (\"inviter_id\") REFERENCES \"public\".\"user_temp\"(\"id\") ON DELETE no action ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"member\" ADD CONSTRAINT \"member_organization_id_organization_id_fk\" FOREIGN KEY (\"organization_id\") REFERENCES \"public\".\"organization\"(\"id\") ON DELETE no action ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"member\" ADD CONSTRAINT \"member_user_id_user_temp_id_fk\" FOREIGN KEY (\"user_id\") REFERENCES \"public\".\"user_temp\"(\"id\") ON DELETE no action ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"organization\" ADD CONSTRAINT \"organization_owner_id_user_temp_id_fk\" FOREIGN KEY (\"owner_id\") REFERENCES \"public\".\"user_temp\"(\"id\") ON DELETE no action ON UPDATE no action;\nALTER TABLE \"two_factor\" ADD CONSTRAINT \"two_factor_user_id_user_temp_id_fk\" FOREIGN KEY (\"user_id\") REFERENCES \"public\".\"user_temp\"(\"id\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"apikey\" ADD CONSTRAINT \"apikey_user_id_user_temp_id_fk\" FOREIGN KEY (\"user_id\") REFERENCES \"public\".\"user_temp\"(\"id\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\n\n\n-- Data Migration\n\n-- Custom SQL migration file, put your code below! --\n\nWITH inserted_users AS (\n    -- Insertar usuarios desde admins\n    INSERT INTO user_temp (\n        id,\n        email,\n        \"email_verified\",\n        \"updated_at\",\n        \"serverIp\",\n        image,\n        \"certificateType\",\n        host,\n        \"letsEncryptEmail\",\n        \"sshPrivateKey\",\n        \"enableDockerCleanup\",\n        \"enableLogRotation\",\n        \"enablePaidFeatures\",\n        \"metricsConfig\",\n        \"cleanupCacheApplications\",\n        \"cleanupCacheOnPreviews\",\n        \"cleanupCacheOnCompose\",\n        \"stripeCustomerId\",\n        \"stripeSubscriptionId\",\n        \"serversQuantity\",\n        \"expirationDate\",\n        \"createdAt\",\n        \"isRegistered\"\n    )\n    SELECT \n        a.\"adminId\",\n        auth.email,\n        true,\n        CURRENT_TIMESTAMP,\n        a.\"serverIp\",\n        auth.image,\n        a.\"certificateType\",\n        a.host,\n        a.\"letsEncryptEmail\",\n        a.\"sshPrivateKey\",\n        a.\"enableDockerCleanup\",\n        a.\"enableLogRotation\",\n        a.\"enablePaidFeatures\",\n        a.\"metricsConfig\",\n        a.\"cleanupCacheApplications\",\n        a.\"cleanupCacheOnPreviews\",\n        a.\"cleanupCacheOnCompose\",\n        a.\"stripeCustomerId\",\n        a.\"stripeSubscriptionId\",\n        a.\"serversQuantity\",\n        NOW() + INTERVAL '1 year',\n        NOW(),\n        true\n    FROM admin a\n    JOIN auth ON auth.id = a.\"authId\"\n    RETURNING *\n),\ninserted_accounts AS (\n    -- Insertar cuentas para los admins\n    INSERT INTO account (\n        id,\n        \"account_id\",\n        \"provider_id\",\n        \"user_id\",\n        password,\n        \"created_at\",\n        \"updated_at\"\n    )\n    SELECT \n        gen_random_uuid(),\n        gen_random_uuid(),\n        'credential',\n        a.\"adminId\",\n        auth.password,\n        NOW(),\n        NOW()\n    FROM admin a\n    JOIN auth ON auth.id = a.\"authId\"\n    RETURNING *\n),\ninserted_orgs AS (\n    -- Crear organizaciones para cada admin\n    INSERT INTO organization (\n        id,\n        name,\n        slug,\n        \"owner_id\",\n        \"created_at\"\n    )\n    SELECT \n        gen_random_uuid(),\n        'My Organization',\n        -- Generamos un slug único usando una función de hash\n        encode(sha256((a.\"adminId\" || CURRENT_TIMESTAMP)::bytea), 'hex'),\n        a.\"adminId\",\n        NOW()\n    FROM admin a\n    RETURNING *\n),\ninserted_members AS (\n    -- Insertar usuarios miembros\n    INSERT INTO user_temp (\n        id,\n        email,\n        \"email_verified\",\n        \"updated_at\",\n        image,\n        \"createdAt\",\n        \"expirationDate\",\n        \"isRegistered\"\n    )\n    SELECT \n        u.\"userId\",\n        auth.email,\n        true,\n        CURRENT_TIMESTAMP,\n        auth.image,\n        NOW(),\n        NOW() + INTERVAL '1 year',\n        COALESCE(u.\"isRegistered\", false)\n    FROM \"user\" u\n    JOIN admin a ON u.\"adminId\" = a.\"adminId\"\n    JOIN auth ON auth.id = u.\"authId\"\n    RETURNING *\n),\ninserted_member_accounts AS (\n    -- Insertar cuentas para los usuarios miembros\n    INSERT INTO account (\n        id,\n        \"account_id\",\n        \"provider_id\",\n        \"user_id\",\n        password,\n        \"created_at\",\n        \"updated_at\"\n    )\n    SELECT \n        gen_random_uuid(),\n        gen_random_uuid(),\n        'credential',\n        u.\"userId\",\n        auth.password,\n        NOW(),\n        NOW()\n    FROM \"user\" u\n    JOIN admin a ON u.\"adminId\" = a.\"adminId\"\n    JOIN auth ON auth.id = u.\"authId\"\n    RETURNING *\n),\ninserted_admin_members AS (\n    -- Insertar miembros en las organizaciones (admins como owners)\n    INSERT INTO member (\n        id,\n        \"organization_id\",\n        \"user_id\",\n        role,\n        \"created_at\",\n        \"canAccessToAPI\",\n        \"canAccessToDocker\",\n        \"canAccessToGitProviders\",\n        \"canAccessToSSHKeys\",\n        \"canAccessToTraefikFiles\",\n        \"canCreateProjects\",\n        \"canCreateServices\",\n        \"canDeleteProjects\",\n        \"canDeleteServices\",\n        \"accesedProjects\",\n        \"accesedServices\"\n    )\n    SELECT \n        gen_random_uuid(),\n        o.id,\n        a.\"adminId\",\n        'owner',\n        NOW(),\n        true, -- Los admins tienen todos los permisos por defecto\n        true,\n        true,\n        true,\n        true,\n        true,\n        true,\n        true,\n        true,\n        '{}',\n        '{}'\n    FROM admin a\n    JOIN inserted_orgs o ON o.\"owner_id\" = a.\"adminId\"\n    JOIN auth ON auth.id = a.\"authId\"\n    RETURNING *\n)\n-- Insertar miembros regulares en las organizaciones\nINSERT INTO member (\n    id,\n    \"organization_id\",\n    \"user_id\",\n    role,\n    \"created_at\",\n    \"canAccessToAPI\",\n    \"canAccessToDocker\",\n    \"canAccessToGitProviders\",\n    \"canAccessToSSHKeys\",\n    \"canAccessToTraefikFiles\",\n    \"canCreateProjects\",\n    \"canCreateServices\",\n    \"canDeleteProjects\",\n    \"canDeleteServices\",\n    \"accesedProjects\",\n    \"accesedServices\"\n)\nSELECT \n    gen_random_uuid(),\n    o.id,\n    u.\"userId\",\n    'member',\n    NOW(),\n    COALESCE(u.\"canAccessToAPI\", false),\n    COALESCE(u.\"canAccessToDocker\", false),\n    COALESCE(u.\"canAccessToGitProviders\", false),\n    COALESCE(u.\"canAccessToSSHKeys\", false),\n    COALESCE(u.\"canAccessToTraefikFiles\", false),\n    COALESCE(u.\"canCreateProjects\", false),\n    COALESCE(u.\"canCreateServices\", false),\n    COALESCE(u.\"canDeleteProjects\", false),\n    COALESCE(u.\"canDeleteServices\", false),\n    COALESCE(u.\"accesedProjects\", '{}'),\n    COALESCE(u.\"accesedServices\", '{}')\nFROM \"user\" u\nJOIN admin a ON u.\"adminId\" = a.\"adminId\"\nJOIN inserted_orgs o ON o.\"owner_id\" = a.\"adminId\"\nJOIN auth ON auth.id = u.\"authId\";\n\n-- Migrar tokens de auth a apikey\nINSERT INTO apikey (\n    id,\n    name,\n    key,\n    user_id,\n    enabled,\n    created_at,\n    updated_at\n)\nSELECT \n    gen_random_uuid(),\n    'Legacy Token',\n    auth.token,\nuser_temp.id,\n    true,\n    NOW(),\n    NOW()\nFROM auth\nJOIN admin ON auth.id = admin.\"authId\"\nJOIN user_temp ON user_temp.id = admin.\"adminId\"\nWHERE auth.token IS NOT NULL AND auth.token != '';\n\n-- Migration tables foreign keys \n\nALTER TABLE \"project\" RENAME COLUMN \"adminId\" TO \"userId\";--> statement-breakpoint\nALTER TABLE \"destination\" RENAME COLUMN \"adminId\" TO \"userId\";--> statement-breakpoint\nALTER TABLE \"certificate\" RENAME COLUMN \"adminId\" TO \"userId\";--> statement-breakpoint\nALTER TABLE \"registry\" RENAME COLUMN \"adminId\" TO \"userId\";--> statement-breakpoint\nALTER TABLE \"notification\" RENAME COLUMN \"adminId\" TO \"userId\";--> statement-breakpoint\nALTER TABLE \"ssh-key\" RENAME COLUMN \"adminId\" TO \"userId\";--> statement-breakpoint\nALTER TABLE \"git_provider\" RENAME COLUMN \"adminId\" TO \"userId\";--> statement-breakpoint\nALTER TABLE \"server\" RENAME COLUMN \"adminId\" TO \"userId\";--> statement-breakpoint\nALTER TABLE \"project\" DROP CONSTRAINT \"project_adminId_admin_adminId_fk\";\n--> statement-breakpoint\nALTER TABLE \"destination\" DROP CONSTRAINT \"destination_adminId_admin_adminId_fk\";\n--> statement-breakpoint\nALTER TABLE \"certificate\" DROP CONSTRAINT \"certificate_adminId_admin_adminId_fk\";\n--> statement-breakpoint\nALTER TABLE \"registry\" DROP CONSTRAINT \"registry_adminId_admin_adminId_fk\";\n--> statement-breakpoint\nALTER TABLE \"notification\" DROP CONSTRAINT \"notification_adminId_admin_adminId_fk\";\n--> statement-breakpoint\nALTER TABLE \"ssh-key\" DROP CONSTRAINT \"ssh-key_adminId_admin_adminId_fk\";\n--> statement-breakpoint\nALTER TABLE \"git_provider\" DROP CONSTRAINT \"git_provider_adminId_admin_adminId_fk\";\n--> statement-breakpoint\nALTER TABLE \"server\" DROP CONSTRAINT \"server_adminId_admin_adminId_fk\";\n--> statement-breakpoint\nALTER TABLE \"project\" ADD CONSTRAINT \"project_userId_user_temp_id_fk\" FOREIGN KEY (\"userId\") REFERENCES \"public\".\"user_temp\"(\"id\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"destination\" ADD CONSTRAINT \"destination_userId_user_temp_id_fk\" FOREIGN KEY (\"userId\") REFERENCES \"public\".\"user_temp\"(\"id\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"certificate\" ADD CONSTRAINT \"certificate_userId_user_temp_id_fk\" FOREIGN KEY (\"userId\") REFERENCES \"public\".\"user_temp\"(\"id\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"registry\" ADD CONSTRAINT \"registry_userId_user_temp_id_fk\" FOREIGN KEY (\"userId\") REFERENCES \"public\".\"user_temp\"(\"id\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"notification\" ADD CONSTRAINT \"notification_userId_user_temp_id_fk\" FOREIGN KEY (\"userId\") REFERENCES \"public\".\"user_temp\"(\"id\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"ssh-key\" ADD CONSTRAINT \"ssh-key_userId_user_temp_id_fk\" FOREIGN KEY (\"userId\") REFERENCES \"public\".\"user_temp\"(\"id\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"git_provider\" ADD CONSTRAINT \"git_provider_userId_user_temp_id_fk\" FOREIGN KEY (\"userId\") REFERENCES \"public\".\"user_temp\"(\"id\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"server\" ADD CONSTRAINT \"server_userId_user_temp_id_fk\" FOREIGN KEY (\"userId\") REFERENCES \"public\".\"user_temp\"(\"id\") ON DELETE cascade ON UPDATE no action;\n\n\nALTER TABLE \"user_temp\" ADD COLUMN \"created_at\" timestamp DEFAULT now();\n\n\n-- Add properties\n\nALTER TABLE \"project\" ADD COLUMN \"organizationId\" text;--> statement-breakpoint\nALTER TABLE \"destination\" ADD COLUMN \"organizationId\" text;--> statement-breakpoint\nALTER TABLE \"certificate\" ADD COLUMN \"organizationId\" text;--> statement-breakpoint\nALTER TABLE \"registry\" ADD COLUMN \"organizationId\" text;--> statement-breakpoint\nALTER TABLE \"notification\" ADD COLUMN \"organizationId\" text;--> statement-breakpoint\nALTER TABLE \"ssh-key\" ADD COLUMN \"organizationId\" text;--> statement-breakpoint\nALTER TABLE \"git_provider\" ADD COLUMN \"organizationId\" text;--> statement-breakpoint\nALTER TABLE \"server\" ADD COLUMN \"organizationId\" text;--> statement-breakpoint\nALTER TABLE \"project\" ADD CONSTRAINT \"project_organizationId_organization_id_fk\" FOREIGN KEY (\"organizationId\") REFERENCES \"public\".\"organization\"(\"id\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"destination\" ADD CONSTRAINT \"destination_organizationId_organization_id_fk\" FOREIGN KEY (\"organizationId\") REFERENCES \"public\".\"organization\"(\"id\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"certificate\" ADD CONSTRAINT \"certificate_organizationId_organization_id_fk\" FOREIGN KEY (\"organizationId\") REFERENCES \"public\".\"organization\"(\"id\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"registry\" ADD CONSTRAINT \"registry_organizationId_organization_id_fk\" FOREIGN KEY (\"organizationId\") REFERENCES \"public\".\"organization\"(\"id\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"notification\" ADD CONSTRAINT \"notification_organizationId_organization_id_fk\" FOREIGN KEY (\"organizationId\") REFERENCES \"public\".\"organization\"(\"id\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"ssh-key\" ADD CONSTRAINT \"ssh-key_organizationId_organization_id_fk\" FOREIGN KEY (\"organizationId\") REFERENCES \"public\".\"organization\"(\"id\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"git_provider\" ADD CONSTRAINT \"git_provider_organizationId_organization_id_fk\" FOREIGN KEY (\"organizationId\") REFERENCES \"public\".\"organization\"(\"id\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"server\" ADD CONSTRAINT \"server_organizationId_organization_id_fk\" FOREIGN KEY (\"organizationId\") REFERENCES \"public\".\"organization\"(\"id\") ON DELETE cascade ON UPDATE no action;\n\n\n-- Update tables to use organizationId\n\n-- Custom SQL migration file\n\n-- Actualizar projects\nUPDATE \"project\" p\nSET \"organizationId\" = (\n    SELECT m.\"organization_id\"\n    FROM \"member\" m\n    WHERE m.\"user_id\" = p.\"userId\"\n    AND m.\"role\" = 'owner'\n    LIMIT 1\n)\nWHERE p.\"organizationId\" IS NULL;\n\n-- Actualizar servers\nUPDATE \"server\" s\nSET \"organizationId\" = (\n    SELECT m.\"organization_id\"\n    FROM \"member\" m\n    WHERE m.\"user_id\" = s.\"userId\"\n    AND m.\"role\" = 'owner'\n    LIMIT 1\n)\nWHERE s.\"organizationId\" IS NULL;\n\n-- Actualizar ssh-keys\nUPDATE \"ssh-key\" k\nSET \"organizationId\" = (\n    SELECT m.\"organization_id\"\n    FROM \"member\" m\n    WHERE m.\"user_id\" = k.\"userId\"\n    AND m.\"role\" = 'owner'\n    LIMIT 1\n)\nWHERE k.\"organizationId\" IS NULL;\n\n-- Actualizar destinations\nUPDATE \"destination\" d\nSET \"organizationId\" = (\n    SELECT m.\"organization_id\"\n    FROM \"member\" m\n    WHERE m.\"user_id\" = d.\"userId\"\n    AND m.\"role\" = 'owner'\n    LIMIT 1\n)\nWHERE d.\"organizationId\" IS NULL;\n\n-- Actualizar registry\nUPDATE \"registry\" r\nSET \"organizationId\" = (\n    SELECT m.\"organization_id\"\n    FROM \"member\" m\n    WHERE m.\"user_id\" = r.\"userId\"\n    AND m.\"role\" = 'owner'\n    LIMIT 1\n)\nWHERE r.\"organizationId\" IS NULL;\n\n-- Actualizar notifications\nUPDATE \"notification\" n\nSET \"organizationId\" = (\n    SELECT m.\"organization_id\"\n    FROM \"member\" m\n    WHERE m.\"user_id\" = n.\"userId\"\n    AND m.\"role\" = 'owner'\n    LIMIT 1\n)\nWHERE n.\"organizationId\" IS NULL;\n\n-- Actualizar certificates\nUPDATE \"certificate\" c\nSET \"organizationId\" = (\n    SELECT m.\"organization_id\"\n    FROM \"member\" m\n    WHERE m.\"user_id\" = c.\"userId\"\n    AND m.\"role\" = 'owner'\n    LIMIT 1\n)\nWHERE c.\"organizationId\" IS NULL;\n\n-- Actualizar git_provider\nUPDATE \"git_provider\" g\nSET \"organizationId\" = (\n    SELECT m.\"organization_id\"\n    FROM \"member\" m\n    WHERE m.\"user_id\" = g.\"userId\"\n    AND m.\"role\" = 'owner'\n    LIMIT 1\n)\nWHERE g.\"organizationId\" IS NULL;\n\n-- Verificar que todos los recursos tengan una organización\nDO $$\nBEGIN\n    IF EXISTS (\n        SELECT 1 FROM \"project\" WHERE \"organizationId\" IS NULL\n        UNION ALL\n        SELECT 1 FROM \"server\" WHERE \"organizationId\" IS NULL\n        UNION ALL\n        SELECT 1 FROM \"ssh-key\" WHERE \"organizationId\" IS NULL\n        UNION ALL\n        SELECT 1 FROM \"destination\" WHERE \"organizationId\" IS NULL\n        UNION ALL\n        SELECT 1 FROM \"registry\" WHERE \"organizationId\" IS NULL\n        UNION ALL\n        SELECT 1 FROM \"notification\" WHERE \"organizationId\" IS NULL\n        UNION ALL\n        SELECT 1 FROM \"certificate\" WHERE \"organizationId\" IS NULL\n        UNION ALL\n        SELECT 1 FROM \"git_provider\" WHERE \"organizationId\" IS NULL\n    ) THEN\n        RAISE EXCEPTION 'Hay recursos sin organización asignada';\n    END IF;\nEND $$;\n\n-- Hacer organization_id NOT NULL en todas las tablas\nALTER TABLE \"project\" ALTER COLUMN \"organizationId\" SET NOT NULL;\nALTER TABLE \"server\" ALTER COLUMN \"organizationId\" SET NOT NULL;\nALTER TABLE \"ssh-key\" ALTER COLUMN \"organizationId\" SET NOT NULL;\nALTER TABLE \"destination\" ALTER COLUMN \"organizationId\" SET NOT NULL;\nALTER TABLE \"registry\" ALTER COLUMN \"organizationId\" SET NOT NULL;\nALTER TABLE \"notification\" ALTER COLUMN \"organizationId\" SET NOT NULL;\nALTER TABLE \"certificate\" ALTER COLUMN \"organizationId\" SET NOT NULL;\nALTER TABLE \"git_provider\" ALTER COLUMN \"organizationId\" SET NOT NULL;\n\n-- Crear índices para mejorar el rendimiento de búsquedas por organización\nCREATE INDEX IF NOT EXISTS \"idx_project_organization\" ON \"project\" (\"organizationId\");\nCREATE INDEX IF NOT EXISTS \"idx_server_organization\" ON \"server\" (\"organizationId\");\nCREATE INDEX IF NOT EXISTS \"idx_sshkey_organization\" ON \"ssh-key\" (\"organizationId\");\nCREATE INDEX IF NOT EXISTS \"idx_destination_organization\" ON \"destination\" (\"organizationId\");\nCREATE INDEX IF NOT EXISTS \"idx_registry_organization\" ON \"registry\" (\"organizationId\");\nCREATE INDEX IF NOT EXISTS \"idx_notification_organization\" ON \"notification\" (\"organizationId\");\nCREATE INDEX IF NOT EXISTS \"idx_certificate_organization\" ON \"certificate\" (\"organizationId\");\nCREATE INDEX IF NOT EXISTS \"idx_git_provider_organization\" ON \"git_provider\" (\"organizationId\");\n\n\n\n\n\n-- Botar tablas de migración\nALTER TABLE \"project\" DROP CONSTRAINT \"project_userId_user_temp_id_fk\";\n--> statement-breakpoint\nALTER TABLE \"destination\" DROP CONSTRAINT \"destination_userId_user_temp_id_fk\";\n--> statement-breakpoint\nALTER TABLE \"certificate\" DROP CONSTRAINT \"certificate_userId_user_temp_id_fk\";\n--> statement-breakpoint\nALTER TABLE \"registry\" DROP CONSTRAINT \"registry_userId_user_temp_id_fk\";\n--> statement-breakpoint\nALTER TABLE \"notification\" DROP CONSTRAINT \"notification_userId_user_temp_id_fk\";\n--> statement-breakpoint\nALTER TABLE \"ssh-key\" DROP CONSTRAINT \"ssh-key_userId_user_temp_id_fk\";\n--> statement-breakpoint\nALTER TABLE \"git_provider\" DROP CONSTRAINT \"git_provider_userId_user_temp_id_fk\";\n--> statement-breakpoint\nALTER TABLE \"server\" DROP CONSTRAINT \"server_userId_user_temp_id_fk\";\n--> statement-breakpoint\nALTER TABLE \"project\" ALTER COLUMN \"organizationId\" SET NOT NULL;--> statement-breakpoint\nALTER TABLE \"destination\" ALTER COLUMN \"organizationId\" SET NOT NULL;--> statement-breakpoint\nALTER TABLE \"certificate\" ALTER COLUMN \"organizationId\" SET NOT NULL;--> statement-breakpoint\nALTER TABLE \"registry\" ALTER COLUMN \"organizationId\" SET NOT NULL;--> statement-breakpoint\nALTER TABLE \"notification\" ALTER COLUMN \"organizationId\" SET NOT NULL;--> statement-breakpoint\nALTER TABLE \"ssh-key\" ALTER COLUMN \"organizationId\" SET NOT NULL;--> statement-breakpoint\nALTER TABLE \"git_provider\" ALTER COLUMN \"organizationId\" SET NOT NULL;--> statement-breakpoint\nALTER TABLE \"server\" ALTER COLUMN \"organizationId\" SET NOT NULL;--> statement-breakpoint\nALTER TABLE \"project\" DROP COLUMN \"userId\";--> statement-breakpoint\nALTER TABLE \"destination\" DROP COLUMN \"userId\";--> statement-breakpoint\nALTER TABLE \"certificate\" DROP COLUMN \"userId\";--> statement-breakpoint\nALTER TABLE \"registry\" DROP COLUMN \"userId\";--> statement-breakpoint\nALTER TABLE \"notification\" DROP COLUMN \"userId\";--> statement-breakpoint\nALTER TABLE \"ssh-key\" DROP COLUMN \"userId\";--> statement-breakpoint\nALTER TABLE \"git_provider\" DROP COLUMN \"userId\";--> statement-breakpoint\nALTER TABLE \"server\" DROP COLUMN \"userId\";\n\n-- Drop tables\nDROP TABLE \"user\" CASCADE;--> statement-breakpoint\nDROP TABLE \"admin\" CASCADE;--> statement-breakpoint\nDROP TABLE \"auth\" CASCADE;--> statement-breakpoint\nDROP TABLE \"session\" CASCADE;--> statement-breakpoint\nDROP TYPE \"public\".\"Roles\";\n\n\n-- Drop tables\nALTER TABLE \"account\" DROP CONSTRAINT \"account_user_id_user_temp_id_fk\";\n--> statement-breakpoint\nALTER TABLE \"invitation\" DROP CONSTRAINT \"invitation_organization_id_organization_id_fk\";\n--> statement-breakpoint\nALTER TABLE \"invitation\" DROP CONSTRAINT \"invitation_inviter_id_user_temp_id_fk\";\n--> statement-breakpoint\nALTER TABLE \"member\" DROP CONSTRAINT \"member_organization_id_organization_id_fk\";\n--> statement-breakpoint\nALTER TABLE \"member\" DROP CONSTRAINT \"member_user_id_user_temp_id_fk\";\n--> statement-breakpoint\nALTER TABLE \"organization\" DROP CONSTRAINT \"organization_owner_id_user_temp_id_fk\";\n--> statement-breakpoint\nALTER TABLE \"account\" ADD CONSTRAINT \"account_user_id_user_temp_id_fk\" FOREIGN KEY (\"user_id\") REFERENCES \"public\".\"user_temp\"(\"id\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"invitation\" ADD CONSTRAINT \"invitation_organization_id_organization_id_fk\" FOREIGN KEY (\"organization_id\") REFERENCES \"public\".\"organization\"(\"id\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"invitation\" ADD CONSTRAINT \"invitation_inviter_id_user_temp_id_fk\" FOREIGN KEY (\"inviter_id\") REFERENCES \"public\".\"user_temp\"(\"id\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"member\" ADD CONSTRAINT \"member_organization_id_organization_id_fk\" FOREIGN KEY (\"organization_id\") REFERENCES \"public\".\"organization\"(\"id\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"member\" ADD CONSTRAINT \"member_user_id_user_temp_id_fk\" FOREIGN KEY (\"user_id\") REFERENCES \"public\".\"user_temp\"(\"id\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"organization\" ADD CONSTRAINT \"organization_owner_id_user_temp_id_fk\" FOREIGN KEY (\"owner_id\") REFERENCES \"public\".\"user_temp\"(\"id\") ON DELETE cascade ON UPDATE no action;\n\n\n-- Update references\n\nALTER TABLE \"session_temp\" DROP CONSTRAINT \"session_temp_user_id_user_temp_id_fk\";\n--> statement-breakpoint\nALTER TABLE \"session_temp\" ADD CONSTRAINT \"session_temp_user_id_user_temp_id_fk\" FOREIGN KEY (\"user_id\") REFERENCES \"public\".\"user_temp\"(\"id\") ON DELETE cascade ON UPDATE no action;"
  },
  {
    "path": "apps/dokploy/drizzle/0067_condemned_sugar_man.sql",
    "content": "ALTER TABLE \"telegram\" ADD COLUMN \"messageThreadId\" text;"
  },
  {
    "path": "apps/dokploy/drizzle/0068_complex_rhino.sql",
    "content": "CREATE TABLE \"ai\" (\n\t\"aiId\" text PRIMARY KEY NOT NULL,\n\t\"name\" text NOT NULL,\n\t\"apiUrl\" text NOT NULL,\n\t\"apiKey\" text NOT NULL,\n\t\"model\" text NOT NULL,\n\t\"isEnabled\" boolean DEFAULT true NOT NULL,\n\t\"organizationId\" text NOT NULL,\n\t\"createdAt\" text NOT NULL\n);\n--> statement-breakpoint\nALTER TABLE \"ai\" ADD CONSTRAINT \"ai_organizationId_organization_id_fk\" FOREIGN KEY (\"organizationId\") REFERENCES \"public\".\"organization\"(\"id\") ON DELETE cascade ON UPDATE no action;"
  },
  {
    "path": "apps/dokploy/drizzle/0069_legal_bill_hollister.sql",
    "content": "ALTER TYPE \"public\".\"buildType\" ADD VALUE 'railpack';"
  },
  {
    "path": "apps/dokploy/drizzle/0070_useful_serpent_society.sql",
    "content": "ALTER TABLE \"destination\" ADD COLUMN \"createdAt\" timestamp DEFAULT now() NOT NULL;"
  },
  {
    "path": "apps/dokploy/drizzle/0071_flaky_black_queen.sql",
    "content": "ALTER TABLE \"user_temp\" ADD COLUMN \"logCleanupCron\" text;"
  },
  {
    "path": "apps/dokploy/drizzle/0072_green_susan_delgado.sql",
    "content": "ALTER TYPE \"public\".\"certificateType\" ADD VALUE 'custom';--> statement-breakpoint\nALTER TABLE \"domain\" ADD COLUMN \"customCertResolver\" text;--> statement-breakpoint"
  },
  {
    "path": "apps/dokploy/drizzle/0073_hot_domino.sql",
    "content": "ALTER TABLE \"application\" ADD COLUMN \"previewCertificateProvider\" text;"
  },
  {
    "path": "apps/dokploy/drizzle/0074_black_quasar.sql",
    "content": "ALTER TABLE \"application\" RENAME COLUMN \"previewCertificateProvider\" TO \"previewCustomCertResolver\";"
  },
  {
    "path": "apps/dokploy/drizzle/0075_young_typhoid_mary.sql",
    "content": "ALTER TABLE \"application\" ADD COLUMN \"watchPaths\" text[];"
  },
  {
    "path": "apps/dokploy/drizzle/0076_young_sharon_ventura.sql",
    "content": "ALTER TABLE \"compose\" ADD COLUMN \"watchPaths\" text[];"
  },
  {
    "path": "apps/dokploy/drizzle/0077_chemical_dreadnoughts.sql",
    "content": "ALTER TABLE \"backup\" ADD COLUMN \"keepLatestCount\" integer;"
  },
  {
    "path": "apps/dokploy/drizzle/0078_uneven_omega_sentinel.sql",
    "content": "ALTER TABLE \"application\" ADD COLUMN \"cleanCache\" boolean DEFAULT false;"
  },
  {
    "path": "apps/dokploy/drizzle/0079_bizarre_wendell_rand.sql",
    "content": "ALTER TYPE \"public\".\"sourceType\" ADD VALUE 'gitea' BEFORE 'drop';--> statement-breakpoint\nALTER TYPE \"public\".\"sourceTypeCompose\" ADD VALUE 'gitea' BEFORE 'raw';--> statement-breakpoint\nALTER TYPE \"public\".\"gitProviderType\" ADD VALUE 'gitea';--> statement-breakpoint\nCREATE TABLE \"gitea\" (\n\t\"giteaId\" text PRIMARY KEY NOT NULL,\n\t\"giteaUrl\" text DEFAULT 'https://gitea.com' NOT NULL,\n\t\"redirect_uri\" text,\n\t\"client_id\" text,\n\t\"client_secret\" text,\n\t\"gitProviderId\" text NOT NULL,\n\t\"gitea_username\" text,\n\t\"access_token\" text,\n\t\"refresh_token\" text,\n\t\"expires_at\" integer,\n\t\"scopes\" text DEFAULT 'repo,repo:status,read:user,read:org',\n\t\"last_authenticated_at\" integer\n);\n--> statement-breakpoint\nALTER TABLE \"application\" ADD COLUMN \"giteaProjectId\" integer;--> statement-breakpoint\nALTER TABLE \"application\" ADD COLUMN \"giteaRepository\" text;--> statement-breakpoint\nALTER TABLE \"application\" ADD COLUMN \"giteaOwner\" text;--> statement-breakpoint\nALTER TABLE \"application\" ADD COLUMN \"giteaBranch\" text;--> statement-breakpoint\nALTER TABLE \"application\" ADD COLUMN \"giteaBuildPath\" text DEFAULT '/';--> statement-breakpoint\nALTER TABLE \"application\" ADD COLUMN \"giteaId\" text;--> statement-breakpoint\nALTER TABLE \"compose\" ADD COLUMN \"giteaRepository\" text;--> statement-breakpoint\nALTER TABLE \"compose\" ADD COLUMN \"giteaOwner\" text;--> statement-breakpoint\nALTER TABLE \"compose\" ADD COLUMN \"giteaBranch\" text;--> statement-breakpoint\nALTER TABLE \"compose\" ADD COLUMN \"giteaId\" text;--> statement-breakpoint\nALTER TABLE \"gitea\" ADD CONSTRAINT \"gitea_gitProviderId_git_provider_gitProviderId_fk\" FOREIGN KEY (\"gitProviderId\") REFERENCES \"public\".\"git_provider\"(\"gitProviderId\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"application\" ADD CONSTRAINT \"application_giteaId_gitea_giteaId_fk\" FOREIGN KEY (\"giteaId\") REFERENCES \"public\".\"gitea\"(\"giteaId\") ON DELETE set null ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"compose\" ADD CONSTRAINT \"compose_giteaId_gitea_giteaId_fk\" FOREIGN KEY (\"giteaId\") REFERENCES \"public\".\"gitea\"(\"giteaId\") ON DELETE set null ON UPDATE no action;"
  },
  {
    "path": "apps/dokploy/drizzle/0080_sleepy_sinister_six.sql",
    "content": "ALTER TABLE \"application\" DROP COLUMN \"giteaProjectId\";"
  },
  {
    "path": "apps/dokploy/drizzle/0081_lovely_mentallo.sql",
    "content": "ALTER TABLE \"gitea\" DROP COLUMN \"gitea_username\";"
  },
  {
    "path": "apps/dokploy/drizzle/0082_clean_mandarin.sql",
    "content": "ALTER TABLE \"backup\" ADD COLUMN \"userId\" text;--> statement-breakpoint\nALTER TABLE \"backup\" ADD CONSTRAINT \"backup_userId_user_temp_id_fk\" FOREIGN KEY (\"userId\") REFERENCES \"public\".\"user_temp\"(\"id\") ON DELETE no action ON UPDATE no action;"
  },
  {
    "path": "apps/dokploy/drizzle/0083_parallel_stranger.sql",
    "content": "ALTER TYPE \"public\".\"databaseType\" ADD VALUE 'web-server';"
  },
  {
    "path": "apps/dokploy/drizzle/0084_thin_iron_lad.sql",
    "content": "ALTER TABLE \"user_temp\" ADD COLUMN \"https\" boolean DEFAULT false NOT NULL;"
  },
  {
    "path": "apps/dokploy/drizzle/0085_equal_captain_stacy.sql",
    "content": "ALTER TABLE \"application\" ADD COLUMN \"enableSubmodules\" boolean DEFAULT false;--> statement-breakpoint\nALTER TABLE \"compose\" ADD COLUMN \"enableSubmodules\" boolean DEFAULT false;"
  },
  {
    "path": "apps/dokploy/drizzle/0086_rainy_gertrude_yorkes.sql",
    "content": "ALTER TABLE \"application\" ALTER COLUMN \"enableSubmodules\" SET NOT NULL;--> statement-breakpoint\nALTER TABLE \"compose\" ALTER COLUMN \"enableSubmodules\" SET NOT NULL;"
  },
  {
    "path": "apps/dokploy/drizzle/0087_lively_risque.sql",
    "content": "CREATE TYPE \"public\".\"triggerType\" AS ENUM('push', 'tag');--> statement-breakpoint\nALTER TABLE \"application\" ADD COLUMN \"triggerType\" \"triggerType\" DEFAULT 'push';--> statement-breakpoint\nALTER TABLE \"compose\" ADD COLUMN \"triggerType\" \"triggerType\" DEFAULT 'push';"
  },
  {
    "path": "apps/dokploy/drizzle/0088_illegal_ma_gnuci.sql",
    "content": "CREATE TYPE \"public\".\"scheduleType\" AS ENUM('application', 'compose', 'server', 'dokploy-server');--> statement-breakpoint\nCREATE TYPE \"public\".\"shellType\" AS ENUM('bash', 'sh');--> statement-breakpoint\nCREATE TABLE \"schedule\" (\n\t\"scheduleId\" text PRIMARY KEY NOT NULL,\n\t\"name\" text NOT NULL,\n\t\"cronExpression\" text NOT NULL,\n\t\"appName\" text NOT NULL,\n\t\"serviceName\" text,\n\t\"shellType\" \"shellType\" DEFAULT 'bash' NOT NULL,\n\t\"scheduleType\" \"scheduleType\" DEFAULT 'application' NOT NULL,\n\t\"command\" text NOT NULL,\n\t\"script\" text,\n\t\"applicationId\" text,\n\t\"composeId\" text,\n\t\"serverId\" text,\n\t\"userId\" text,\n\t\"enabled\" boolean DEFAULT true NOT NULL,\n\t\"createdAt\" text NOT NULL\n);\n--> statement-breakpoint\nALTER TABLE \"deployment\" ADD COLUMN \"startedAt\" text;--> statement-breakpoint\nALTER TABLE \"deployment\" ADD COLUMN \"finishedAt\" text;--> statement-breakpoint\nALTER TABLE \"deployment\" ADD COLUMN \"scheduleId\" text;--> statement-breakpoint\nALTER TABLE \"schedule\" ADD CONSTRAINT \"schedule_applicationId_application_applicationId_fk\" FOREIGN KEY (\"applicationId\") REFERENCES \"public\".\"application\"(\"applicationId\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"schedule\" ADD CONSTRAINT \"schedule_composeId_compose_composeId_fk\" FOREIGN KEY (\"composeId\") REFERENCES \"public\".\"compose\"(\"composeId\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"schedule\" ADD CONSTRAINT \"schedule_serverId_server_serverId_fk\" FOREIGN KEY (\"serverId\") REFERENCES \"public\".\"server\"(\"serverId\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"schedule\" ADD CONSTRAINT \"schedule_userId_user_temp_id_fk\" FOREIGN KEY (\"userId\") REFERENCES \"public\".\"user_temp\"(\"id\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"deployment\" ADD CONSTRAINT \"deployment_scheduleId_schedule_scheduleId_fk\" FOREIGN KEY (\"scheduleId\") REFERENCES \"public\".\"schedule\"(\"scheduleId\") ON DELETE cascade ON UPDATE no action;"
  },
  {
    "path": "apps/dokploy/drizzle/0089_noisy_sandman.sql",
    "content": "CREATE TYPE \"public\".\"backupType\" AS ENUM('database', 'compose');--> statement-breakpoint\nALTER TABLE \"backup\" ADD COLUMN \"appName\" text;\n\nUPDATE \"backup\" \nSET \"appName\" = 'backup-' || \n    (\n        ARRAY['optimize', 'parse', 'quantify', 'bypass', 'override', 'generate',\n            'secure', 'hack', 'backup', 'connect', 'index', 'compress']::text[]\n    )[floor(random() * 12) + 1] || '-' ||\n    (\n        ARRAY['digital', 'virtual', 'mobile', 'neural', 'optical', 'auxiliary',\n            'primary', 'backup', 'wireless', 'haptic', 'solid-state']::text[]\n    )[floor(random() * 11) + 1] || '-' ||\n    (\n        ARRAY['driver', 'protocol', 'array', 'matrix', 'system', 'bandwidth',\n            'monitor', 'firewall', 'card', 'sensor', 'bus']::text[]\n    )[floor(random() * 11) + 1] || '-' ||\n    substr(md5(random()::text), 1, 6);\n\n    \nALTER TABLE \"backup\" ALTER COLUMN \"appName\" SET NOT NULL;\nALTER TABLE \"backup\" ADD COLUMN \"serviceName\" text;--> statement-breakpoint\nALTER TABLE \"backup\" ADD COLUMN \"backupType\" \"backupType\" DEFAULT 'database' NOT NULL;--> statement-breakpoint\nALTER TABLE \"backup\" ADD COLUMN \"composeId\" text;--> statement-breakpoint\nALTER TABLE \"backup\" ADD COLUMN \"metadata\" jsonb;--> statement-breakpoint\nALTER TABLE \"deployment\" ADD COLUMN \"backupId\" text;--> statement-breakpoint\nALTER TABLE \"backup\" ADD CONSTRAINT \"backup_composeId_compose_composeId_fk\" FOREIGN KEY (\"composeId\") REFERENCES \"public\".\"compose\"(\"composeId\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"deployment\" ADD CONSTRAINT \"deployment_backupId_backup_backupId_fk\" FOREIGN KEY (\"backupId\") REFERENCES \"public\".\"backup\"(\"backupId\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"backup\" ADD CONSTRAINT \"backup_appName_unique\" UNIQUE(\"appName\");"
  },
  {
    "path": "apps/dokploy/drizzle/0090_clean_wolf_cub.sql",
    "content": "ALTER TABLE \"user_temp\" ADD COLUMN \"allowImpersonation\" boolean DEFAULT false NOT NULL;"
  },
  {
    "path": "apps/dokploy/drizzle/0091_spotty_kulan_gath.sql",
    "content": "ALTER TABLE \"user_temp\" ADD COLUMN \"role\" text DEFAULT 'user' NOT NULL;"
  },
  {
    "path": "apps/dokploy/drizzle/0092_stiff_the_watchers.sql",
    "content": "ALTER TABLE \"application\" ADD COLUMN \"isStaticSpa\" boolean;"
  },
  {
    "path": "apps/dokploy/drizzle/0093_nice_gorilla_man.sql",
    "content": "ALTER TABLE \"user_temp\" ALTER COLUMN \"logCleanupCron\" SET DEFAULT '0 0 * * *';\n\nUPDATE \"user_temp\" SET \"logCleanupCron\" = '0 0 * * *' WHERE \"logCleanupCron\" IS NULL;"
  },
  {
    "path": "apps/dokploy/drizzle/0094_numerous_carmella_unuscione.sql",
    "content": "ALTER TABLE \"git_provider\" ADD COLUMN \"userId\" text;--> statement-breakpoint\n\n-- Update existing git providers to be owned by the organization owner\n-- We can get the owner_id directly from the organization table\nUPDATE \"git_provider\" \nSET \"userId\" = (\n    SELECT o.\"owner_id\" \n    FROM \"organization\" o \n    WHERE o.id = \"git_provider\".\"organizationId\"\n);--> statement-breakpoint\n\n-- Now make the column NOT NULL since all rows should have values\nALTER TABLE \"git_provider\" ALTER COLUMN \"userId\" SET NOT NULL;--> statement-breakpoint\nALTER TABLE \"git_provider\" ADD CONSTRAINT \"git_provider_userId_user_temp_id_fk\" FOREIGN KEY (\"userId\") REFERENCES \"public\".\"user_temp\"(\"id\") ON DELETE cascade ON UPDATE no action;"
  },
  {
    "path": "apps/dokploy/drizzle/0095_curly_justice.sql",
    "content": "CREATE TABLE \"rollback\" (\n\t\"rollbackId\" text PRIMARY KEY NOT NULL,\n\t\"deploymentId\" text NOT NULL,\n\t\"version\" serial NOT NULL,\n\t\"image\" text,\n\t\"createdAt\" text NOT NULL,\n\t\"fullContext\" jsonb\n);\n--> statement-breakpoint\nALTER TABLE \"application\" ADD COLUMN \"rollbackActive\" boolean DEFAULT false;--> statement-breakpoint\nALTER TABLE \"deployment\" ADD COLUMN \"rollbackId\" text;--> statement-breakpoint\nALTER TABLE \"rollback\" ADD CONSTRAINT \"rollback_deploymentId_deployment_deploymentId_fk\" FOREIGN KEY (\"deploymentId\") REFERENCES \"public\".\"deployment\"(\"deploymentId\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"deployment\" ADD CONSTRAINT \"deployment_rollbackId_rollback_rollbackId_fk\" FOREIGN KEY (\"rollbackId\") REFERENCES \"public\".\"rollback\"(\"rollbackId\") ON DELETE cascade ON UPDATE no action;"
  },
  {
    "path": "apps/dokploy/drizzle/0096_small_shaman.sql",
    "content": "ALTER TABLE \"rollback\" DROP CONSTRAINT \"rollback_deploymentId_deployment_deploymentId_fk\";\n--> statement-breakpoint\nALTER TABLE \"rollback\" ADD CONSTRAINT \"rollback_deploymentId_deployment_deploymentId_fk\" FOREIGN KEY (\"deploymentId\") REFERENCES \"public\".\"deployment\"(\"deploymentId\") ON DELETE set null ON UPDATE no action;"
  },
  {
    "path": "apps/dokploy/drizzle/0097_hard_lizard.sql",
    "content": "ALTER TABLE \"rollback\" DROP CONSTRAINT \"rollback_deploymentId_deployment_deploymentId_fk\";\n--> statement-breakpoint\nALTER TABLE \"rollback\" ADD CONSTRAINT \"rollback_deploymentId_deployment_deploymentId_fk\" FOREIGN KEY (\"deploymentId\") REFERENCES \"public\".\"deployment\"(\"deploymentId\") ON DELETE cascade ON UPDATE no action;"
  },
  {
    "path": "apps/dokploy/drizzle/0098_conscious_chat.sql",
    "content": "ALTER TABLE \"deployment\" ADD COLUMN \"pid\" text;"
  },
  {
    "path": "apps/dokploy/drizzle/0099_wise_golden_guardian.sql",
    "content": "CREATE TYPE \"public\".\"publishModeType\" AS ENUM('ingress', 'host');--> statement-breakpoint\nALTER TABLE \"port\" ADD COLUMN \"publishMode\" \"publishModeType\" DEFAULT 'host' NOT NULL;"
  },
  {
    "path": "apps/dokploy/drizzle/0100_purple_rogue.sql",
    "content": "ALTER TABLE \"domain\" ADD COLUMN \"internalPath\" text DEFAULT '/';--> statement-breakpoint\nALTER TABLE \"domain\" ADD COLUMN \"stripPath\" boolean DEFAULT false NOT NULL;"
  },
  {
    "path": "apps/dokploy/drizzle/0101_moaning_blazing_skull.sql",
    "content": "CREATE TABLE \"volume_backup\" (\n\t\"volumeBackupId\" text PRIMARY KEY NOT NULL,\n\t\"name\" text NOT NULL,\n\t\"volumeName\" text NOT NULL,\n\t\"prefix\" text NOT NULL,\n\t\"serviceType\" \"serviceType\" DEFAULT 'application' NOT NULL,\n\t\"appName\" text NOT NULL,\n\t\"serviceName\" text,\n\t\"turnOff\" boolean DEFAULT false NOT NULL,\n\t\"cronExpression\" text NOT NULL,\n\t\"keepLatestCount\" integer,\n\t\"enabled\" boolean,\n\t\"applicationId\" text,\n\t\"postgresId\" text,\n\t\"mariadbId\" text,\n\t\"mongoId\" text,\n\t\"mysqlId\" text,\n\t\"redisId\" text,\n\t\"composeId\" text,\n\t\"createdAt\" text NOT NULL,\n\t\"destinationId\" text NOT NULL\n);\n--> statement-breakpoint\nALTER TABLE \"deployment\" ADD COLUMN \"volumeBackupId\" text;--> statement-breakpoint\nALTER TABLE \"volume_backup\" ADD CONSTRAINT \"volume_backup_applicationId_application_applicationId_fk\" FOREIGN KEY (\"applicationId\") REFERENCES \"public\".\"application\"(\"applicationId\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"volume_backup\" ADD CONSTRAINT \"volume_backup_postgresId_postgres_postgresId_fk\" FOREIGN KEY (\"postgresId\") REFERENCES \"public\".\"postgres\"(\"postgresId\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"volume_backup\" ADD CONSTRAINT \"volume_backup_mariadbId_mariadb_mariadbId_fk\" FOREIGN KEY (\"mariadbId\") REFERENCES \"public\".\"mariadb\"(\"mariadbId\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"volume_backup\" ADD CONSTRAINT \"volume_backup_mongoId_mongo_mongoId_fk\" FOREIGN KEY (\"mongoId\") REFERENCES \"public\".\"mongo\"(\"mongoId\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"volume_backup\" ADD CONSTRAINT \"volume_backup_mysqlId_mysql_mysqlId_fk\" FOREIGN KEY (\"mysqlId\") REFERENCES \"public\".\"mysql\"(\"mysqlId\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"volume_backup\" ADD CONSTRAINT \"volume_backup_redisId_redis_redisId_fk\" FOREIGN KEY (\"redisId\") REFERENCES \"public\".\"redis\"(\"redisId\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"volume_backup\" ADD CONSTRAINT \"volume_backup_composeId_compose_composeId_fk\" FOREIGN KEY (\"composeId\") REFERENCES \"public\".\"compose\"(\"composeId\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"volume_backup\" ADD CONSTRAINT \"volume_backup_destinationId_destination_destinationId_fk\" FOREIGN KEY (\"destinationId\") REFERENCES \"public\".\"destination\"(\"destinationId\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"deployment\" ADD CONSTRAINT \"deployment_volumeBackupId_volume_backup_volumeBackupId_fk\" FOREIGN KEY (\"volumeBackupId\") REFERENCES \"public\".\"volume_backup\"(\"volumeBackupId\") ON DELETE cascade ON UPDATE no action;"
  },
  {
    "path": "apps/dokploy/drizzle/0102_opposite_grandmaster.sql",
    "content": "ALTER TABLE \"compose\" ADD COLUMN \"isolatedDeploymentsVolume\" boolean DEFAULT false NOT NULL;\n\nUPDATE \"compose\" SET \"isolatedDeploymentsVolume\" = true;"
  },
  {
    "path": "apps/dokploy/drizzle/0103_cultured_pestilence.sql",
    "content": "ALTER TABLE \"application\" ADD COLUMN \"previewRequireCollaboratorPermissions\" boolean DEFAULT true;"
  },
  {
    "path": "apps/dokploy/drizzle/0104_omniscient_randall.sql",
    "content": "ALTER TABLE \"application\" ADD COLUMN \"railpackVersion\" text DEFAULT '0.2.2';"
  },
  {
    "path": "apps/dokploy/drizzle/0105_clumsy_quicksilver.sql",
    "content": "ALTER TABLE \"postgres\" ADD COLUMN \"healthCheckSwarm\" json;--> statement-breakpoint\nALTER TABLE \"postgres\" ADD COLUMN \"restartPolicySwarm\" json;--> statement-breakpoint\nALTER TABLE \"postgres\" ADD COLUMN \"placementSwarm\" json;--> statement-breakpoint\nALTER TABLE \"postgres\" ADD COLUMN \"updateConfigSwarm\" json;--> statement-breakpoint\nALTER TABLE \"postgres\" ADD COLUMN \"rollbackConfigSwarm\" json;--> statement-breakpoint\nALTER TABLE \"postgres\" ADD COLUMN \"modeSwarm\" json;--> statement-breakpoint\nALTER TABLE \"postgres\" ADD COLUMN \"labelsSwarm\" json;--> statement-breakpoint\nALTER TABLE \"postgres\" ADD COLUMN \"networkSwarm\" json;--> statement-breakpoint\nALTER TABLE \"postgres\" ADD COLUMN \"replicas\" integer DEFAULT 1 NOT NULL;--> statement-breakpoint\nALTER TABLE \"mariadb\" ADD COLUMN \"healthCheckSwarm\" json;--> statement-breakpoint\nALTER TABLE \"mariadb\" ADD COLUMN \"restartPolicySwarm\" json;--> statement-breakpoint\nALTER TABLE \"mariadb\" ADD COLUMN \"placementSwarm\" json;--> statement-breakpoint\nALTER TABLE \"mariadb\" ADD COLUMN \"updateConfigSwarm\" json;--> statement-breakpoint\nALTER TABLE \"mariadb\" ADD COLUMN \"rollbackConfigSwarm\" json;--> statement-breakpoint\nALTER TABLE \"mariadb\" ADD COLUMN \"modeSwarm\" json;--> statement-breakpoint\nALTER TABLE \"mariadb\" ADD COLUMN \"labelsSwarm\" json;--> statement-breakpoint\nALTER TABLE \"mariadb\" ADD COLUMN \"networkSwarm\" json;--> statement-breakpoint\nALTER TABLE \"mariadb\" ADD COLUMN \"replicas\" integer DEFAULT 1 NOT NULL;--> statement-breakpoint\nALTER TABLE \"mongo\" ADD COLUMN \"healthCheckSwarm\" json;--> statement-breakpoint\nALTER TABLE \"mongo\" ADD COLUMN \"restartPolicySwarm\" json;--> statement-breakpoint\nALTER TABLE \"mongo\" ADD COLUMN \"placementSwarm\" json;--> statement-breakpoint\nALTER TABLE \"mongo\" ADD COLUMN \"updateConfigSwarm\" json;--> statement-breakpoint\nALTER TABLE \"mongo\" ADD COLUMN \"rollbackConfigSwarm\" json;--> statement-breakpoint\nALTER TABLE \"mongo\" ADD COLUMN \"modeSwarm\" json;--> statement-breakpoint\nALTER TABLE \"mongo\" ADD COLUMN \"labelsSwarm\" json;--> statement-breakpoint\nALTER TABLE \"mongo\" ADD COLUMN \"networkSwarm\" json;--> statement-breakpoint\nALTER TABLE \"mongo\" ADD COLUMN \"replicas\" integer DEFAULT 1 NOT NULL;--> statement-breakpoint\nALTER TABLE \"mysql\" ADD COLUMN \"healthCheckSwarm\" json;--> statement-breakpoint\nALTER TABLE \"mysql\" ADD COLUMN \"restartPolicySwarm\" json;--> statement-breakpoint\nALTER TABLE \"mysql\" ADD COLUMN \"placementSwarm\" json;--> statement-breakpoint\nALTER TABLE \"mysql\" ADD COLUMN \"updateConfigSwarm\" json;--> statement-breakpoint\nALTER TABLE \"mysql\" ADD COLUMN \"rollbackConfigSwarm\" json;--> statement-breakpoint\nALTER TABLE \"mysql\" ADD COLUMN \"modeSwarm\" json;--> statement-breakpoint\nALTER TABLE \"mysql\" ADD COLUMN \"labelsSwarm\" json;--> statement-breakpoint\nALTER TABLE \"mysql\" ADD COLUMN \"networkSwarm\" json;--> statement-breakpoint\nALTER TABLE \"mysql\" ADD COLUMN \"replicas\" integer DEFAULT 1 NOT NULL;--> statement-breakpoint\nALTER TABLE \"redis\" ADD COLUMN \"healthCheckSwarm\" json;--> statement-breakpoint\nALTER TABLE \"redis\" ADD COLUMN \"restartPolicySwarm\" json;--> statement-breakpoint\nALTER TABLE \"redis\" ADD COLUMN \"placementSwarm\" json;--> statement-breakpoint\nALTER TABLE \"redis\" ADD COLUMN \"updateConfigSwarm\" json;--> statement-breakpoint\nALTER TABLE \"redis\" ADD COLUMN \"rollbackConfigSwarm\" json;--> statement-breakpoint\nALTER TABLE \"redis\" ADD COLUMN \"modeSwarm\" json;--> statement-breakpoint\nALTER TABLE \"redis\" ADD COLUMN \"labelsSwarm\" json;--> statement-breakpoint\nALTER TABLE \"redis\" ADD COLUMN \"networkSwarm\" json;--> statement-breakpoint\nALTER TABLE \"redis\" ADD COLUMN \"replicas\" integer DEFAULT 1 NOT NULL;"
  },
  {
    "path": "apps/dokploy/drizzle/0106_purple_maggott.sql",
    "content": "ALTER TABLE \"application\" ADD COLUMN \"previewLabels\" text[];"
  },
  {
    "path": "apps/dokploy/drizzle/0107_loud_kang.sql",
    "content": "CREATE TABLE \"environment\" (\n\t\"environmentId\" text PRIMARY KEY NOT NULL,\n\t\"name\" text NOT NULL,\n\t\"description\" text,\n\t\"createdAt\" text NOT NULL,\n\t\"projectId\" text NOT NULL\n);\nALTER TABLE \"environment\" ADD CONSTRAINT \"environment_projectId_project_projectId_fk\" FOREIGN KEY (\"projectId\") REFERENCES \"public\".\"project\"(\"projectId\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\n\n-- Insertar un ambiente \"production\" para cada proyecto existente\nINSERT INTO \"environment\" (\"environmentId\", \"name\", \"description\", \"createdAt\", \"projectId\")\nSELECT \n    -- Generar un ID único para cada ambiente usando el projectId como base\n    'env_prod_' || \"projectId\" || '_' || EXTRACT(EPOCH FROM NOW())::text,\n    'production',\n    'Production environment',\n    NOW()::text,\n    \"projectId\"\nFROM \"project\"\nWHERE \"projectId\" NOT IN (\n    SELECT DISTINCT \"projectId\" \n    FROM \"environment\" \n    WHERE \"name\" = 'production'\n);\n\nALTER TABLE \"application\" ADD COLUMN \"environmentId\" text;--> statement-breakpoint\nALTER TABLE \"postgres\" ADD COLUMN \"environmentId\" text;--> statement-breakpoint\nALTER TABLE \"mariadb\" ADD COLUMN \"environmentId\" text;--> statement-breakpoint\nALTER TABLE \"mongo\" ADD COLUMN \"environmentId\" text;--> statement-breakpoint\nALTER TABLE \"mysql\" ADD COLUMN \"environmentId\" text;--> statement-breakpoint\nALTER TABLE \"redis\" ADD COLUMN \"environmentId\" text;--> statement-breakpoint\nALTER TABLE \"compose\" ADD COLUMN \"environmentId\" text;--> statement-breakpoint\n\n\n-- Step 3: Update all services to point to their project's production environment\n-- Update applications\nUPDATE \"application\" \nSET \"environmentId\" = (\n    SELECT e.\"environmentId\" \n    FROM \"environment\" e \n    WHERE e.\"projectId\" = \"application\".\"projectId\" \n    AND e.\"name\" = 'production'\n    LIMIT 1\n);--> statement-breakpoint\n\n-- Update compose\nUPDATE \"compose\" \nSET \"environmentId\" = (\n    SELECT e.\"environmentId\" \n    FROM \"environment\" e \n    WHERE e.\"projectId\" = \"compose\".\"projectId\" \n    AND e.\"name\" = 'production'\n    LIMIT 1\n);--> statement-breakpoint\n\n-- Update mariadb\nUPDATE \"mariadb\" \nSET \"environmentId\" = (\n    SELECT e.\"environmentId\" \n    FROM \"environment\" e \n    WHERE e.\"projectId\" = \"mariadb\".\"projectId\" \n    AND e.\"name\" = 'production'\n    LIMIT 1\n);--> statement-breakpoint\n\n-- Update mongo\nUPDATE \"mongo\" \nSET \"environmentId\" = (\n    SELECT e.\"environmentId\" \n    FROM \"environment\" e \n    WHERE e.\"projectId\" = \"mongo\".\"projectId\" \n    AND e.\"name\" = 'production'\n    LIMIT 1\n);--> statement-breakpoint\n\n-- Update mysql\nUPDATE \"mysql\" \nSET \"environmentId\" = (\n    SELECT e.\"environmentId\" \n    FROM \"environment\" e \n    WHERE e.\"projectId\" = \"mysql\".\"projectId\" \n    AND e.\"name\" = 'production'\n    LIMIT 1\n);--> statement-breakpoint\n\n-- Update postgres\nUPDATE \"postgres\" \nSET \"environmentId\" = (\n    SELECT e.\"environmentId\" \n    FROM \"environment\" e \n    WHERE e.\"projectId\" = \"postgres\".\"projectId\" \n    AND e.\"name\" = 'production'\n    LIMIT 1\n);--> statement-breakpoint\n\n-- Update redis\nUPDATE \"redis\" \nSET \"environmentId\" = (\n    SELECT e.\"environmentId\" \n    FROM \"environment\" e \n    WHERE e.\"projectId\" = \"redis\".\"projectId\" \n    AND e.\"name\" = 'production'\n    LIMIT 1\n);--> statement-breakpoint\n\n\n--> statement-breakpoint\nALTER TABLE \"application\" DROP CONSTRAINT \"application_projectId_project_projectId_fk\";\n--> statement-breakpoint\nALTER TABLE \"postgres\" DROP CONSTRAINT \"postgres_projectId_project_projectId_fk\";\n--> statement-breakpoint\nALTER TABLE \"mariadb\" DROP CONSTRAINT \"mariadb_projectId_project_projectId_fk\";\n--> statement-breakpoint\nALTER TABLE \"mongo\" DROP CONSTRAINT \"mongo_projectId_project_projectId_fk\";\n--> statement-breakpoint\nALTER TABLE \"mysql\" DROP CONSTRAINT \"mysql_projectId_project_projectId_fk\";\n--> statement-breakpoint\nALTER TABLE \"redis\" DROP CONSTRAINT \"redis_projectId_project_projectId_fk\";\n--> statement-breakpoint\nALTER TABLE \"compose\" DROP CONSTRAINT \"compose_projectId_project_projectId_fk\";\n--> statement-breakpoint\n\n-- Step 4: Make environmentId columns NOT NULL\nALTER TABLE \"application\" ALTER COLUMN \"environmentId\" SET NOT NULL;--> statement-breakpoint\nALTER TABLE \"compose\" ALTER COLUMN \"environmentId\" SET NOT NULL;--> statement-breakpoint\nALTER TABLE \"mariadb\" ALTER COLUMN \"environmentId\" SET NOT NULL;--> statement-breakpoint\nALTER TABLE \"mongo\" ALTER COLUMN \"environmentId\" SET NOT NULL;--> statement-breakpoint\nALTER TABLE \"mysql\" ALTER COLUMN \"environmentId\" SET NOT NULL;--> statement-breakpoint\nALTER TABLE \"postgres\" ALTER COLUMN \"environmentId\" SET NOT NULL;--> statement-breakpoint\nALTER TABLE \"redis\" ALTER COLUMN \"environmentId\" SET NOT NULL;--> statement-breakpoint\n\n\n\nALTER TABLE \"application\" ADD CONSTRAINT \"application_environmentId_environment_environmentId_fk\" FOREIGN KEY (\"environmentId\") REFERENCES \"public\".\"environment\"(\"environmentId\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"postgres\" ADD CONSTRAINT \"postgres_environmentId_environment_environmentId_fk\" FOREIGN KEY (\"environmentId\") REFERENCES \"public\".\"environment\"(\"environmentId\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"mariadb\" ADD CONSTRAINT \"mariadb_environmentId_environment_environmentId_fk\" FOREIGN KEY (\"environmentId\") REFERENCES \"public\".\"environment\"(\"environmentId\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"mongo\" ADD CONSTRAINT \"mongo_environmentId_environment_environmentId_fk\" FOREIGN KEY (\"environmentId\") REFERENCES \"public\".\"environment\"(\"environmentId\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"mysql\" ADD CONSTRAINT \"mysql_environmentId_environment_environmentId_fk\" FOREIGN KEY (\"environmentId\") REFERENCES \"public\".\"environment\"(\"environmentId\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"redis\" ADD CONSTRAINT \"redis_environmentId_environment_environmentId_fk\" FOREIGN KEY (\"environmentId\") REFERENCES \"public\".\"environment\"(\"environmentId\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"compose\" ADD CONSTRAINT \"compose_environmentId_environment_environmentId_fk\" FOREIGN KEY (\"environmentId\") REFERENCES \"public\".\"environment\"(\"environmentId\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"application\" DROP COLUMN \"projectId\";--> statement-breakpoint\nALTER TABLE \"postgres\" DROP COLUMN \"projectId\";--> statement-breakpoint\nALTER TABLE \"mariadb\" DROP COLUMN \"projectId\";--> statement-breakpoint\nALTER TABLE \"mongo\" DROP COLUMN \"projectId\";--> statement-breakpoint\nALTER TABLE \"mysql\" DROP COLUMN \"projectId\";--> statement-breakpoint\nALTER TABLE \"redis\" DROP COLUMN \"projectId\";--> statement-breakpoint\nALTER TABLE \"compose\" DROP COLUMN \"projectId\";"
  },
  {
    "path": "apps/dokploy/drizzle/0108_lazy_next_avengers.sql",
    "content": "ALTER TABLE \"environment\" ADD COLUMN \"env\" text DEFAULT '' NOT NULL;"
  },
  {
    "path": "apps/dokploy/drizzle/0109_remarkable_sauron.sql",
    "content": "ALTER TABLE \"member\" ADD COLUMN \"accessedEnvironments\" text[] DEFAULT ARRAY[]::text[] NOT NULL;"
  },
  {
    "path": "apps/dokploy/drizzle/0110_red_psynapse.sql",
    "content": "ALTER TYPE \"public\".\"notificationType\" ADD VALUE 'ntfy';--> statement-breakpoint\nCREATE TABLE \"ntfy\" (\n\t\"ntfyId\" text PRIMARY KEY NOT NULL,\n\t\"serverUrl\" text NOT NULL,\n\t\"topic\" text NOT NULL,\n\t\"accessToken\" text NOT NULL,\n\t\"priority\" integer DEFAULT 3 NOT NULL\n);\n--> statement-breakpoint\nALTER TABLE \"notification\" ADD COLUMN \"ntfyId\" text;--> statement-breakpoint\nALTER TABLE \"notification\" ADD CONSTRAINT \"notification_ntfyId_ntfy_ntfyId_fk\" FOREIGN KEY (\"ntfyId\") REFERENCES \"public\".\"ntfy\"(\"ntfyId\") ON DELETE cascade ON UPDATE no action;"
  },
  {
    "path": "apps/dokploy/drizzle/0111_mushy_wolfsbane.sql",
    "content": "ALTER TABLE \"bitbucket\" ADD COLUMN \"apiToken\" text;"
  },
  {
    "path": "apps/dokploy/drizzle/0112_freezing_skrulls.sql",
    "content": "ALTER TABLE \"bitbucket\" ADD COLUMN \"bitbucketEmail\" text;"
  },
  {
    "path": "apps/dokploy/drizzle/0113_complete_rafael_vega.sql",
    "content": "ALTER TYPE \"public\".\"deploymentStatus\" ADD VALUE 'cancelled';"
  },
  {
    "path": "apps/dokploy/drizzle/0114_dry_black_tom.sql",
    "content": "ALTER TABLE \"application\" ADD COLUMN \"stopGracePeriodSwarm\" bigint;--> statement-breakpoint\nALTER TABLE \"mariadb\" ADD COLUMN \"stopGracePeriodSwarm\" bigint;--> statement-breakpoint\nALTER TABLE \"mongo\" ADD COLUMN \"stopGracePeriodSwarm\" bigint;--> statement-breakpoint\nALTER TABLE \"mysql\" ADD COLUMN \"stopGracePeriodSwarm\" bigint;--> statement-breakpoint\nALTER TABLE \"postgres\" ADD COLUMN \"stopGracePeriodSwarm\" bigint;--> statement-breakpoint\nALTER TABLE \"redis\" ADD COLUMN \"stopGracePeriodSwarm\" bigint;"
  },
  {
    "path": "apps/dokploy/drizzle/0115_serious_black_bird.sql",
    "content": "ALTER TABLE \"member\" ADD COLUMN \"canCreateEnvironments\" boolean DEFAULT false NOT NULL;"
  },
  {
    "path": "apps/dokploy/drizzle/0116_amusing_firedrake.sql",
    "content": "ALTER TABLE \"member\" ADD COLUMN \"canDeleteEnvironments\" boolean DEFAULT false NOT NULL;"
  },
  {
    "path": "apps/dokploy/drizzle/0117_lumpy_nuke.sql",
    "content": "ALTER TABLE \"application\" ADD COLUMN \"previewBuildSecrets\" text;--> statement-breakpoint\nALTER TABLE \"application\" ADD COLUMN \"buildSecrets\" text;"
  },
  {
    "path": "apps/dokploy/drizzle/0118_loose_anita_blake.sql",
    "content": "ALTER TYPE \"public\".\"notificationType\" ADD VALUE 'lark';--> statement-breakpoint\nCREATE TABLE \"lark\" (\n\t\"larkId\" text PRIMARY KEY NOT NULL,\n\t\"webhookUrl\" text NOT NULL\n);\n--> statement-breakpoint\nALTER TABLE \"notification\" ADD COLUMN \"larkId\" text;--> statement-breakpoint\nALTER TABLE \"notification\" ADD CONSTRAINT \"notification_larkId_lark_larkId_fk\" FOREIGN KEY (\"larkId\") REFERENCES \"public\".\"lark\"(\"larkId\") ON DELETE cascade ON UPDATE no action;"
  },
  {
    "path": "apps/dokploy/drizzle/0119_bouncy_morbius.sql",
    "content": "ALTER TABLE \"member\" ADD COLUMN \"is_default\" boolean DEFAULT false NOT NULL;"
  },
  {
    "path": "apps/dokploy/drizzle/0120_lame_captain_midlands.sql",
    "content": "ALTER TABLE \"user_temp\" RENAME TO \"user\";--> statement-breakpoint\nALTER TABLE \"user\" DROP CONSTRAINT \"user_temp_email_unique\";--> statement-breakpoint\nALTER TABLE \"account\" DROP CONSTRAINT \"account_user_id_user_temp_id_fk\";\n--> statement-breakpoint\nALTER TABLE \"apikey\" DROP CONSTRAINT \"apikey_user_id_user_temp_id_fk\";\n--> statement-breakpoint\nALTER TABLE \"invitation\" DROP CONSTRAINT \"invitation_inviter_id_user_temp_id_fk\";\n--> statement-breakpoint\nALTER TABLE \"member\" DROP CONSTRAINT \"member_user_id_user_temp_id_fk\";\n--> statement-breakpoint\nALTER TABLE \"organization\" DROP CONSTRAINT \"organization_owner_id_user_temp_id_fk\";\n--> statement-breakpoint\nALTER TABLE \"two_factor\" DROP CONSTRAINT \"two_factor_user_id_user_temp_id_fk\";\n--> statement-breakpoint\nALTER TABLE \"backup\" DROP CONSTRAINT \"backup_userId_user_temp_id_fk\";\n--> statement-breakpoint\nALTER TABLE \"git_provider\" DROP CONSTRAINT \"git_provider_userId_user_temp_id_fk\";\n--> statement-breakpoint\nALTER TABLE \"schedule\" DROP CONSTRAINT \"schedule_userId_user_temp_id_fk\";\n--> statement-breakpoint\nALTER TABLE \"session_temp\" DROP CONSTRAINT \"session_temp_user_id_user_temp_id_fk\";\n--> statement-breakpoint\nALTER TABLE \"application\" ADD COLUMN \"endpointSpecSwarm\" json;--> statement-breakpoint\nALTER TABLE \"mariadb\" ADD COLUMN \"endpointSpecSwarm\" json;--> statement-breakpoint\nALTER TABLE \"mongo\" ADD COLUMN \"endpointSpecSwarm\" json;--> statement-breakpoint\nALTER TABLE \"mysql\" ADD COLUMN \"endpointSpecSwarm\" json;--> statement-breakpoint\nALTER TABLE \"postgres\" ADD COLUMN \"endpointSpecSwarm\" json;--> statement-breakpoint\nALTER TABLE \"redis\" ADD COLUMN \"endpointSpecSwarm\" json;--> statement-breakpoint\nALTER TABLE \"account\" ADD CONSTRAINT \"account_user_id_user_id_fk\" FOREIGN KEY (\"user_id\") REFERENCES \"public\".\"user\"(\"id\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"apikey\" ADD CONSTRAINT \"apikey_user_id_user_id_fk\" FOREIGN KEY (\"user_id\") REFERENCES \"public\".\"user\"(\"id\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"invitation\" ADD CONSTRAINT \"invitation_inviter_id_user_id_fk\" FOREIGN KEY (\"inviter_id\") REFERENCES \"public\".\"user\"(\"id\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"member\" ADD CONSTRAINT \"member_user_id_user_id_fk\" FOREIGN KEY (\"user_id\") REFERENCES \"public\".\"user\"(\"id\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"organization\" ADD CONSTRAINT \"organization_owner_id_user_id_fk\" FOREIGN KEY (\"owner_id\") REFERENCES \"public\".\"user\"(\"id\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"two_factor\" ADD CONSTRAINT \"two_factor_user_id_user_id_fk\" FOREIGN KEY (\"user_id\") REFERENCES \"public\".\"user\"(\"id\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"backup\" ADD CONSTRAINT \"backup_userId_user_id_fk\" FOREIGN KEY (\"userId\") REFERENCES \"public\".\"user\"(\"id\") ON DELETE no action ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"git_provider\" ADD CONSTRAINT \"git_provider_userId_user_id_fk\" FOREIGN KEY (\"userId\") REFERENCES \"public\".\"user\"(\"id\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"schedule\" ADD CONSTRAINT \"schedule_userId_user_id_fk\" FOREIGN KEY (\"userId\") REFERENCES \"public\".\"user\"(\"id\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"session_temp\" ADD CONSTRAINT \"session_temp_user_id_user_id_fk\" FOREIGN KEY (\"user_id\") REFERENCES \"public\".\"user\"(\"id\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"user\" ADD CONSTRAINT \"user_email_unique\" UNIQUE(\"email\");"
  },
  {
    "path": "apps/dokploy/drizzle/0121_rainy_cargill.sql",
    "content": "-- Fix inconsistent date formats in environment.createdAt field\n-- Convert PostgreSQL timestamp format to ISO 8601 format\n-- This addresses issue #2992 where old environments have PostgreSQL timestamp format\n-- while new ones have ISO 8601 format\n\nUPDATE \"environment\"\nSET \"createdAt\" = to_char(\"createdAt\"::timestamptz, 'YYYY-MM-DD\"T\"HH24:MI:SS.MS\"Z\"')\nWHERE \"createdAt\" NOT LIKE '%T%';\n\n"
  },
  {
    "path": "apps/dokploy/drizzle/0122_absent_frightful_four.sql",
    "content": "CREATE TYPE \"public\".\"serverType\" AS ENUM('deploy', 'build');--> statement-breakpoint\nALTER TABLE \"application\" ADD COLUMN \"buildServerId\" text;--> statement-breakpoint\nALTER TABLE \"application\" ADD COLUMN \"buildRegistryId\" text;--> statement-breakpoint\nALTER TABLE \"deployment\" ADD COLUMN \"buildServerId\" text;--> statement-breakpoint\nALTER TABLE \"server\" ADD COLUMN \"serverType\" \"serverType\" DEFAULT 'deploy' NOT NULL;--> statement-breakpoint\nALTER TABLE \"application\" ADD CONSTRAINT \"application_buildServerId_server_serverId_fk\" FOREIGN KEY (\"buildServerId\") REFERENCES \"public\".\"server\"(\"serverId\") ON DELETE set null ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"application\" ADD CONSTRAINT \"application_buildRegistryId_registry_registryId_fk\" FOREIGN KEY (\"buildRegistryId\") REFERENCES \"public\".\"registry\"(\"registryId\") ON DELETE set null ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"deployment\" ADD CONSTRAINT \"deployment_buildServerId_server_serverId_fk\" FOREIGN KEY (\"buildServerId\") REFERENCES \"public\".\"server\"(\"serverId\") ON DELETE cascade ON UPDATE no action;"
  },
  {
    "path": "apps/dokploy/drizzle/0123_cloudy_piledriver.sql",
    "content": "ALTER TABLE \"application\" ADD COLUMN \"args\" text[];--> statement-breakpoint\nALTER TABLE \"mariadb\" ADD COLUMN \"args\" text[];--> statement-breakpoint\nALTER TABLE \"mongo\" ADD COLUMN \"args\" text[];--> statement-breakpoint\nALTER TABLE \"mysql\" ADD COLUMN \"args\" text[];--> statement-breakpoint\nALTER TABLE \"postgres\" ADD COLUMN \"args\" text[];--> statement-breakpoint\nALTER TABLE \"redis\" ADD COLUMN \"args\" text[];"
  },
  {
    "path": "apps/dokploy/drizzle/0124_certain_cloak.sql",
    "content": "ALTER TABLE \"ntfy\" ALTER COLUMN \"accessToken\" DROP NOT NULL;"
  },
  {
    "path": "apps/dokploy/drizzle/0125_neat_the_phantom.sql",
    "content": "ALTER TABLE \"application\" ADD COLUMN \"rollbackRegistryId\" text;--> statement-breakpoint\nALTER TABLE \"application\" ADD CONSTRAINT \"application_rollbackRegistryId_registry_registryId_fk\" FOREIGN KEY (\"rollbackRegistryId\") REFERENCES \"public\".\"registry\"(\"registryId\") ON DELETE set null ON UPDATE no action;"
  },
  {
    "path": "apps/dokploy/drizzle/0126_nifty_monster_badoon.sql",
    "content": "ALTER TABLE \"user\" ALTER COLUMN \"enableDockerCleanup\" SET DEFAULT true;"
  },
  {
    "path": "apps/dokploy/drizzle/0127_superb_alice.sql",
    "content": "ALTER TABLE \"notification\" ADD COLUMN \"volumeBackup\" boolean DEFAULT false NOT NULL;"
  },
  {
    "path": "apps/dokploy/drizzle/0128_hard_falcon.sql",
    "content": "ALTER TABLE \"user\" RENAME COLUMN \"name\" TO \"firstName\";--> statement-breakpoint\nALTER TABLE \"user\" ADD COLUMN \"lastName\" text DEFAULT '' NOT NULL;"
  },
  {
    "path": "apps/dokploy/drizzle/0129_pale_roughhouse.sql",
    "content": "ALTER TYPE \"public\".\"notificationType\" ADD VALUE 'custom' BEFORE 'lark';--> statement-breakpoint\nCREATE TABLE \"custom\" (\n\t\"customId\" text PRIMARY KEY NOT NULL,\n\t\"endpoint\" text NOT NULL,\n\t\"headers\" jsonb\n);\n--> statement-breakpoint\nALTER TABLE \"notification\" ADD COLUMN \"customId\" text;--> statement-breakpoint\nALTER TABLE \"notification\" ADD CONSTRAINT \"notification_customId_custom_customId_fk\" FOREIGN KEY (\"customId\") REFERENCES \"public\".\"custom\"(\"customId\") ON DELETE cascade ON UPDATE no action;"
  },
  {
    "path": "apps/dokploy/drizzle/0130_perpetual_screwball.sql",
    "content": "ALTER TABLE \"schedule\" ADD COLUMN \"timezone\" text;"
  },
  {
    "path": "apps/dokploy/drizzle/0131_volatile_beast.sql",
    "content": "ALTER TABLE \"application\" ADD COLUMN \"createEnvFile\" boolean DEFAULT true NOT NULL;"
  },
  {
    "path": "apps/dokploy/drizzle/0132_clean_layla_miller.sql",
    "content": "ALTER TABLE \"environment\" ADD COLUMN \"isDefault\" boolean DEFAULT false NOT NULL;\n\n-- Set isDefault to true for existing production environments\nUPDATE \"environment\" SET \"isDefault\" = true WHERE \"name\" = 'production';\n"
  },
  {
    "path": "apps/dokploy/drizzle/0133_striped_the_order.sql",
    "content": "CREATE TABLE \"webServerSettings\" (\n\t\"id\" text PRIMARY KEY NOT NULL,\n\t\"serverIp\" text,\n\t\"certificateType\" \"certificateType\" DEFAULT 'none' NOT NULL,\n\t\"https\" boolean DEFAULT false NOT NULL,\n\t\"host\" text,\n\t\"letsEncryptEmail\" text,\n\t\"sshPrivateKey\" text,\n\t\"enableDockerCleanup\" boolean DEFAULT true NOT NULL,\n\t\"logCleanupCron\" text DEFAULT '0 0 * * *',\n\t\"metricsConfig\" jsonb DEFAULT '{\"server\":{\"type\":\"Dokploy\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"retentionDays\":2,\"cronJob\":\"\",\"urlCallback\":\"\",\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb NOT NULL,\n\t\"cleanupCacheApplications\" boolean DEFAULT false NOT NULL,\n\t\"cleanupCacheOnPreviews\" boolean DEFAULT false NOT NULL,\n\t\"cleanupCacheOnCompose\" boolean DEFAULT false NOT NULL,\n\t\"created_at\" timestamp DEFAULT now(),\n\t\"updated_at\" timestamp DEFAULT now() NOT NULL\n);\n\n-- Migrate data from user table to webServerSettings\n-- Get the owner user's data and insert into webServerSettings\nINSERT INTO \"webServerSettings\" (\n\t\"id\",\n\t\"serverIp\",\n\t\"certificateType\",\n\t\"https\",\n\t\"host\",\n\t\"letsEncryptEmail\",\n\t\"sshPrivateKey\",\n\t\"enableDockerCleanup\",\n\t\"logCleanupCron\",\n\t\"metricsConfig\",\n\t\"cleanupCacheApplications\",\n\t\"cleanupCacheOnPreviews\",\n\t\"cleanupCacheOnCompose\",\n\t\"created_at\",\n\t\"updated_at\"\n)\nSELECT \n\tgen_random_uuid()::text as \"id\",\n\tu.\"serverIp\",\n\tCOALESCE(u.\"certificateType\", 'none') as \"certificateType\",\n\tCOALESCE(u.\"https\", false) as \"https\",\n\tu.\"host\",\n\tu.\"letsEncryptEmail\",\n\tu.\"sshPrivateKey\",\n\tCOALESCE(u.\"enableDockerCleanup\", true) as \"enableDockerCleanup\",\n\tCOALESCE(u.\"logCleanupCron\", '0 0 * * *') as \"logCleanupCron\",\n\tCOALESCE(\n\t\tu.\"metricsConfig\",\n\t\t'{\"server\":{\"type\":\"Dokploy\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"retentionDays\":2,\"cronJob\":\"\",\"urlCallback\":\"\",\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb\n\t) as \"metricsConfig\",\n\tCOALESCE(u.\"cleanupCacheApplications\", false) as \"cleanupCacheApplications\",\n\tCOALESCE(u.\"cleanupCacheOnPreviews\", false) as \"cleanupCacheOnPreviews\",\n\tCOALESCE(u.\"cleanupCacheOnCompose\", false) as \"cleanupCacheOnCompose\",\n\tNOW() as \"created_at\",\n\tNOW() as \"updated_at\"\nFROM \"user\" u\nINNER JOIN \"member\" m ON u.\"id\" = m.\"user_id\"\nWHERE m.\"role\" = 'owner'\nORDER BY m.\"created_at\" ASC\nLIMIT 1;\n\n-- If no owner found, create a default entry\nINSERT INTO \"webServerSettings\" (\n\t\"id\",\n\t\"serverIp\",\n\t\"certificateType\",\n\t\"https\",\n\t\"host\",\n\t\"letsEncryptEmail\",\n\t\"sshPrivateKey\",\n\t\"enableDockerCleanup\",\n\t\"logCleanupCron\",\n\t\"metricsConfig\",\n\t\"cleanupCacheApplications\",\n\t\"cleanupCacheOnPreviews\",\n\t\"cleanupCacheOnCompose\",\n\t\"created_at\",\n\t\"updated_at\"\n)\nSELECT \n\tgen_random_uuid()::text as \"id\",\n\tNULL as \"serverIp\",\n\t'none' as \"certificateType\",\n\tfalse as \"https\",\n\tNULL as \"host\",\n\tNULL as \"letsEncryptEmail\",\n\tNULL as \"sshPrivateKey\",\n\ttrue as \"enableDockerCleanup\",\n\t'0 0 * * *' as \"logCleanupCron\",\n\t'{\"server\":{\"type\":\"Dokploy\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"retentionDays\":2,\"cronJob\":\"\",\"urlCallback\":\"\",\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb as \"metricsConfig\",\n\tfalse as \"cleanupCacheApplications\",\n\tfalse as \"cleanupCacheOnPreviews\",\n\tfalse as \"cleanupCacheOnCompose\",\n\tNOW() as \"created_at\",\n\tNOW() as \"updated_at\"\nWHERE NOT EXISTS (\n\tSELECT 1 FROM \"webServerSettings\"\n);\n\n\n--> statement-breakpoint\nALTER TABLE \"user\" DROP COLUMN \"serverIp\";--> statement-breakpoint\nALTER TABLE \"user\" DROP COLUMN \"certificateType\";--> statement-breakpoint\nALTER TABLE \"user\" DROP COLUMN \"https\";--> statement-breakpoint\nALTER TABLE \"user\" DROP COLUMN \"host\";--> statement-breakpoint\nALTER TABLE \"user\" DROP COLUMN \"letsEncryptEmail\";--> statement-breakpoint\nALTER TABLE \"user\" DROP COLUMN \"sshPrivateKey\";--> statement-breakpoint\nALTER TABLE \"user\" DROP COLUMN \"enableDockerCleanup\";--> statement-breakpoint\nALTER TABLE \"user\" DROP COLUMN \"logCleanupCron\";--> statement-breakpoint\nALTER TABLE \"user\" DROP COLUMN \"metricsConfig\";--> statement-breakpoint\nALTER TABLE \"user\" DROP COLUMN \"cleanupCacheApplications\";--> statement-breakpoint\nALTER TABLE \"user\" DROP COLUMN \"cleanupCacheOnPreviews\";--> statement-breakpoint\nALTER TABLE \"user\" DROP COLUMN \"cleanupCacheOnCompose\";"
  },
  {
    "path": "apps/dokploy/drizzle/0134_strong_hercules.sql",
    "content": "ALTER TABLE \"application\" ALTER COLUMN \"railpackVersion\" SET DEFAULT '0.15.4';"
  },
  {
    "path": "apps/dokploy/drizzle/0135_illegal_magik.sql",
    "content": "ALTER TYPE \"public\".\"notificationType\" ADD VALUE 'pushover' BEFORE 'custom';--> statement-breakpoint\nCREATE TABLE \"pushover\" (\n\t\"pushoverId\" text PRIMARY KEY NOT NULL,\n\t\"userKey\" text NOT NULL,\n\t\"apiToken\" text NOT NULL,\n\t\"priority\" integer DEFAULT 0 NOT NULL,\n\t\"retry\" integer,\n\t\"expire\" integer\n);\n--> statement-breakpoint\nALTER TABLE \"notification\" ADD COLUMN \"pushoverId\" text;--> statement-breakpoint\nALTER TABLE \"notification\" ADD CONSTRAINT \"notification_pushoverId_pushover_pushoverId_fk\" FOREIGN KEY (\"pushoverId\") REFERENCES \"public\".\"pushover\"(\"pushoverId\") ON DELETE cascade ON UPDATE no action;"
  },
  {
    "path": "apps/dokploy/drizzle/0136_tidy_puff_adder.sql",
    "content": "ALTER TABLE \"application\" ADD COLUMN \"bitbucketRepositorySlug\" text;--> statement-breakpoint\nALTER TABLE \"compose\" ADD COLUMN \"bitbucketRepositorySlug\" text;"
  },
  {
    "path": "apps/dokploy/drizzle/0137_colossal_sally_floyd.sql",
    "content": "CREATE TABLE \"sso_provider\" (\n\t\"id\" text PRIMARY KEY NOT NULL,\n\t\"issuer\" text NOT NULL,\n\t\"oidc_config\" text,\n\t\"saml_config\" text,\n\t\"provider_id\" text NOT NULL,\n\t\"user_id\" text,\n\t\"organization_id\" text,\n\t\"domain\" text NOT NULL,\n\tCONSTRAINT \"sso_provider_provider_id_unique\" UNIQUE(\"provider_id\")\n);\n--> statement-breakpoint\nALTER TABLE \"user\" ADD COLUMN \"enableEnterpriseFeatures\" boolean DEFAULT false NOT NULL;--> statement-breakpoint\nALTER TABLE \"user\" ADD COLUMN \"licenseKey\" text;--> statement-breakpoint\nALTER TABLE \"user\" ADD COLUMN \"isValidEnterpriseLicense\" boolean DEFAULT false NOT NULL;--> statement-breakpoint\nALTER TABLE \"user\" ADD COLUMN \"trustedOrigins\" text[];--> statement-breakpoint\nALTER TABLE \"sso_provider\" ADD CONSTRAINT \"sso_provider_user_id_user_id_fk\" FOREIGN KEY (\"user_id\") REFERENCES \"public\".\"user\"(\"id\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"sso_provider\" ADD CONSTRAINT \"sso_provider_organization_id_organization_id_fk\" FOREIGN KEY (\"organization_id\") REFERENCES \"public\".\"organization\"(\"id\") ON DELETE cascade ON UPDATE no action;"
  },
  {
    "path": "apps/dokploy/drizzle/0138_pretty_ironclad.sql",
    "content": "ALTER TYPE \"public\".\"notificationType\" ADD VALUE 'resend' BEFORE 'gotify';--> statement-breakpoint\nCREATE TABLE \"resend\" (\n\t\"resendId\" text PRIMARY KEY NOT NULL,\n\t\"apiKey\" text NOT NULL,\n\t\"fromAddress\" text NOT NULL,\n\t\"toAddress\" text[] NOT NULL\n);\n--> statement-breakpoint\nALTER TABLE \"notification\" ADD COLUMN \"resendId\" text;--> statement-breakpoint\nALTER TABLE \"notification\" ADD CONSTRAINT \"notification_resendId_resend_resendId_fk\" FOREIGN KEY (\"resendId\") REFERENCES \"public\".\"resend\"(\"resendId\") ON DELETE cascade ON UPDATE no action;"
  },
  {
    "path": "apps/dokploy/drizzle/0139_brave_bloodstorm.sql",
    "content": "ALTER TABLE \"invitation\" ADD COLUMN \"created_at\" timestamp DEFAULT now() NOT NULL;"
  },
  {
    "path": "apps/dokploy/drizzle/0140_lame_mattie_franklin.sql",
    "content": "ALTER TABLE \"gitlab\" ADD COLUMN \"gitlabInternalUrl\" text;"
  },
  {
    "path": "apps/dokploy/drizzle/0141_plain_earthquake.sql",
    "content": "ALTER TABLE \"gitea\" ADD COLUMN \"giteaInternalUrl\" text;"
  },
  {
    "path": "apps/dokploy/drizzle/0142_outstanding_tusk.sql",
    "content": "ALTER TABLE \"application\" ADD COLUMN \"ulimitsSwarm\" json;--> statement-breakpoint\nALTER TABLE \"mariadb\" ADD COLUMN \"ulimitsSwarm\" json;--> statement-breakpoint\nALTER TABLE \"mongo\" ADD COLUMN \"ulimitsSwarm\" json;--> statement-breakpoint\nALTER TABLE \"mysql\" ADD COLUMN \"ulimitsSwarm\" json;--> statement-breakpoint\nALTER TABLE \"postgres\" ADD COLUMN \"ulimitsSwarm\" json;--> statement-breakpoint\nALTER TABLE \"redis\" ADD COLUMN \"ulimitsSwarm\" json;"
  },
  {
    "path": "apps/dokploy/drizzle/0143_brown_ultron.sql",
    "content": "ALTER TABLE \"sso_provider\" ADD COLUMN \"created_at\" timestamp DEFAULT now() NOT NULL;"
  },
  {
    "path": "apps/dokploy/drizzle/0144_odd_gunslinger.sql",
    "content": "ALTER TYPE \"public\".\"notificationType\" ADD VALUE 'teams';--> statement-breakpoint\nCREATE TABLE \"teams\" (\n\t\"teamsId\" text PRIMARY KEY NOT NULL,\n\t\"webhookUrl\" text NOT NULL\n);\n--> statement-breakpoint\nALTER TABLE \"notification\" ADD COLUMN \"teamsId\" text;--> statement-breakpoint\nALTER TABLE \"notification\" ADD CONSTRAINT \"notification_teamsId_teams_teamsId_fk\" FOREIGN KEY (\"teamsId\") REFERENCES \"public\".\"teams\"(\"teamsId\") ON DELETE cascade ON UPDATE no action;"
  },
  {
    "path": "apps/dokploy/drizzle/0145_remarkable_titania.sql",
    "content": "CREATE TYPE \"public\".\"patchType\" AS ENUM('create', 'update', 'delete');--> statement-breakpoint\nCREATE TABLE \"patch\" (\n\t\"patchId\" text PRIMARY KEY NOT NULL,\n\t\"type\" \"patchType\" DEFAULT 'update' NOT NULL,\n\t\"filePath\" text NOT NULL,\n\t\"enabled\" boolean DEFAULT true NOT NULL,\n\t\"content\" text NOT NULL,\n\t\"createdAt\" text NOT NULL,\n\t\"updatedAt\" text,\n\t\"applicationId\" text,\n\t\"composeId\" text,\n\tCONSTRAINT \"patch_filepath_application_unique\" UNIQUE(\"filePath\",\"applicationId\"),\n\tCONSTRAINT \"patch_filepath_compose_unique\" UNIQUE(\"filePath\",\"composeId\")\n);\n--> statement-breakpoint\nALTER TABLE \"patch\" ADD CONSTRAINT \"patch_applicationId_application_applicationId_fk\" FOREIGN KEY (\"applicationId\") REFERENCES \"public\".\"application\"(\"applicationId\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"patch\" ADD CONSTRAINT \"patch_composeId_compose_composeId_fk\" FOREIGN KEY (\"composeId\") REFERENCES \"public\".\"compose\"(\"composeId\") ON DELETE cascade ON UPDATE no action;"
  },
  {
    "path": "apps/dokploy/drizzle/0146_bumpy_morg.sql",
    "content": "ALTER TABLE \"application\" ALTER COLUMN \"dockerfile\" SET DEFAULT 'Dockerfile';"
  },
  {
    "path": "apps/dokploy/drizzle/0147_right_lake.sql",
    "content": "ALTER TABLE \"session_temp\" RENAME TO \"session\";--> statement-breakpoint\nALTER TABLE \"session\" DROP CONSTRAINT \"session_temp_token_unique\";--> statement-breakpoint\nALTER TABLE \"session\" DROP CONSTRAINT \"session_temp_user_id_user_id_fk\";\n--> statement-breakpoint\nALTER TABLE \"session\" ADD CONSTRAINT \"session_user_id_user_id_fk\" FOREIGN KEY (\"user_id\") REFERENCES \"public\".\"user\"(\"id\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"session\" ADD CONSTRAINT \"session_token_unique\" UNIQUE(\"token\");"
  },
  {
    "path": "apps/dokploy/drizzle/0148_futuristic_bullseye.sql",
    "content": "ALTER TABLE \"webServerSettings\" ADD COLUMN \"whitelabelingConfig\" jsonb DEFAULT '{\"appName\":null,\"appDescription\":null,\"logoUrl\":null,\"faviconUrl\":null,\"customCss\":null,\"loginLogoUrl\":null,\"supportUrl\":null,\"docsUrl\":null,\"errorPageTitle\":null,\"errorPageDescription\":null,\"metaTitle\":null,\"footerText\":null}'::jsonb;"
  },
  {
    "path": "apps/dokploy/drizzle/0149_rare_radioactive_man.sql",
    "content": "CREATE TABLE \"organization_role\" (\n\t\"id\" text PRIMARY KEY NOT NULL,\n\t\"organization_id\" text NOT NULL,\n\t\"role\" text NOT NULL,\n\t\"permission\" text NOT NULL,\n\t\"created_at\" timestamp DEFAULT now() NOT NULL,\n\t\"updated_at\" timestamp\n);\n--> statement-breakpoint\nCREATE TABLE \"audit_log\" (\n\t\"id\" text PRIMARY KEY NOT NULL,\n\t\"organization_id\" text,\n\t\"user_id\" text,\n\t\"user_email\" text NOT NULL,\n\t\"user_role\" text NOT NULL,\n\t\"action\" text NOT NULL,\n\t\"resource_type\" text NOT NULL,\n\t\"resource_id\" text,\n\t\"resource_name\" text,\n\t\"metadata\" text,\n\t\"created_at\" timestamp DEFAULT now() NOT NULL\n);\n--> statement-breakpoint\nALTER TABLE \"organization_role\" ADD CONSTRAINT \"organization_role_organization_id_organization_id_fk\" FOREIGN KEY (\"organization_id\") REFERENCES \"public\".\"organization\"(\"id\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"audit_log\" ADD CONSTRAINT \"audit_log_organization_id_organization_id_fk\" FOREIGN KEY (\"organization_id\") REFERENCES \"public\".\"organization\"(\"id\") ON DELETE set null ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"audit_log\" ADD CONSTRAINT \"audit_log_user_id_user_id_fk\" FOREIGN KEY (\"user_id\") REFERENCES \"public\".\"user\"(\"id\") ON DELETE set null ON UPDATE no action;--> statement-breakpoint\nCREATE INDEX \"organizationRole_organizationId_idx\" ON \"organization_role\" USING btree (\"organization_id\");--> statement-breakpoint\nCREATE INDEX \"organizationRole_role_idx\" ON \"organization_role\" USING btree (\"role\");--> statement-breakpoint\nCREATE INDEX \"auditLog_organizationId_idx\" ON \"audit_log\" USING btree (\"organization_id\");--> statement-breakpoint\nCREATE INDEX \"auditLog_userId_idx\" ON \"audit_log\" USING btree (\"user_id\");--> statement-breakpoint\nCREATE INDEX \"auditLog_createdAt_idx\" ON \"audit_log\" USING btree (\"created_at\");"
  },
  {
    "path": "apps/dokploy/drizzle/0150_nappy_blue_blade.sql",
    "content": "ALTER TABLE \"apikey\" ALTER COLUMN \"user_id\" DROP NOT NULL;--> statement-breakpoint\nALTER TABLE \"apikey\" ADD COLUMN \"config_id\" text DEFAULT 'default' NOT NULL;--> statement-breakpoint\nALTER TABLE \"apikey\" ADD COLUMN \"reference_id\" text;--> statement-breakpoint\nUPDATE \"apikey\" SET \"reference_id\" = \"user_id\" WHERE \"reference_id\" IS NULL;--> statement-breakpoint\nALTER TABLE \"apikey\" ALTER COLUMN \"reference_id\" SET NOT NULL;\n"
  },
  {
    "path": "apps/dokploy/drizzle/0151_modern_sunfire.sql",
    "content": "ALTER TABLE \"apikey\" DROP CONSTRAINT \"apikey_user_id_user_id_fk\";\n--> statement-breakpoint\nALTER TABLE \"apikey\" ADD CONSTRAINT \"apikey_reference_id_user_id_fk\" FOREIGN KEY (\"reference_id\") REFERENCES \"public\".\"user\"(\"id\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"apikey\" DROP COLUMN \"user_id\";"
  },
  {
    "path": "apps/dokploy/drizzle/0152_odd_firelord.sql",
    "content": "CREATE TABLE \"project_tag\" (\n\t\"id\" text PRIMARY KEY NOT NULL,\n\t\"projectId\" text NOT NULL,\n\t\"tagId\" text NOT NULL,\n\tCONSTRAINT \"unique_project_tag\" UNIQUE(\"projectId\",\"tagId\")\n);\n--> statement-breakpoint\nCREATE TABLE \"tag\" (\n\t\"tagId\" text PRIMARY KEY NOT NULL,\n\t\"name\" text NOT NULL,\n\t\"color\" text,\n\t\"createdAt\" text NOT NULL,\n\t\"organizationId\" text NOT NULL,\n\tCONSTRAINT \"unique_org_tag_name\" UNIQUE(\"organizationId\",\"name\")\n);\n--> statement-breakpoint\nALTER TABLE \"project_tag\" ADD CONSTRAINT \"project_tag_projectId_project_projectId_fk\" FOREIGN KEY (\"projectId\") REFERENCES \"public\".\"project\"(\"projectId\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"project_tag\" ADD CONSTRAINT \"project_tag_tagId_tag_tagId_fk\" FOREIGN KEY (\"tagId\") REFERENCES \"public\".\"tag\"(\"tagId\") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint\nALTER TABLE \"tag\" ADD CONSTRAINT \"tag_organizationId_organization_id_fk\" FOREIGN KEY (\"organizationId\") REFERENCES \"public\".\"organization\"(\"id\") ON DELETE cascade ON UPDATE no action;"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0000_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customLogo\": {\n          \"name\": \"customLogo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCss\": {\n          \"name\": \"customCss\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"hideLogo\": {\n          \"name\": \"hideLogo\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"hideLinks\": {\n          \"name\": \"hideLinks\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKey\": {\n          \"name\": \"customGitSSHKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 80\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"c6215051-7cd1-412d-b8df-b50d58acacff\",\n  \"prevId\": \"00000000-0000-0000-0000-000000000000\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0001_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customLogo\": {\n          \"name\": \"customLogo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCss\": {\n          \"name\": \"customCss\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"hideLogo\": {\n          \"name\": \"hideLogo\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"hideLinks\": {\n          \"name\": \"hideLinks\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKey\": {\n          \"name\": \"customGitSSHKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 80\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"3a4dfad7-ae33-4ae3-b60e-4f40f44f5652\",\n  \"prevId\": \"c6215051-7cd1-412d-b8df-b50d58acacff\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0002_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customLogo\": {\n          \"name\": \"customLogo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCss\": {\n          \"name\": \"customCss\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"hideLogo\": {\n          \"name\": \"hideLogo\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"hideLinks\": {\n          \"name\": \"hideLinks\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKey\": {\n          \"name\": \"customGitSSHKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 80\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"665483bd-5123-4c2b-beef-bfa9b91b9356\",\n  \"prevId\": \"3a4dfad7-ae33-4ae3-b60e-4f40f44f5652\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0003_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customLogo\": {\n          \"name\": \"customLogo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCss\": {\n          \"name\": \"customCss\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"hideLogo\": {\n          \"name\": \"hideLogo\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"hideLinks\": {\n          \"name\": \"hideLinks\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKey\": {\n          \"name\": \"customGitSSHKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 80\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"5a1d3f2b-9c31-4125-9645-015170550b51\",\n  \"prevId\": \"665483bd-5123-4c2b-beef-bfa9b91b9356\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0004_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKey\": {\n          \"name\": \"customGitSSHKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 80\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"7bb4bbcf-791c-4888-919e-f74bc0528b5f\",\n  \"prevId\": \"5a1d3f2b-9c31-4125-9645-015170550b51\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0005_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKey\": {\n          \"name\": \"customGitSSHKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 80\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"92c75e26-64ef-484f-a7d2-72a9422c119f\",\n  \"prevId\": \"7bb4bbcf-791c-4888-919e-f74bc0528b5f\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0006_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKey\": {\n          \"name\": \"customGitSSHKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 80\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"8ca71247-d512-427d-b115-47a7287ac431\",\n  \"prevId\": \"92c75e26-64ef-484f-a7d2-72a9422c119f\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0007_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKey\": {\n          \"name\": \"customGitSSHKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 80\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"80176730-273b-45e4-a7ca-760e29ad6d02\",\n  \"prevId\": \"8ca71247-d512-427d-b115-47a7287ac431\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0008_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKey\": {\n          \"name\": \"customGitSSHKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 80\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"54b3cce8-c1ab-46ed-bef9-1bb945d965f9\",\n  \"prevId\": \"80176730-273b-45e4-a7ca-760e29ad6d02\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0009_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKey\": {\n          \"name\": \"customGitSSHKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 80\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"81eb82a8-2190-4dee-a6c8-416ea98e2547\",\n  \"prevId\": \"54b3cce8-c1ab-46ed-bef9-1bb945d965f9\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0010_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKey\": {\n          \"name\": \"customGitSSHKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 80\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"c4f34dc8-69d6-49f3-809d-be474f0f0fcf\",\n  \"prevId\": \"81eb82a8-2190-4dee-a6c8-416ea98e2547\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0011_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKey\": {\n          \"name\": \"customGitSSHKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 80\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"9c6bb052-9f90-46fd-9382-67984e03f5b1\",\n  \"prevId\": \"c4f34dc8-69d6-49f3-809d-be474f0f0fcf\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0012_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKey\": {\n          \"name\": \"customGitSSHKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 80\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"5e715d26-b9c1-4e9c-80b7-408d63832e85\",\n  \"prevId\": \"9c6bb052-9f90-46fd-9382-67984e03f5b1\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0013_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKey\": {\n          \"name\": \"customGitSSHKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 80\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"5677e0b8-f22f-4565-9161-e97b381c0e1c\",\n  \"prevId\": \"5e715d26-b9c1-4e9c-80b7-408d63832e85\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0014_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKey\": {\n          \"name\": \"customGitSSHKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 80\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKey\": {\n          \"name\": \"customGitSSHKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"c204362f-e392-4d30-829a-2b9df39b3001\",\n  \"prevId\": \"5677e0b8-f22f-4565-9161-e97b381c0e1c\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0015_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKey\": {\n          \"name\": \"customGitSSHKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 80\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKey\": {\n          \"name\": \"customGitSSHKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"c6534c4b-5da2-4694-bd77-235eaeecc60a\",\n  \"prevId\": \"c204362f-e392-4d30-829a-2b9df39b3001\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0016_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKey\": {\n          \"name\": \"customGitSSHKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 80\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKey\": {\n          \"name\": \"customGitSSHKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"2d8d7670-b942-4573-9c44-6e81d2a2fa16\",\n  \"prevId\": \"c6534c4b-5da2-4694-bd77-235eaeecc60a\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0017_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKey\": {\n          \"name\": \"customGitSSHKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 80\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKey\": {\n          \"name\": \"customGitSSHKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"ec852f38-886a-43b4-9295-73984ed8ef45\",\n  \"prevId\": \"2d8d7670-b942-4573-9c44-6e81d2a2fa16\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0018_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKey\": {\n          \"name\": \"customGitSSHKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 80\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKey\": {\n          \"name\": \"customGitSSHKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"3d47456f-03b7-4b45-87f2-057df7e9cb0b\",\n  \"prevId\": \"ec852f38-886a-43b4-9295-73984ed8ef45\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0019_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKey\": {\n          \"name\": \"customGitSSHKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 80\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKey\": {\n          \"name\": \"customGitSSHKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"userJoin\": {\n          \"name\": \"userJoin\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"7c8f815f-4fec-4505-b9c7-c28bac3451f0\",\n  \"prevId\": \"3d47456f-03b7-4b45-87f2-057df7e9cb0b\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0020_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKey\": {\n          \"name\": \"customGitSSHKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 80\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKey\": {\n          \"name\": \"customGitSSHKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"userJoin\": {\n          \"name\": \"userJoin\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"cbe2b41d-26b6-4ca5-b40d-0e37faa56f39\",\n  \"prevId\": \"7c8f815f-4fec-4505-b9c7-c28bac3451f0\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0021_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKey\": {\n          \"name\": \"customGitSSHKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 80\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKey\": {\n          \"name\": \"customGitSSHKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"10f88c8f-bc1e-4dc4-99a5-327469c0da70\",\n  \"prevId\": \"cbe2b41d-26b6-4ca5-b40d-0e37faa56f39\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0022_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKey\": {\n          \"name\": \"customGitSSHKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 80\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKey\": {\n          \"name\": \"customGitSSHKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"86052343-0056-486c-9168-fa84186b4323\",\n  \"prevId\": \"10f88c8f-bc1e-4dc4-99a5-327469c0da70\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0023_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKey\": {\n          \"name\": \"customGitSSHKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 80\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKey\": {\n          \"name\": \"customGitSSHKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"730bfb9e-42e2-42de-a939-5cfe5ffe54b2\",\n  \"prevId\": \"86052343-0056-486c-9168-fa84186b4323\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0024_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKey\": {\n          \"name\": \"customGitSSHKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 80\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKey\": {\n          \"name\": \"customGitSSHKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"2c69b31b-ecee-4e20-9959-6dc0c76656fb\",\n  \"prevId\": \"730bfb9e-42e2-42de-a939-5cfe5ffe54b2\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0025_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKey\": {\n          \"name\": \"customGitSSHKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 80\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKey\": {\n          \"name\": \"customGitSSHKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"771c1412-7931-4f79-a789-055b0f51cf0f\",\n  \"prevId\": \"2c69b31b-ecee-4e20-9959-6dc0c76656fb\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0026_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 80\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"3dff4fa9-1d03-4748-b3ee-908c34324171\",\n  \"prevId\": \"771c1412-7931-4f79-a789-055b0f51cf0f\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0027_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 80\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"4dd1240c-ad28-4dd3-9b5c-52dba32b8d24\",\n  \"prevId\": \"3dff4fa9-1d03-4748-b3ee-908c34324171\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0028_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 80\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"cbcfd076-035f-4ca2-9643-b8ba8f2b6f03\",\n  \"prevId\": \"4dd1240c-ad28-4dd3-9b5c-52dba32b8d24\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0029_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 80\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"270dbc4c-104d-4630-b5f3-6c02f0afae49\",\n  \"prevId\": \"cbcfd076-035f-4ca2-9643-b8ba8f2b6f03\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0030_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 80\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"8dc242b9-6fa9-4372-9ecd-86ae90dd7d0d\",\n  \"prevId\": \"270dbc4c-104d-4630-b5f3-6c02f0afae49\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0031_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 80\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"86b27966-a431-493d-9cbc-2291e280f8f2\",\n  \"prevId\": \"8dc242b9-6fa9-4372-9ecd-86ae90dd7d0d\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0032_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"ce8a8861-2970-4889-ac2e-3cfe60d12736\",\n  \"prevId\": \"86b27966-a431-493d-9cbc-2291e280f8f2\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0033_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_authId_auth_id_fk\": {\n          \"name\": \"git_provider_authId_auth_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"4b757666-9e18-454e-9cfa-762d03bf378f\",\n  \"prevId\": \"ce8a8861-2970-4889-ac2e-3cfe60d12736\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0034_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_authId_auth_id_fk\": {\n          \"name\": \"git_provider_authId_auth_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"6a7ce86e-f628-4786-ab30-e160dcdb0a39\",\n  \"prevId\": \"4b757666-9e18-454e-9cfa-762d03bf378f\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0035_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_authId_auth_id_fk\": {\n          \"name\": \"git_provider_authId_auth_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"bb060896-7fc0-4bf3-b579-65f118769de0\",\n  \"prevId\": \"6a7ce86e-f628-4786-ab30-e160dcdb0a39\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0036_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"enableLogRotation\": {\n          \"name\": \"enableLogRotation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_authId_auth_id_fk\": {\n          \"name\": \"git_provider_authId_auth_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"74cd1475-b79c-4226-b4e6-e5ddb9576025\",\n  \"prevId\": \"bb060896-7fc0-4bf3-b579-65f118769de0\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0037_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"enableLogRotation\": {\n          \"name\": \"enableLogRotation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_authId_auth_id_fk\": {\n          \"name\": \"git_provider_authId_auth_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_adminId_admin_adminId_fk\": {\n          \"name\": \"server_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"19a70a39-f719-400b-b61e-6ddf1bcc6ac5\",\n  \"prevId\": \"74cd1475-b79c-4226-b4e6-e5ddb9576025\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0038_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"enableLogRotation\": {\n          \"name\": \"enableLogRotation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_authId_auth_id_fk\": {\n          \"name\": \"git_provider_authId_auth_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_adminId_admin_adminId_fk\": {\n          \"name\": \"server_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"8ffdfaff-f166-42dc-ac77-4fd9309d736a\",\n  \"prevId\": \"19a70a39-f719-400b-b61e-6ddf1bcc6ac5\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0039_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"enableLogRotation\": {\n          \"name\": \"enableLogRotation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_adminId_admin_adminId_fk\": {\n          \"name\": \"notification_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_adminId_admin_adminId_fk\": {\n          \"name\": \"ssh-key_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_adminId_admin_adminId_fk\": {\n          \"name\": \"git_provider_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_adminId_admin_adminId_fk\": {\n          \"name\": \"server_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"cf3531ac-cd41-49b6-99d0-a0e377f28115\",\n  \"prevId\": \"8ffdfaff-f166-42dc-ac77-4fd9309d736a\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0040_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"enableLogRotation\": {\n          \"name\": \"enableLogRotation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_adminId_admin_adminId_fk\": {\n          \"name\": \"certificate_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_adminId_admin_adminId_fk\": {\n          \"name\": \"notification_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_adminId_admin_adminId_fk\": {\n          \"name\": \"ssh-key_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_adminId_admin_adminId_fk\": {\n          \"name\": \"git_provider_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_adminId_admin_adminId_fk\": {\n          \"name\": \"server_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"22cf0495-c3f3-4601-8653-9fb9a66bb72d\",\n  \"prevId\": \"cf3531ac-cd41-49b6-99d0-a0e377f28115\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0041_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"enableLogRotation\": {\n          \"name\": \"enableLogRotation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_adminId_admin_adminId_fk\": {\n          \"name\": \"certificate_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_adminId_admin_adminId_fk\": {\n          \"name\": \"notification_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_adminId_admin_adminId_fk\": {\n          \"name\": \"ssh-key_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_adminId_admin_adminId_fk\": {\n          \"name\": \"git_provider_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_adminId_admin_adminId_fk\": {\n          \"name\": \"server_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"9933f3e8-77a2-40e6-b579-922fe6bb2cb6\",\n  \"prevId\": \"22cf0495-c3f3-4601-8653-9fb9a66bb72d\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0042_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"enableLogRotation\": {\n          \"name\": \"enableLogRotation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_adminId_admin_adminId_fk\": {\n          \"name\": \"certificate_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_adminId_admin_adminId_fk\": {\n          \"name\": \"notification_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_adminId_admin_adminId_fk\": {\n          \"name\": \"ssh-key_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_adminId_admin_adminId_fk\": {\n          \"name\": \"git_provider_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_adminId_admin_adminId_fk\": {\n          \"name\": \"server_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"24bfb192-237f-4297-83d1-27988dcb6be2\",\n  \"prevId\": \"9933f3e8-77a2-40e6-b579-922fe6bb2cb6\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0043_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"enableLogRotation\": {\n          \"name\": \"enableLogRotation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_adminId_admin_adminId_fk\": {\n          \"name\": \"certificate_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_adminId_admin_adminId_fk\": {\n          \"name\": \"notification_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_adminId_admin_adminId_fk\": {\n          \"name\": \"ssh-key_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_adminId_admin_adminId_fk\": {\n          \"name\": \"git_provider_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_adminId_admin_adminId_fk\": {\n          \"name\": \"server_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"6e07937b-292a-4a59-9a3c-0fae18a1e976\",\n  \"prevId\": \"24bfb192-237f-4297-83d1-27988dcb6be2\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0044_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"enableLogRotation\": {\n          \"name\": \"enableLogRotation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_adminId_admin_adminId_fk\": {\n          \"name\": \"certificate_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_adminId_admin_adminId_fk\": {\n          \"name\": \"notification_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_adminId_admin_adminId_fk\": {\n          \"name\": \"ssh-key_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_adminId_admin_adminId_fk\": {\n          \"name\": \"git_provider_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_adminId_admin_adminId_fk\": {\n          \"name\": \"server_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"172ee8c6-ba83-460b-83e1-b61ba19f450b\",\n  \"prevId\": \"6e07937b-292a-4a59-9a3c-0fae18a1e976\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0045_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"enableLogRotation\": {\n          \"name\": \"enableLogRotation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_adminId_admin_adminId_fk\": {\n          \"name\": \"certificate_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_adminId_admin_adminId_fk\": {\n          \"name\": \"notification_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_adminId_admin_adminId_fk\": {\n          \"name\": \"ssh-key_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_adminId_admin_adminId_fk\": {\n          \"name\": \"git_provider_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_adminId_admin_adminId_fk\": {\n          \"name\": \"server_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"dc1aa20f-26c0-474b-a37a-07be670f9aae\",\n  \"prevId\": \"172ee8c6-ba83-460b-83e1-b61ba19f450b\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0046_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"enableLogRotation\": {\n          \"name\": \"enableLogRotation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_adminId_admin_adminId_fk\": {\n          \"name\": \"certificate_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_adminId_admin_adminId_fk\": {\n          \"name\": \"notification_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_adminId_admin_adminId_fk\": {\n          \"name\": \"ssh-key_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_adminId_admin_adminId_fk\": {\n          \"name\": \"git_provider_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_adminId_admin_adminId_fk\": {\n          \"name\": \"server_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"d70bcec5-e7af-4872-b2eb-f0a22ae2e3e8\",\n  \"prevId\": \"dc1aa20f-26c0-474b-a37a-07be670f9aae\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0047_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"enableLogRotation\": {\n          \"name\": \"enableLogRotation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_adminId_admin_adminId_fk\": {\n          \"name\": \"certificate_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_adminId_admin_adminId_fk\": {\n          \"name\": \"notification_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_adminId_admin_adminId_fk\": {\n          \"name\": \"ssh-key_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_adminId_admin_adminId_fk\": {\n          \"name\": \"git_provider_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_adminId_admin_adminId_fk\": {\n          \"name\": \"server_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"16ee50a9-7cbc-46a4-af70-c3c85ed45466\",\n  \"prevId\": \"d70bcec5-e7af-4872-b2eb-f0a22ae2e3e8\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0048_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"enableLogRotation\": {\n          \"name\": \"enableLogRotation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_adminId_admin_adminId_fk\": {\n          \"name\": \"certificate_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_adminId_admin_adminId_fk\": {\n          \"name\": \"notification_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_adminId_admin_adminId_fk\": {\n          \"name\": \"ssh-key_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_adminId_admin_adminId_fk\": {\n          \"name\": \"git_provider_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_adminId_admin_adminId_fk\": {\n          \"name\": \"server_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"928417c8-2e7b-43ba-bc19-44b4d70107f1\",\n  \"prevId\": \"16ee50a9-7cbc-46a4-af70-c3c85ed45466\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0049_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"enableLogRotation\": {\n          \"name\": \"enableLogRotation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"tableTo\": \"preview_deployments\",\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"tableTo\": \"preview_deployments\",\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_adminId_admin_adminId_fk\": {\n          \"name\": \"certificate_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_adminId_admin_adminId_fk\": {\n          \"name\": \"notification_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_adminId_admin_adminId_fk\": {\n          \"name\": \"ssh-key_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_adminId_admin_adminId_fk\": {\n          \"name\": \"git_provider_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_adminId_admin_adminId_fk\": {\n          \"name\": \"server_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"tableTo\": \"domain\",\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"db518175-259d-4f4a-b6d0-fe95067bba61\",\n  \"prevId\": \"928417c8-2e7b-43ba-bc19-44b4d70107f1\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0050_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"enableLogRotation\": {\n          \"name\": \"enableLogRotation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"tableTo\": \"preview_deployments\",\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"tableTo\": \"preview_deployments\",\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_adminId_admin_adminId_fk\": {\n          \"name\": \"certificate_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_adminId_admin_adminId_fk\": {\n          \"name\": \"notification_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_adminId_admin_adminId_fk\": {\n          \"name\": \"ssh-key_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_adminId_admin_adminId_fk\": {\n          \"name\": \"git_provider_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_adminId_admin_adminId_fk\": {\n          \"name\": \"server_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"tableTo\": \"domain\",\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"89b9d2ac-25d4-46ea-8050-74a96a330cd4\",\n  \"prevId\": \"db518175-259d-4f4a-b6d0-fe95067bba61\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0051_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"enableLogRotation\": {\n          \"name\": \"enableLogRotation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"tableTo\": \"preview_deployments\",\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"tableTo\": \"preview_deployments\",\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_adminId_admin_adminId_fk\": {\n          \"name\": \"certificate_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_adminId_admin_adminId_fk\": {\n          \"name\": \"notification_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_adminId_admin_adminId_fk\": {\n          \"name\": \"ssh-key_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_adminId_admin_adminId_fk\": {\n          \"name\": \"git_provider_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_adminId_admin_adminId_fk\": {\n          \"name\": \"server_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"tableTo\": \"domain\",\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"0f21aab4-69a8-4ca9-91fa-7a819774e5ea\",\n  \"prevId\": \"89b9d2ac-25d4-46ea-8050-74a96a330cd4\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0052_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"enableLogRotation\": {\n          \"name\": \"enableLogRotation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"tableTo\": \"preview_deployments\",\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"tableTo\": \"preview_deployments\",\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_adminId_admin_adminId_fk\": {\n          \"name\": \"certificate_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_adminId_admin_adminId_fk\": {\n          \"name\": \"notification_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_adminId_admin_adminId_fk\": {\n          \"name\": \"ssh-key_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_adminId_admin_adminId_fk\": {\n          \"name\": \"git_provider_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_adminId_admin_adminId_fk\": {\n          \"name\": \"server_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"tableTo\": \"domain\",\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"c5eb96f1-db46-4498-8bf4-417f89422de4\",\n  \"prevId\": \"0f21aab4-69a8-4ca9-91fa-7a819774e5ea\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0053_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"enableLogRotation\": {\n          \"name\": \"enableLogRotation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"tableTo\": \"preview_deployments\",\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"tableTo\": \"preview_deployments\",\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_adminId_admin_adminId_fk\": {\n          \"name\": \"certificate_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_adminId_admin_adminId_fk\": {\n          \"name\": \"notification_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_adminId_admin_adminId_fk\": {\n          \"name\": \"ssh-key_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_adminId_admin_adminId_fk\": {\n          \"name\": \"git_provider_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_adminId_admin_adminId_fk\": {\n          \"name\": \"server_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"tableTo\": \"domain\",\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"cae9f45f-2b68-45bc-b2c1-cfbe9ebb8104\",\n  \"prevId\": \"c5eb96f1-db46-4498-8bf4-417f89422de4\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0054_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"enableLogRotation\": {\n          \"name\": \"enableLogRotation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"tableTo\": \"preview_deployments\",\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"tableTo\": \"preview_deployments\",\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_adminId_admin_adminId_fk\": {\n          \"name\": \"certificate_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_adminId_admin_adminId_fk\": {\n          \"name\": \"notification_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_adminId_admin_adminId_fk\": {\n          \"name\": \"ssh-key_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_adminId_admin_adminId_fk\": {\n          \"name\": \"git_provider_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_adminId_admin_adminId_fk\": {\n          \"name\": \"server_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"tableTo\": \"domain\",\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"25bbf903-8f16-4a7e-977c-df860c858096\",\n  \"prevId\": \"cae9f45f-2b68-45bc-b2c1-cfbe9ebb8104\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0055_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"enableLogRotation\": {\n          \"name\": \"enableLogRotation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"tableTo\": \"preview_deployments\",\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"tableTo\": \"preview_deployments\",\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_adminId_admin_adminId_fk\": {\n          \"name\": \"certificate_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_adminId_admin_adminId_fk\": {\n          \"name\": \"notification_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_adminId_admin_adminId_fk\": {\n          \"name\": \"ssh-key_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_adminId_admin_adminId_fk\": {\n          \"name\": \"git_provider_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_adminId_admin_adminId_fk\": {\n          \"name\": \"server_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"tableTo\": \"domain\",\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"21a03d52-4db6-4449-a61c-92b6ceae0bd9\",\n  \"prevId\": \"25bbf903-8f16-4a7e-977c-df860c858096\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0056_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"enableLogRotation\": {\n          \"name\": \"enableLogRotation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"tableTo\": \"preview_deployments\",\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"tableTo\": \"preview_deployments\",\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_adminId_admin_adminId_fk\": {\n          \"name\": \"certificate_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"tableTo\": \"gotify\",\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_adminId_admin_adminId_fk\": {\n          \"name\": \"notification_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_adminId_admin_adminId_fk\": {\n          \"name\": \"ssh-key_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_adminId_admin_adminId_fk\": {\n          \"name\": \"git_provider_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_adminId_admin_adminId_fk\": {\n          \"name\": \"server_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"tableTo\": \"domain\",\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"24787a88-0754-437a-b077-03a3265b8ef5\",\n  \"prevId\": \"21a03d52-4db6-4449-a61c-92b6ceae0bd9\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0057_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"enableLogRotation\": {\n          \"name\": \"enableLogRotation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"tableTo\": \"preview_deployments\",\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"tableTo\": \"preview_deployments\",\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_adminId_admin_adminId_fk\": {\n          \"name\": \"certificate_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"tableTo\": \"gotify\",\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_adminId_admin_adminId_fk\": {\n          \"name\": \"notification_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_adminId_admin_adminId_fk\": {\n          \"name\": \"ssh-key_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_adminId_admin_adminId_fk\": {\n          \"name\": \"git_provider_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_adminId_admin_adminId_fk\": {\n          \"name\": \"server_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"tableTo\": \"domain\",\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"b00fa001-dd12-4f37-97dc-478c7a790779\",\n  \"prevId\": \"24787a88-0754-437a-b077-03a3265b8ef5\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0058_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"enableLogRotation\": {\n          \"name\": \"enableLogRotation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"tableTo\": \"preview_deployments\",\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"tableTo\": \"preview_deployments\",\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_adminId_admin_adminId_fk\": {\n          \"name\": \"certificate_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"tableTo\": \"gotify\",\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_adminId_admin_adminId_fk\": {\n          \"name\": \"notification_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_adminId_admin_adminId_fk\": {\n          \"name\": \"ssh-key_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_adminId_admin_adminId_fk\": {\n          \"name\": \"git_provider_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_adminId_admin_adminId_fk\": {\n          \"name\": \"server_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"tableTo\": \"domain\",\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"fdb721ab-5cc8-4063-a3ca-6437b046669c\",\n  \"prevId\": \"b00fa001-dd12-4f37-97dc-478c7a790779\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0059_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"enableLogRotation\": {\n          \"name\": \"enableLogRotation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"tableTo\": \"preview_deployments\",\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"tableTo\": \"preview_deployments\",\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_adminId_admin_adminId_fk\": {\n          \"name\": \"certificate_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"tableTo\": \"gotify\",\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_adminId_admin_adminId_fk\": {\n          \"name\": \"notification_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_adminId_admin_adminId_fk\": {\n          \"name\": \"ssh-key_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_adminId_admin_adminId_fk\": {\n          \"name\": \"git_provider_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_adminId_admin_adminId_fk\": {\n          \"name\": \"server_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"tableTo\": \"domain\",\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"8492fecb-69a3-4efb-86b1-7bbc62e1eba8\",\n  \"prevId\": \"fdb721ab-5cc8-4063-a3ca-6437b046669c\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0060_snapshot.json",
    "content": "{\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"enableLogRotation\": {\n          \"name\": \"enableLogRotation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"tableTo\": \"preview_deployments\",\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"tableTo\": \"preview_deployments\",\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_adminId_admin_adminId_fk\": {\n          \"name\": \"certificate_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"auth\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"tableTo\": \"gotify\",\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_adminId_admin_adminId_fk\": {\n          \"name\": \"notification_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_adminId_admin_adminId_fk\": {\n          \"name\": \"ssh-key_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_adminId_admin_adminId_fk\": {\n          \"name\": \"git_provider_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_adminId_admin_adminId_fk\": {\n          \"name\": \"server_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"tableTo\": \"admin\",\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"tableTo\": \"domain\",\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"isRLSEnabled\": false,\n      \"checkConstraints\": {}\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"_meta\": {\n    \"schemas\": {},\n    \"tables\": {},\n    \"columns\": {}\n  },\n  \"id\": \"1f4eada1-a120-490d-a152-2fc7a81eee7a\",\n  \"prevId\": \"8492fecb-69a3-4efb-86b1-7bbc62e1eba8\",\n  \"sequences\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"roles\": {}\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0061_snapshot.json",
    "content": "{\n  \"id\": \"5ec4c091-a361-4acb-ae2b-dff5078d77f0\",\n  \"prevId\": \"1f4eada1-a120-490d-a152-2fc7a81eee7a\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"tableTo\": \"auth\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"enableLogRotation\": {\n          \"name\": \"enableLogRotation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"refreshRate\\\":20,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":20,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"tableTo\": \"auth\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_adminId_admin_adminId_fk\": {\n          \"name\": \"certificate_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"tableTo\": \"auth\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_adminId_admin_adminId_fk\": {\n          \"name\": \"notification_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_adminId_admin_adminId_fk\": {\n          \"name\": \"ssh-key_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_adminId_admin_adminId_fk\": {\n          \"name\": \"git_provider_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"refreshRate\\\":20,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":20,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_adminId_admin_adminId_fk\": {\n          \"name\": \"server_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0062_snapshot.json",
    "content": "{\n  \"id\": \"a000faa7-0776-43cd-b394-48210be90be1\",\n  \"prevId\": \"5ec4c091-a361-4acb-ae2b-dff5078d77f0\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"tableTo\": \"auth\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"enableLogRotation\": {\n          \"name\": \"enableLogRotation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":20,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":20,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"tableTo\": \"auth\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_adminId_admin_adminId_fk\": {\n          \"name\": \"certificate_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"tableTo\": \"auth\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_adminId_admin_adminId_fk\": {\n          \"name\": \"notification_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_adminId_admin_adminId_fk\": {\n          \"name\": \"ssh-key_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_adminId_admin_adminId_fk\": {\n          \"name\": \"git_provider_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":20,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":20,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_adminId_admin_adminId_fk\": {\n          \"name\": \"server_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0063_snapshot.json",
    "content": "{\n  \"id\": \"f2fb7162-4b29-4494-9f6a-ab2794b1be48\",\n  \"prevId\": \"a000faa7-0776-43cd-b394-48210be90be1\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"tableTo\": \"auth\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"enableLogRotation\": {\n          \"name\": \"enableLogRotation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"tableTo\": \"auth\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_adminId_admin_adminId_fk\": {\n          \"name\": \"certificate_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"tableTo\": \"auth\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_adminId_admin_adminId_fk\": {\n          \"name\": \"notification_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_adminId_admin_adminId_fk\": {\n          \"name\": \"ssh-key_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_adminId_admin_adminId_fk\": {\n          \"name\": \"git_provider_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_adminId_admin_adminId_fk\": {\n          \"name\": \"server_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0064_snapshot.json",
    "content": "{\n  \"id\": \"c9ab7857-cc4c-475f-bd11-5f14f11017cc\",\n  \"prevId\": \"f2fb7162-4b29-4494-9f6a-ab2794b1be48\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"tableTo\": \"auth\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"enableLogRotation\": {\n          \"name\": \"enableLogRotation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"tableTo\": \"auth\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_adminId_admin_adminId_fk\": {\n          \"name\": \"certificate_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"tableTo\": \"auth\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"deployable\": {\n          \"name\": \"deployable\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_adminId_admin_adminId_fk\": {\n          \"name\": \"notification_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_adminId_admin_adminId_fk\": {\n          \"name\": \"ssh-key_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_adminId_admin_adminId_fk\": {\n          \"name\": \"git_provider_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_adminId_admin_adminId_fk\": {\n          \"name\": \"server_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0065_snapshot.json",
    "content": "{\n  \"id\": \"1240ec96-1751-4de3-b64f-cef9cb716786\",\n  \"prevId\": \"c9ab7857-cc4c-475f-bd11-5f14f11017cc\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"timestamp(3)\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"user_adminId_admin_adminId_fk\": {\n          \"name\": \"user_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"user\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"user_authId_auth_id_fk\": {\n          \"name\": \"user_authId_auth_id_fk\",\n          \"tableFrom\": \"user\",\n          \"tableTo\": \"auth\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.admin\": {\n      \"name\": \"admin\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"enableLogRotation\": {\n          \"name\": \"enableLogRotation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"authId\": {\n          \"name\": \"authId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"admin_authId_auth_id_fk\": {\n          \"name\": \"admin_authId_auth_id_fk\",\n          \"tableFrom\": \"admin\",\n          \"tableTo\": \"auth\",\n          \"columnsFrom\": [\n            \"authId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.auth\": {\n      \"name\": \"auth\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rol\": {\n          \"name\": \"rol\",\n          \"type\": \"Roles\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"auth_email_unique\": {\n          \"name\": \"auth_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_adminId_admin_adminId_fk\": {\n          \"name\": \"project_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_adminId_admin_adminId_fk\": {\n          \"name\": \"destination_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_adminId_admin_adminId_fk\": {\n          \"name\": \"certificate_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session\": {\n      \"name\": \"session\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp with time zone\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_user_id_auth_id_fk\": {\n          \"name\": \"session_user_id_auth_id_fk\",\n          \"tableFrom\": \"session\",\n          \"tableTo\": \"auth\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_adminId_admin_adminId_fk\": {\n          \"name\": \"registry_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_adminId_admin_adminId_fk\": {\n          \"name\": \"notification_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_adminId_admin_adminId_fk\": {\n          \"name\": \"ssh-key_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_adminId_admin_adminId_fk\": {\n          \"name\": \"git_provider_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"adminId\": {\n          \"name\": \"adminId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_adminId_admin_adminId_fk\": {\n          \"name\": \"server_adminId_admin_adminId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"admin\",\n          \"columnsFrom\": [\n            \"adminId\"\n          ],\n          \"columnsTo\": [\n            \"adminId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.Roles\": {\n      \"name\": \"Roles\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"admin\",\n        \"user\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0066_snapshot.json",
    "content": "{\n  \"id\": \"c5e17a87-0aa3-4178-be24-cfa7cde0f75d\",\n  \"prevId\": \"9cb79f1e-14c2-4deb-b1ab-a1d038f72356\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"enableLogRotation\": {\n          \"name\": \"enableLogRotation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0067_snapshot.json",
    "content": "{\n  \"id\": \"ba6b8dbb-406c-4ab1-9c24-6dd2e19a9184\",\n  \"prevId\": \"c5e17a87-0aa3-4178-be24-cfa7cde0f75d\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"enableLogRotation\": {\n          \"name\": \"enableLogRotation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0068_snapshot.json",
    "content": "{\n  \"id\": \"e1cfc9dc-d89b-4fe3-b29a-8dcea6fb959d\",\n  \"prevId\": \"ba6b8dbb-406c-4ab1-9c24-6dd2e19a9184\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"enableLogRotation\": {\n          \"name\": \"enableLogRotation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0069_snapshot.json",
    "content": "{\n  \"id\": \"6247f9c0-261c-497e-97f4-c02a80687211\",\n  \"prevId\": \"e1cfc9dc-d89b-4fe3-b29a-8dcea6fb959d\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"enableLogRotation\": {\n          \"name\": \"enableLogRotation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0070_snapshot.json",
    "content": "{\n  \"id\": \"53fc370e-731b-4bfe-874f-9ce725650082\",\n  \"prevId\": \"6247f9c0-261c-497e-97f4-c02a80687211\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"enableLogRotation\": {\n          \"name\": \"enableLogRotation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0071_snapshot.json",
    "content": "{\n  \"id\": \"44cb886c-d31a-4b3d-b70e-da306c74dcf5\",\n  \"prevId\": \"53fc370e-731b-4bfe-874f-9ce725650082\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"enableLogRotation\": {\n          \"name\": \"enableLogRotation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0072_snapshot.json",
    "content": "{\n  \"id\": \"ad43c733-01c3-4841-b600-252421350fb9\",\n  \"prevId\": \"44cb886c-d31a-4b3d-b70e-da306c74dcf5\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0073_snapshot.json",
    "content": "{\n  \"id\": \"5808aed9-4223-4ac4-ae22-6c0dae500d75\",\n  \"prevId\": \"ad43c733-01c3-4841-b600-252421350fb9\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewCertificateProvider\": {\n          \"name\": \"previewCertificateProvider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0074_snapshot.json",
    "content": "{\n  \"id\": \"3584a243-55f6-418b-aece-985d878b30d7\",\n  \"prevId\": \"5808aed9-4223-4ac4-ae22-6c0dae500d75\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewCustomCertResolver\": {\n          \"name\": \"previewCustomCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0075_snapshot.json",
    "content": "{\n  \"id\": \"dd51ff04-a160-4d0d-b72f-4916493b740f\",\n  \"prevId\": \"3584a243-55f6-418b-aece-985d878b30d7\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewCustomCertResolver\": {\n          \"name\": \"previewCustomCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0076_snapshot.json",
    "content": "{\n  \"id\": \"27ba0f3d-859f-4233-a179-8aee11ad9179\",\n  \"prevId\": \"dd51ff04-a160-4d0d-b72f-4916493b740f\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewCustomCertResolver\": {\n          \"name\": \"previewCustomCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0077_snapshot.json",
    "content": "{\n  \"id\": \"d4d95ab9-16bd-4583-949e-d6ae0a0bb7a0\",\n  \"prevId\": \"27ba0f3d-859f-4233-a179-8aee11ad9179\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewCustomCertResolver\": {\n          \"name\": \"previewCustomCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0078_snapshot.json",
    "content": "{\n  \"id\": \"f74127dc-3cda-4091-988f-97b60eb22427\",\n  \"prevId\": \"d4d95ab9-16bd-4583-949e-d6ae0a0bb7a0\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewCustomCertResolver\": {\n          \"name\": \"previewCustomCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"cleanCache\": {\n          \"name\": \"cleanCache\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"drop\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0079_snapshot.json",
    "content": "{\n  \"id\": \"2237c838-128a-4e4e-8d17-12bf6cef3262\",\n  \"prevId\": \"f74127dc-3cda-4091-988f-97b60eb22427\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewCustomCertResolver\": {\n          \"name\": \"previewCustomCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"cleanCache\": {\n          \"name\": \"cleanCache\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaProjectId\": {\n          \"name\": \"giteaProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBuildPath\": {\n          \"name\": \"giteaBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"application_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"compose_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitea\": {\n      \"name\": \"gitea\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"giteaUrl\": {\n          \"name\": \"giteaUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitea.com'\"\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_id\": {\n          \"name\": \"client_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_secret\": {\n          \"name\": \"client_secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"gitea_username\": {\n          \"name\": \"gitea_username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scopes\": {\n          \"name\": \"scopes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'repo,repo:status,read:user,read:org'\"\n        },\n        \"last_authenticated_at\": {\n          \"name\": \"last_authenticated_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitea_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitea_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitea\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"drop\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0080_snapshot.json",
    "content": "{\n  \"id\": \"de0523c2-45bb-42cd-a844-4b08736d3261\",\n  \"prevId\": \"2237c838-128a-4e4e-8d17-12bf6cef3262\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewCustomCertResolver\": {\n          \"name\": \"previewCustomCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"cleanCache\": {\n          \"name\": \"cleanCache\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBuildPath\": {\n          \"name\": \"giteaBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"application_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"compose_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitea\": {\n      \"name\": \"gitea\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"giteaUrl\": {\n          \"name\": \"giteaUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitea.com'\"\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_id\": {\n          \"name\": \"client_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_secret\": {\n          \"name\": \"client_secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"gitea_username\": {\n          \"name\": \"gitea_username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scopes\": {\n          \"name\": \"scopes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'repo,repo:status,read:user,read:org'\"\n        },\n        \"last_authenticated_at\": {\n          \"name\": \"last_authenticated_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitea_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitea_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitea\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"drop\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0081_snapshot.json",
    "content": "{\n  \"id\": \"53951abf-225c-4c04-bdc6-857818765253\",\n  \"prevId\": \"de0523c2-45bb-42cd-a844-4b08736d3261\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewCustomCertResolver\": {\n          \"name\": \"previewCustomCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"cleanCache\": {\n          \"name\": \"cleanCache\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBuildPath\": {\n          \"name\": \"giteaBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"application_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"compose_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitea\": {\n      \"name\": \"gitea\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"giteaUrl\": {\n          \"name\": \"giteaUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitea.com'\"\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_id\": {\n          \"name\": \"client_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_secret\": {\n          \"name\": \"client_secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scopes\": {\n          \"name\": \"scopes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'repo,repo:status,read:user,read:org'\"\n        },\n        \"last_authenticated_at\": {\n          \"name\": \"last_authenticated_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitea_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitea_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitea\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"drop\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0082_snapshot.json",
    "content": "{\n  \"id\": \"02e1e70f-17f2-4c05-a5b6-3413dba01bcd\",\n  \"prevId\": \"53951abf-225c-4c04-bdc6-857818765253\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewCustomCertResolver\": {\n          \"name\": \"previewCustomCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"cleanCache\": {\n          \"name\": \"cleanCache\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBuildPath\": {\n          \"name\": \"giteaBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"application_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_userId_user_temp_id_fk\": {\n          \"name\": \"backup_userId_user_temp_id_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"no action\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"compose_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitea\": {\n      \"name\": \"gitea\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"giteaUrl\": {\n          \"name\": \"giteaUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitea.com'\"\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_id\": {\n          \"name\": \"client_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_secret\": {\n          \"name\": \"client_secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scopes\": {\n          \"name\": \"scopes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'repo,repo:status,read:user,read:org'\"\n        },\n        \"last_authenticated_at\": {\n          \"name\": \"last_authenticated_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitea_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitea_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitea\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"drop\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0083_snapshot.json",
    "content": "{\n  \"id\": \"9394a271-5c8c-4d8a-901f-77a32f1e4378\",\n  \"prevId\": \"02e1e70f-17f2-4c05-a5b6-3413dba01bcd\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewCustomCertResolver\": {\n          \"name\": \"previewCustomCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"cleanCache\": {\n          \"name\": \"cleanCache\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBuildPath\": {\n          \"name\": \"giteaBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"application_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_userId_user_temp_id_fk\": {\n          \"name\": \"backup_userId_user_temp_id_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"no action\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"compose_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitea\": {\n      \"name\": \"gitea\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"giteaUrl\": {\n          \"name\": \"giteaUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitea.com'\"\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_id\": {\n          \"name\": \"client_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_secret\": {\n          \"name\": \"client_secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scopes\": {\n          \"name\": \"scopes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'repo,repo:status,read:user,read:org'\"\n        },\n        \"last_authenticated_at\": {\n          \"name\": \"last_authenticated_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitea_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitea_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitea\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"drop\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\",\n        \"web-server\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0084_snapshot.json",
    "content": "{\n  \"id\": \"993df3e4-8b61-42b3-a56e-50a8c0c55d31\",\n  \"prevId\": \"9394a271-5c8c-4d8a-901f-77a32f1e4378\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewCustomCertResolver\": {\n          \"name\": \"previewCustomCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"cleanCache\": {\n          \"name\": \"cleanCache\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBuildPath\": {\n          \"name\": \"giteaBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"application_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_userId_user_temp_id_fk\": {\n          \"name\": \"backup_userId_user_temp_id_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"no action\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"compose_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitea\": {\n      \"name\": \"gitea\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"giteaUrl\": {\n          \"name\": \"giteaUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitea.com'\"\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_id\": {\n          \"name\": \"client_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_secret\": {\n          \"name\": \"client_secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scopes\": {\n          \"name\": \"scopes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'repo,repo:status,read:user,read:org'\"\n        },\n        \"last_authenticated_at\": {\n          \"name\": \"last_authenticated_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitea_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitea_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitea\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"drop\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\",\n        \"web-server\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0085_snapshot.json",
    "content": "{\n  \"id\": \"7fc77772-9221-46de-9079-b9206cdc0261\",\n  \"prevId\": \"993df3e4-8b61-42b3-a56e-50a8c0c55d31\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewCustomCertResolver\": {\n          \"name\": \"previewCustomCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"cleanCache\": {\n          \"name\": \"cleanCache\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBuildPath\": {\n          \"name\": \"giteaBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"application_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_userId_user_temp_id_fk\": {\n          \"name\": \"backup_userId_user_temp_id_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"no action\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"compose_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitea\": {\n      \"name\": \"gitea\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"giteaUrl\": {\n          \"name\": \"giteaUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitea.com'\"\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_id\": {\n          \"name\": \"client_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_secret\": {\n          \"name\": \"client_secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scopes\": {\n          \"name\": \"scopes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'repo,repo:status,read:user,read:org'\"\n        },\n        \"last_authenticated_at\": {\n          \"name\": \"last_authenticated_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitea_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitea_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitea\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"drop\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\",\n        \"web-server\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0086_snapshot.json",
    "content": "{\n  \"id\": \"4beeac91-91be-4f09-a2a2-b6efcfe66796\",\n  \"prevId\": \"7fc77772-9221-46de-9079-b9206cdc0261\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewCustomCertResolver\": {\n          \"name\": \"previewCustomCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"cleanCache\": {\n          \"name\": \"cleanCache\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBuildPath\": {\n          \"name\": \"giteaBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"application_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_userId_user_temp_id_fk\": {\n          \"name\": \"backup_userId_user_temp_id_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"no action\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"compose_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitea\": {\n      \"name\": \"gitea\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"giteaUrl\": {\n          \"name\": \"giteaUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitea.com'\"\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_id\": {\n          \"name\": \"client_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_secret\": {\n          \"name\": \"client_secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scopes\": {\n          \"name\": \"scopes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'repo,repo:status,read:user,read:org'\"\n        },\n        \"last_authenticated_at\": {\n          \"name\": \"last_authenticated_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitea_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitea_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitea\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"drop\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\",\n        \"web-server\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0087_snapshot.json",
    "content": "{\n  \"id\": \"7fb3716c-3cc6-4b18-b8d1-762844da26be\",\n  \"prevId\": \"4beeac91-91be-4f09-a2a2-b6efcfe66796\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewCustomCertResolver\": {\n          \"name\": \"previewCustomCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"cleanCache\": {\n          \"name\": \"cleanCache\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBuildPath\": {\n          \"name\": \"giteaBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"application_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_userId_user_temp_id_fk\": {\n          \"name\": \"backup_userId_user_temp_id_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"no action\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"compose_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitea\": {\n      \"name\": \"gitea\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"giteaUrl\": {\n          \"name\": \"giteaUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitea.com'\"\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_id\": {\n          \"name\": \"client_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_secret\": {\n          \"name\": \"client_secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scopes\": {\n          \"name\": \"scopes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'repo,repo:status,read:user,read:org'\"\n        },\n        \"last_authenticated_at\": {\n          \"name\": \"last_authenticated_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitea_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitea_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitea\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"drop\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\",\n        \"web-server\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.triggerType\": {\n      \"name\": \"triggerType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"push\",\n        \"tag\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0088_snapshot.json",
    "content": "{\n  \"id\": \"c7eae4ce-5acc-439b-962f-bb2ef8922187\",\n  \"prevId\": \"7fb3716c-3cc6-4b18-b8d1-762844da26be\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewCustomCertResolver\": {\n          \"name\": \"previewCustomCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"cleanCache\": {\n          \"name\": \"cleanCache\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBuildPath\": {\n          \"name\": \"giteaBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"application_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_userId_user_temp_id_fk\": {\n          \"name\": \"backup_userId_user_temp_id_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"no action\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"startedAt\": {\n          \"name\": \"startedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"finishedAt\": {\n          \"name\": \"finishedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_scheduleId_schedule_scheduleId_fk\": {\n          \"name\": \"deployment_scheduleId_schedule_scheduleId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"schedule\",\n          \"columnsFrom\": [\n            \"scheduleId\"\n          ],\n          \"columnsTo\": [\n            \"scheduleId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"compose_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitea\": {\n      \"name\": \"gitea\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"giteaUrl\": {\n          \"name\": \"giteaUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitea.com'\"\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_id\": {\n          \"name\": \"client_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_secret\": {\n          \"name\": \"client_secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scopes\": {\n          \"name\": \"scopes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'repo,repo:status,read:user,read:org'\"\n        },\n        \"last_authenticated_at\": {\n          \"name\": \"last_authenticated_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitea_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitea_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitea\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.schedule\": {\n      \"name\": \"schedule\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"cronExpression\": {\n          \"name\": \"cronExpression\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"shellType\": {\n          \"name\": \"shellType\",\n          \"type\": \"shellType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'bash'\"\n        },\n        \"scheduleType\": {\n          \"name\": \"scheduleType\",\n          \"type\": \"scheduleType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"script\": {\n          \"name\": \"script\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"schedule_applicationId_application_applicationId_fk\": {\n          \"name\": \"schedule_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_composeId_compose_composeId_fk\": {\n          \"name\": \"schedule_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_serverId_server_serverId_fk\": {\n          \"name\": \"schedule_serverId_server_serverId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_userId_user_temp_id_fk\": {\n          \"name\": \"schedule_userId_user_temp_id_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"drop\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\",\n        \"web-server\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.triggerType\": {\n      \"name\": \"triggerType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"push\",\n        \"tag\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    },\n    \"public.scheduleType\": {\n      \"name\": \"scheduleType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"compose\",\n        \"server\",\n        \"dokploy-server\"\n      ]\n    },\n    \"public.shellType\": {\n      \"name\": \"shellType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bash\",\n        \"sh\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0089_snapshot.json",
    "content": "{\n  \"id\": \"3ec09926-2da4-41c9-8eae-8ef6b023035e\",\n  \"prevId\": \"c7eae4ce-5acc-439b-962f-bb2ef8922187\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewCustomCertResolver\": {\n          \"name\": \"previewCustomCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"cleanCache\": {\n          \"name\": \"cleanCache\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBuildPath\": {\n          \"name\": \"giteaBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"application_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupType\": {\n          \"name\": \"backupType\",\n          \"type\": \"backupType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'database'\"\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_composeId_compose_composeId_fk\": {\n          \"name\": \"backup_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_userId_user_temp_id_fk\": {\n          \"name\": \"backup_userId_user_temp_id_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"no action\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"backup_appName_unique\": {\n          \"name\": \"backup_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"startedAt\": {\n          \"name\": \"startedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"finishedAt\": {\n          \"name\": \"finishedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_scheduleId_schedule_scheduleId_fk\": {\n          \"name\": \"deployment_scheduleId_schedule_scheduleId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"schedule\",\n          \"columnsFrom\": [\n            \"scheduleId\"\n          ],\n          \"columnsTo\": [\n            \"scheduleId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_backupId_backup_backupId_fk\": {\n          \"name\": \"deployment_backupId_backup_backupId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"backup\",\n          \"columnsFrom\": [\n            \"backupId\"\n          ],\n          \"columnsTo\": [\n            \"backupId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"compose_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitea\": {\n      \"name\": \"gitea\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"giteaUrl\": {\n          \"name\": \"giteaUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitea.com'\"\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_id\": {\n          \"name\": \"client_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_secret\": {\n          \"name\": \"client_secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scopes\": {\n          \"name\": \"scopes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'repo,repo:status,read:user,read:org'\"\n        },\n        \"last_authenticated_at\": {\n          \"name\": \"last_authenticated_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitea_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitea_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitea\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.schedule\": {\n      \"name\": \"schedule\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"cronExpression\": {\n          \"name\": \"cronExpression\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"shellType\": {\n          \"name\": \"shellType\",\n          \"type\": \"shellType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'bash'\"\n        },\n        \"scheduleType\": {\n          \"name\": \"scheduleType\",\n          \"type\": \"scheduleType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"script\": {\n          \"name\": \"script\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"schedule_applicationId_application_applicationId_fk\": {\n          \"name\": \"schedule_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_composeId_compose_composeId_fk\": {\n          \"name\": \"schedule_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_serverId_server_serverId_fk\": {\n          \"name\": \"schedule_serverId_server_serverId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_userId_user_temp_id_fk\": {\n          \"name\": \"schedule_userId_user_temp_id_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"drop\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.backupType\": {\n      \"name\": \"backupType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"database\",\n        \"compose\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\",\n        \"web-server\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.triggerType\": {\n      \"name\": \"triggerType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"push\",\n        \"tag\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    },\n    \"public.scheduleType\": {\n      \"name\": \"scheduleType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"compose\",\n        \"server\",\n        \"dokploy-server\"\n      ]\n    },\n    \"public.shellType\": {\n      \"name\": \"shellType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bash\",\n        \"sh\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0090_snapshot.json",
    "content": "{\n  \"id\": \"f8b568f0-83c1-4cfb-95c9-ab6b5b5bce18\",\n  \"prevId\": \"3ec09926-2da4-41c9-8eae-8ef6b023035e\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewCustomCertResolver\": {\n          \"name\": \"previewCustomCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"cleanCache\": {\n          \"name\": \"cleanCache\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBuildPath\": {\n          \"name\": \"giteaBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"application_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"allowImpersonation\": {\n          \"name\": \"allowImpersonation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupType\": {\n          \"name\": \"backupType\",\n          \"type\": \"backupType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'database'\"\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_composeId_compose_composeId_fk\": {\n          \"name\": \"backup_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_userId_user_temp_id_fk\": {\n          \"name\": \"backup_userId_user_temp_id_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"no action\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"backup_appName_unique\": {\n          \"name\": \"backup_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"startedAt\": {\n          \"name\": \"startedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"finishedAt\": {\n          \"name\": \"finishedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_scheduleId_schedule_scheduleId_fk\": {\n          \"name\": \"deployment_scheduleId_schedule_scheduleId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"schedule\",\n          \"columnsFrom\": [\n            \"scheduleId\"\n          ],\n          \"columnsTo\": [\n            \"scheduleId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_backupId_backup_backupId_fk\": {\n          \"name\": \"deployment_backupId_backup_backupId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"backup\",\n          \"columnsFrom\": [\n            \"backupId\"\n          ],\n          \"columnsTo\": [\n            \"backupId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"compose_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitea\": {\n      \"name\": \"gitea\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"giteaUrl\": {\n          \"name\": \"giteaUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitea.com'\"\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_id\": {\n          \"name\": \"client_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_secret\": {\n          \"name\": \"client_secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scopes\": {\n          \"name\": \"scopes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'repo,repo:status,read:user,read:org'\"\n        },\n        \"last_authenticated_at\": {\n          \"name\": \"last_authenticated_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitea_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitea_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitea\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.schedule\": {\n      \"name\": \"schedule\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"cronExpression\": {\n          \"name\": \"cronExpression\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"shellType\": {\n          \"name\": \"shellType\",\n          \"type\": \"shellType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'bash'\"\n        },\n        \"scheduleType\": {\n          \"name\": \"scheduleType\",\n          \"type\": \"scheduleType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"script\": {\n          \"name\": \"script\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"schedule_applicationId_application_applicationId_fk\": {\n          \"name\": \"schedule_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_composeId_compose_composeId_fk\": {\n          \"name\": \"schedule_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_serverId_server_serverId_fk\": {\n          \"name\": \"schedule_serverId_server_serverId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_userId_user_temp_id_fk\": {\n          \"name\": \"schedule_userId_user_temp_id_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"drop\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.backupType\": {\n      \"name\": \"backupType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"database\",\n        \"compose\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\",\n        \"web-server\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.triggerType\": {\n      \"name\": \"triggerType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"push\",\n        \"tag\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    },\n    \"public.scheduleType\": {\n      \"name\": \"scheduleType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"compose\",\n        \"server\",\n        \"dokploy-server\"\n      ]\n    },\n    \"public.shellType\": {\n      \"name\": \"shellType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bash\",\n        \"sh\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0091_snapshot.json",
    "content": "{\n  \"id\": \"44727182-5496-4560-912d-534edcdb7f69\",\n  \"prevId\": \"f8b568f0-83c1-4cfb-95c9-ab6b5b5bce18\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewCustomCertResolver\": {\n          \"name\": \"previewCustomCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"cleanCache\": {\n          \"name\": \"cleanCache\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBuildPath\": {\n          \"name\": \"giteaBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"application_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'user'\"\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"allowImpersonation\": {\n          \"name\": \"allowImpersonation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupType\": {\n          \"name\": \"backupType\",\n          \"type\": \"backupType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'database'\"\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_composeId_compose_composeId_fk\": {\n          \"name\": \"backup_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_userId_user_temp_id_fk\": {\n          \"name\": \"backup_userId_user_temp_id_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"no action\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"backup_appName_unique\": {\n          \"name\": \"backup_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"startedAt\": {\n          \"name\": \"startedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"finishedAt\": {\n          \"name\": \"finishedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_scheduleId_schedule_scheduleId_fk\": {\n          \"name\": \"deployment_scheduleId_schedule_scheduleId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"schedule\",\n          \"columnsFrom\": [\n            \"scheduleId\"\n          ],\n          \"columnsTo\": [\n            \"scheduleId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_backupId_backup_backupId_fk\": {\n          \"name\": \"deployment_backupId_backup_backupId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"backup\",\n          \"columnsFrom\": [\n            \"backupId\"\n          ],\n          \"columnsTo\": [\n            \"backupId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"compose_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitea\": {\n      \"name\": \"gitea\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"giteaUrl\": {\n          \"name\": \"giteaUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitea.com'\"\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_id\": {\n          \"name\": \"client_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_secret\": {\n          \"name\": \"client_secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scopes\": {\n          \"name\": \"scopes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'repo,repo:status,read:user,read:org'\"\n        },\n        \"last_authenticated_at\": {\n          \"name\": \"last_authenticated_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitea_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitea_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitea\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.schedule\": {\n      \"name\": \"schedule\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"cronExpression\": {\n          \"name\": \"cronExpression\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"shellType\": {\n          \"name\": \"shellType\",\n          \"type\": \"shellType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'bash'\"\n        },\n        \"scheduleType\": {\n          \"name\": \"scheduleType\",\n          \"type\": \"scheduleType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"script\": {\n          \"name\": \"script\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"schedule_applicationId_application_applicationId_fk\": {\n          \"name\": \"schedule_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_composeId_compose_composeId_fk\": {\n          \"name\": \"schedule_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_serverId_server_serverId_fk\": {\n          \"name\": \"schedule_serverId_server_serverId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_userId_user_temp_id_fk\": {\n          \"name\": \"schedule_userId_user_temp_id_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"drop\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.backupType\": {\n      \"name\": \"backupType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"database\",\n        \"compose\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\",\n        \"web-server\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.triggerType\": {\n      \"name\": \"triggerType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"push\",\n        \"tag\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    },\n    \"public.scheduleType\": {\n      \"name\": \"scheduleType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"compose\",\n        \"server\",\n        \"dokploy-server\"\n      ]\n    },\n    \"public.shellType\": {\n      \"name\": \"shellType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bash\",\n        \"sh\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0092_snapshot.json",
    "content": "{\n  \"id\": \"76eb8fe3-21c0-4544-962c-1ae18e8e6730\",\n  \"prevId\": \"44727182-5496-4560-912d-534edcdb7f69\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewCustomCertResolver\": {\n          \"name\": \"previewCustomCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"cleanCache\": {\n          \"name\": \"cleanCache\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBuildPath\": {\n          \"name\": \"giteaBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isStaticSpa\": {\n          \"name\": \"isStaticSpa\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"application_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'user'\"\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"allowImpersonation\": {\n          \"name\": \"allowImpersonation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupType\": {\n          \"name\": \"backupType\",\n          \"type\": \"backupType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'database'\"\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_composeId_compose_composeId_fk\": {\n          \"name\": \"backup_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_userId_user_temp_id_fk\": {\n          \"name\": \"backup_userId_user_temp_id_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"no action\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"backup_appName_unique\": {\n          \"name\": \"backup_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"startedAt\": {\n          \"name\": \"startedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"finishedAt\": {\n          \"name\": \"finishedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_scheduleId_schedule_scheduleId_fk\": {\n          \"name\": \"deployment_scheduleId_schedule_scheduleId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"schedule\",\n          \"columnsFrom\": [\n            \"scheduleId\"\n          ],\n          \"columnsTo\": [\n            \"scheduleId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_backupId_backup_backupId_fk\": {\n          \"name\": \"deployment_backupId_backup_backupId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"backup\",\n          \"columnsFrom\": [\n            \"backupId\"\n          ],\n          \"columnsTo\": [\n            \"backupId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"compose_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitea\": {\n      \"name\": \"gitea\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"giteaUrl\": {\n          \"name\": \"giteaUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitea.com'\"\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_id\": {\n          \"name\": \"client_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_secret\": {\n          \"name\": \"client_secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scopes\": {\n          \"name\": \"scopes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'repo,repo:status,read:user,read:org'\"\n        },\n        \"last_authenticated_at\": {\n          \"name\": \"last_authenticated_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitea_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitea_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitea\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.schedule\": {\n      \"name\": \"schedule\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"cronExpression\": {\n          \"name\": \"cronExpression\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"shellType\": {\n          \"name\": \"shellType\",\n          \"type\": \"shellType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'bash'\"\n        },\n        \"scheduleType\": {\n          \"name\": \"scheduleType\",\n          \"type\": \"scheduleType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"script\": {\n          \"name\": \"script\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"schedule_applicationId_application_applicationId_fk\": {\n          \"name\": \"schedule_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_composeId_compose_composeId_fk\": {\n          \"name\": \"schedule_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_serverId_server_serverId_fk\": {\n          \"name\": \"schedule_serverId_server_serverId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_userId_user_temp_id_fk\": {\n          \"name\": \"schedule_userId_user_temp_id_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"drop\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.backupType\": {\n      \"name\": \"backupType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"database\",\n        \"compose\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\",\n        \"web-server\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.triggerType\": {\n      \"name\": \"triggerType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"push\",\n        \"tag\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    },\n    \"public.scheduleType\": {\n      \"name\": \"scheduleType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"compose\",\n        \"server\",\n        \"dokploy-server\"\n      ]\n    },\n    \"public.shellType\": {\n      \"name\": \"shellType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bash\",\n        \"sh\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0093_snapshot.json",
    "content": "{\n  \"id\": \"9df38a75-e90e-4dff-9f41-9152e331fb16\",\n  \"prevId\": \"76eb8fe3-21c0-4544-962c-1ae18e8e6730\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewCustomCertResolver\": {\n          \"name\": \"previewCustomCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"cleanCache\": {\n          \"name\": \"cleanCache\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBuildPath\": {\n          \"name\": \"giteaBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isStaticSpa\": {\n          \"name\": \"isStaticSpa\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"application_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'0 0 * * *'\"\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'user'\"\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"allowImpersonation\": {\n          \"name\": \"allowImpersonation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupType\": {\n          \"name\": \"backupType\",\n          \"type\": \"backupType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'database'\"\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_composeId_compose_composeId_fk\": {\n          \"name\": \"backup_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_userId_user_temp_id_fk\": {\n          \"name\": \"backup_userId_user_temp_id_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"no action\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"backup_appName_unique\": {\n          \"name\": \"backup_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"startedAt\": {\n          \"name\": \"startedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"finishedAt\": {\n          \"name\": \"finishedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_scheduleId_schedule_scheduleId_fk\": {\n          \"name\": \"deployment_scheduleId_schedule_scheduleId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"schedule\",\n          \"columnsFrom\": [\n            \"scheduleId\"\n          ],\n          \"columnsTo\": [\n            \"scheduleId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_backupId_backup_backupId_fk\": {\n          \"name\": \"deployment_backupId_backup_backupId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"backup\",\n          \"columnsFrom\": [\n            \"backupId\"\n          ],\n          \"columnsTo\": [\n            \"backupId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"compose_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitea\": {\n      \"name\": \"gitea\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"giteaUrl\": {\n          \"name\": \"giteaUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitea.com'\"\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_id\": {\n          \"name\": \"client_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_secret\": {\n          \"name\": \"client_secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scopes\": {\n          \"name\": \"scopes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'repo,repo:status,read:user,read:org'\"\n        },\n        \"last_authenticated_at\": {\n          \"name\": \"last_authenticated_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitea_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitea_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitea\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.schedule\": {\n      \"name\": \"schedule\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"cronExpression\": {\n          \"name\": \"cronExpression\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"shellType\": {\n          \"name\": \"shellType\",\n          \"type\": \"shellType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'bash'\"\n        },\n        \"scheduleType\": {\n          \"name\": \"scheduleType\",\n          \"type\": \"scheduleType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"script\": {\n          \"name\": \"script\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"schedule_applicationId_application_applicationId_fk\": {\n          \"name\": \"schedule_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_composeId_compose_composeId_fk\": {\n          \"name\": \"schedule_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_serverId_server_serverId_fk\": {\n          \"name\": \"schedule_serverId_server_serverId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_userId_user_temp_id_fk\": {\n          \"name\": \"schedule_userId_user_temp_id_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"drop\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.backupType\": {\n      \"name\": \"backupType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"database\",\n        \"compose\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\",\n        \"web-server\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.triggerType\": {\n      \"name\": \"triggerType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"push\",\n        \"tag\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    },\n    \"public.scheduleType\": {\n      \"name\": \"scheduleType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"compose\",\n        \"server\",\n        \"dokploy-server\"\n      ]\n    },\n    \"public.shellType\": {\n      \"name\": \"shellType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bash\",\n        \"sh\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0094_snapshot.json",
    "content": "{\n  \"id\": \"ab6d4705-f0da-4949-b0dc-403abece1a3e\",\n  \"prevId\": \"9df38a75-e90e-4dff-9f41-9152e331fb16\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewCustomCertResolver\": {\n          \"name\": \"previewCustomCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"cleanCache\": {\n          \"name\": \"cleanCache\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBuildPath\": {\n          \"name\": \"giteaBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isStaticSpa\": {\n          \"name\": \"isStaticSpa\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"application_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'0 0 * * *'\"\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'user'\"\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"allowImpersonation\": {\n          \"name\": \"allowImpersonation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupType\": {\n          \"name\": \"backupType\",\n          \"type\": \"backupType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'database'\"\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_composeId_compose_composeId_fk\": {\n          \"name\": \"backup_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_userId_user_temp_id_fk\": {\n          \"name\": \"backup_userId_user_temp_id_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"no action\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"backup_appName_unique\": {\n          \"name\": \"backup_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"startedAt\": {\n          \"name\": \"startedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"finishedAt\": {\n          \"name\": \"finishedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_scheduleId_schedule_scheduleId_fk\": {\n          \"name\": \"deployment_scheduleId_schedule_scheduleId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"schedule\",\n          \"columnsFrom\": [\n            \"scheduleId\"\n          ],\n          \"columnsTo\": [\n            \"scheduleId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_backupId_backup_backupId_fk\": {\n          \"name\": \"deployment_backupId_backup_backupId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"backup\",\n          \"columnsFrom\": [\n            \"backupId\"\n          ],\n          \"columnsTo\": [\n            \"backupId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"compose_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"git_provider_userId_user_temp_id_fk\": {\n          \"name\": \"git_provider_userId_user_temp_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitea\": {\n      \"name\": \"gitea\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"giteaUrl\": {\n          \"name\": \"giteaUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitea.com'\"\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_id\": {\n          \"name\": \"client_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_secret\": {\n          \"name\": \"client_secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scopes\": {\n          \"name\": \"scopes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'repo,repo:status,read:user,read:org'\"\n        },\n        \"last_authenticated_at\": {\n          \"name\": \"last_authenticated_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitea_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitea_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitea\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.schedule\": {\n      \"name\": \"schedule\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"cronExpression\": {\n          \"name\": \"cronExpression\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"shellType\": {\n          \"name\": \"shellType\",\n          \"type\": \"shellType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'bash'\"\n        },\n        \"scheduleType\": {\n          \"name\": \"scheduleType\",\n          \"type\": \"scheduleType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"script\": {\n          \"name\": \"script\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"schedule_applicationId_application_applicationId_fk\": {\n          \"name\": \"schedule_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_composeId_compose_composeId_fk\": {\n          \"name\": \"schedule_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_serverId_server_serverId_fk\": {\n          \"name\": \"schedule_serverId_server_serverId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_userId_user_temp_id_fk\": {\n          \"name\": \"schedule_userId_user_temp_id_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"drop\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.backupType\": {\n      \"name\": \"backupType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"database\",\n        \"compose\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\",\n        \"web-server\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.triggerType\": {\n      \"name\": \"triggerType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"push\",\n        \"tag\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    },\n    \"public.scheduleType\": {\n      \"name\": \"scheduleType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"compose\",\n        \"server\",\n        \"dokploy-server\"\n      ]\n    },\n    \"public.shellType\": {\n      \"name\": \"shellType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bash\",\n        \"sh\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0095_snapshot.json",
    "content": "{\n  \"id\": \"17e7fed2-ce4e-4d2e-912e-1316f1c10fd4\",\n  \"prevId\": \"ab6d4705-f0da-4949-b0dc-403abece1a3e\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewCustomCertResolver\": {\n          \"name\": \"previewCustomCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"rollbackActive\": {\n          \"name\": \"rollbackActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"cleanCache\": {\n          \"name\": \"cleanCache\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBuildPath\": {\n          \"name\": \"giteaBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isStaticSpa\": {\n          \"name\": \"isStaticSpa\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"application_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'0 0 * * *'\"\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'user'\"\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"allowImpersonation\": {\n          \"name\": \"allowImpersonation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupType\": {\n          \"name\": \"backupType\",\n          \"type\": \"backupType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'database'\"\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_composeId_compose_composeId_fk\": {\n          \"name\": \"backup_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_userId_user_temp_id_fk\": {\n          \"name\": \"backup_userId_user_temp_id_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"no action\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"backup_appName_unique\": {\n          \"name\": \"backup_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"startedAt\": {\n          \"name\": \"startedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"finishedAt\": {\n          \"name\": \"finishedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackId\": {\n          \"name\": \"rollbackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_scheduleId_schedule_scheduleId_fk\": {\n          \"name\": \"deployment_scheduleId_schedule_scheduleId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"schedule\",\n          \"columnsFrom\": [\n            \"scheduleId\"\n          ],\n          \"columnsTo\": [\n            \"scheduleId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_backupId_backup_backupId_fk\": {\n          \"name\": \"deployment_backupId_backup_backupId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"backup\",\n          \"columnsFrom\": [\n            \"backupId\"\n          ],\n          \"columnsTo\": [\n            \"backupId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_rollbackId_rollback_rollbackId_fk\": {\n          \"name\": \"deployment_rollbackId_rollback_rollbackId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"rollback\",\n          \"columnsFrom\": [\n            \"rollbackId\"\n          ],\n          \"columnsTo\": [\n            \"rollbackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"compose_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"git_provider_userId_user_temp_id_fk\": {\n          \"name\": \"git_provider_userId_user_temp_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitea\": {\n      \"name\": \"gitea\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"giteaUrl\": {\n          \"name\": \"giteaUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitea.com'\"\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_id\": {\n          \"name\": \"client_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_secret\": {\n          \"name\": \"client_secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scopes\": {\n          \"name\": \"scopes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'repo,repo:status,read:user,read:org'\"\n        },\n        \"last_authenticated_at\": {\n          \"name\": \"last_authenticated_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitea_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitea_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitea\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.schedule\": {\n      \"name\": \"schedule\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"cronExpression\": {\n          \"name\": \"cronExpression\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"shellType\": {\n          \"name\": \"shellType\",\n          \"type\": \"shellType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'bash'\"\n        },\n        \"scheduleType\": {\n          \"name\": \"scheduleType\",\n          \"type\": \"scheduleType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"script\": {\n          \"name\": \"script\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"schedule_applicationId_application_applicationId_fk\": {\n          \"name\": \"schedule_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_composeId_compose_composeId_fk\": {\n          \"name\": \"schedule_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_serverId_server_serverId_fk\": {\n          \"name\": \"schedule_serverId_server_serverId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_userId_user_temp_id_fk\": {\n          \"name\": \"schedule_userId_user_temp_id_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.rollback\": {\n      \"name\": \"rollback\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"rollbackId\": {\n          \"name\": \"rollbackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"version\": {\n          \"name\": \"version\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fullContext\": {\n          \"name\": \"fullContext\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"rollback_deploymentId_deployment_deploymentId_fk\": {\n          \"name\": \"rollback_deploymentId_deployment_deploymentId_fk\",\n          \"tableFrom\": \"rollback\",\n          \"tableTo\": \"deployment\",\n          \"columnsFrom\": [\n            \"deploymentId\"\n          ],\n          \"columnsTo\": [\n            \"deploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"drop\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.backupType\": {\n      \"name\": \"backupType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"database\",\n        \"compose\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\",\n        \"web-server\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.triggerType\": {\n      \"name\": \"triggerType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"push\",\n        \"tag\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    },\n    \"public.scheduleType\": {\n      \"name\": \"scheduleType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"compose\",\n        \"server\",\n        \"dokploy-server\"\n      ]\n    },\n    \"public.shellType\": {\n      \"name\": \"shellType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bash\",\n        \"sh\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0096_snapshot.json",
    "content": "{\n  \"id\": \"fd93026f-b2f1-4ba7-886d-a24793305fb5\",\n  \"prevId\": \"17e7fed2-ce4e-4d2e-912e-1316f1c10fd4\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewCustomCertResolver\": {\n          \"name\": \"previewCustomCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"rollbackActive\": {\n          \"name\": \"rollbackActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"cleanCache\": {\n          \"name\": \"cleanCache\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBuildPath\": {\n          \"name\": \"giteaBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isStaticSpa\": {\n          \"name\": \"isStaticSpa\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"application_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'0 0 * * *'\"\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'user'\"\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"allowImpersonation\": {\n          \"name\": \"allowImpersonation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupType\": {\n          \"name\": \"backupType\",\n          \"type\": \"backupType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'database'\"\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_composeId_compose_composeId_fk\": {\n          \"name\": \"backup_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_userId_user_temp_id_fk\": {\n          \"name\": \"backup_userId_user_temp_id_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"no action\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"backup_appName_unique\": {\n          \"name\": \"backup_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"startedAt\": {\n          \"name\": \"startedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"finishedAt\": {\n          \"name\": \"finishedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackId\": {\n          \"name\": \"rollbackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_scheduleId_schedule_scheduleId_fk\": {\n          \"name\": \"deployment_scheduleId_schedule_scheduleId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"schedule\",\n          \"columnsFrom\": [\n            \"scheduleId\"\n          ],\n          \"columnsTo\": [\n            \"scheduleId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_backupId_backup_backupId_fk\": {\n          \"name\": \"deployment_backupId_backup_backupId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"backup\",\n          \"columnsFrom\": [\n            \"backupId\"\n          ],\n          \"columnsTo\": [\n            \"backupId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_rollbackId_rollback_rollbackId_fk\": {\n          \"name\": \"deployment_rollbackId_rollback_rollbackId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"rollback\",\n          \"columnsFrom\": [\n            \"rollbackId\"\n          ],\n          \"columnsTo\": [\n            \"rollbackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"compose_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"git_provider_userId_user_temp_id_fk\": {\n          \"name\": \"git_provider_userId_user_temp_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitea\": {\n      \"name\": \"gitea\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"giteaUrl\": {\n          \"name\": \"giteaUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitea.com'\"\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_id\": {\n          \"name\": \"client_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_secret\": {\n          \"name\": \"client_secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scopes\": {\n          \"name\": \"scopes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'repo,repo:status,read:user,read:org'\"\n        },\n        \"last_authenticated_at\": {\n          \"name\": \"last_authenticated_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitea_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitea_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitea\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.schedule\": {\n      \"name\": \"schedule\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"cronExpression\": {\n          \"name\": \"cronExpression\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"shellType\": {\n          \"name\": \"shellType\",\n          \"type\": \"shellType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'bash'\"\n        },\n        \"scheduleType\": {\n          \"name\": \"scheduleType\",\n          \"type\": \"scheduleType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"script\": {\n          \"name\": \"script\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"schedule_applicationId_application_applicationId_fk\": {\n          \"name\": \"schedule_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_composeId_compose_composeId_fk\": {\n          \"name\": \"schedule_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_serverId_server_serverId_fk\": {\n          \"name\": \"schedule_serverId_server_serverId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_userId_user_temp_id_fk\": {\n          \"name\": \"schedule_userId_user_temp_id_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.rollback\": {\n      \"name\": \"rollback\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"rollbackId\": {\n          \"name\": \"rollbackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"version\": {\n          \"name\": \"version\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fullContext\": {\n          \"name\": \"fullContext\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"rollback_deploymentId_deployment_deploymentId_fk\": {\n          \"name\": \"rollback_deploymentId_deployment_deploymentId_fk\",\n          \"tableFrom\": \"rollback\",\n          \"tableTo\": \"deployment\",\n          \"columnsFrom\": [\n            \"deploymentId\"\n          ],\n          \"columnsTo\": [\n            \"deploymentId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"drop\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.backupType\": {\n      \"name\": \"backupType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"database\",\n        \"compose\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\",\n        \"web-server\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.triggerType\": {\n      \"name\": \"triggerType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"push\",\n        \"tag\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    },\n    \"public.scheduleType\": {\n      \"name\": \"scheduleType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"compose\",\n        \"server\",\n        \"dokploy-server\"\n      ]\n    },\n    \"public.shellType\": {\n      \"name\": \"shellType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bash\",\n        \"sh\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0097_snapshot.json",
    "content": "{\n  \"id\": \"fdc95bd1-866c-4efd-9dce-20ed08f5b0b5\",\n  \"prevId\": \"fd93026f-b2f1-4ba7-886d-a24793305fb5\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewCustomCertResolver\": {\n          \"name\": \"previewCustomCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"rollbackActive\": {\n          \"name\": \"rollbackActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"cleanCache\": {\n          \"name\": \"cleanCache\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBuildPath\": {\n          \"name\": \"giteaBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isStaticSpa\": {\n          \"name\": \"isStaticSpa\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"application_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'0 0 * * *'\"\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'user'\"\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"allowImpersonation\": {\n          \"name\": \"allowImpersonation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupType\": {\n          \"name\": \"backupType\",\n          \"type\": \"backupType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'database'\"\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_composeId_compose_composeId_fk\": {\n          \"name\": \"backup_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_userId_user_temp_id_fk\": {\n          \"name\": \"backup_userId_user_temp_id_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"no action\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"backup_appName_unique\": {\n          \"name\": \"backup_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"startedAt\": {\n          \"name\": \"startedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"finishedAt\": {\n          \"name\": \"finishedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackId\": {\n          \"name\": \"rollbackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_scheduleId_schedule_scheduleId_fk\": {\n          \"name\": \"deployment_scheduleId_schedule_scheduleId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"schedule\",\n          \"columnsFrom\": [\n            \"scheduleId\"\n          ],\n          \"columnsTo\": [\n            \"scheduleId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_backupId_backup_backupId_fk\": {\n          \"name\": \"deployment_backupId_backup_backupId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"backup\",\n          \"columnsFrom\": [\n            \"backupId\"\n          ],\n          \"columnsTo\": [\n            \"backupId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_rollbackId_rollback_rollbackId_fk\": {\n          \"name\": \"deployment_rollbackId_rollback_rollbackId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"rollback\",\n          \"columnsFrom\": [\n            \"rollbackId\"\n          ],\n          \"columnsTo\": [\n            \"rollbackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"compose_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"git_provider_userId_user_temp_id_fk\": {\n          \"name\": \"git_provider_userId_user_temp_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitea\": {\n      \"name\": \"gitea\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"giteaUrl\": {\n          \"name\": \"giteaUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitea.com'\"\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_id\": {\n          \"name\": \"client_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_secret\": {\n          \"name\": \"client_secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scopes\": {\n          \"name\": \"scopes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'repo,repo:status,read:user,read:org'\"\n        },\n        \"last_authenticated_at\": {\n          \"name\": \"last_authenticated_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitea_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitea_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitea\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.schedule\": {\n      \"name\": \"schedule\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"cronExpression\": {\n          \"name\": \"cronExpression\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"shellType\": {\n          \"name\": \"shellType\",\n          \"type\": \"shellType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'bash'\"\n        },\n        \"scheduleType\": {\n          \"name\": \"scheduleType\",\n          \"type\": \"scheduleType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"script\": {\n          \"name\": \"script\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"schedule_applicationId_application_applicationId_fk\": {\n          \"name\": \"schedule_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_composeId_compose_composeId_fk\": {\n          \"name\": \"schedule_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_serverId_server_serverId_fk\": {\n          \"name\": \"schedule_serverId_server_serverId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_userId_user_temp_id_fk\": {\n          \"name\": \"schedule_userId_user_temp_id_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.rollback\": {\n      \"name\": \"rollback\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"rollbackId\": {\n          \"name\": \"rollbackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"version\": {\n          \"name\": \"version\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fullContext\": {\n          \"name\": \"fullContext\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"rollback_deploymentId_deployment_deploymentId_fk\": {\n          \"name\": \"rollback_deploymentId_deployment_deploymentId_fk\",\n          \"tableFrom\": \"rollback\",\n          \"tableTo\": \"deployment\",\n          \"columnsFrom\": [\n            \"deploymentId\"\n          ],\n          \"columnsTo\": [\n            \"deploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"drop\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.backupType\": {\n      \"name\": \"backupType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"database\",\n        \"compose\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\",\n        \"web-server\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.triggerType\": {\n      \"name\": \"triggerType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"push\",\n        \"tag\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    },\n    \"public.scheduleType\": {\n      \"name\": \"scheduleType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"compose\",\n        \"server\",\n        \"dokploy-server\"\n      ]\n    },\n    \"public.shellType\": {\n      \"name\": \"shellType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bash\",\n        \"sh\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0098_snapshot.json",
    "content": "{\n  \"id\": \"edde8c54-b715-4db6-bc3a-85d435226083\",\n  \"prevId\": \"fdc95bd1-866c-4efd-9dce-20ed08f5b0b5\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewCustomCertResolver\": {\n          \"name\": \"previewCustomCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"rollbackActive\": {\n          \"name\": \"rollbackActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"cleanCache\": {\n          \"name\": \"cleanCache\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBuildPath\": {\n          \"name\": \"giteaBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isStaticSpa\": {\n          \"name\": \"isStaticSpa\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"application_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'0 0 * * *'\"\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'user'\"\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"allowImpersonation\": {\n          \"name\": \"allowImpersonation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupType\": {\n          \"name\": \"backupType\",\n          \"type\": \"backupType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'database'\"\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_composeId_compose_composeId_fk\": {\n          \"name\": \"backup_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_userId_user_temp_id_fk\": {\n          \"name\": \"backup_userId_user_temp_id_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"no action\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"backup_appName_unique\": {\n          \"name\": \"backup_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pid\": {\n          \"name\": \"pid\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"startedAt\": {\n          \"name\": \"startedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"finishedAt\": {\n          \"name\": \"finishedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackId\": {\n          \"name\": \"rollbackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_scheduleId_schedule_scheduleId_fk\": {\n          \"name\": \"deployment_scheduleId_schedule_scheduleId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"schedule\",\n          \"columnsFrom\": [\n            \"scheduleId\"\n          ],\n          \"columnsTo\": [\n            \"scheduleId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_backupId_backup_backupId_fk\": {\n          \"name\": \"deployment_backupId_backup_backupId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"backup\",\n          \"columnsFrom\": [\n            \"backupId\"\n          ],\n          \"columnsTo\": [\n            \"backupId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_rollbackId_rollback_rollbackId_fk\": {\n          \"name\": \"deployment_rollbackId_rollback_rollbackId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"rollback\",\n          \"columnsFrom\": [\n            \"rollbackId\"\n          ],\n          \"columnsTo\": [\n            \"rollbackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"compose_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"git_provider_userId_user_temp_id_fk\": {\n          \"name\": \"git_provider_userId_user_temp_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitea\": {\n      \"name\": \"gitea\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"giteaUrl\": {\n          \"name\": \"giteaUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitea.com'\"\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_id\": {\n          \"name\": \"client_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_secret\": {\n          \"name\": \"client_secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scopes\": {\n          \"name\": \"scopes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'repo,repo:status,read:user,read:org'\"\n        },\n        \"last_authenticated_at\": {\n          \"name\": \"last_authenticated_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitea_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitea_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitea\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.schedule\": {\n      \"name\": \"schedule\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"cronExpression\": {\n          \"name\": \"cronExpression\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"shellType\": {\n          \"name\": \"shellType\",\n          \"type\": \"shellType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'bash'\"\n        },\n        \"scheduleType\": {\n          \"name\": \"scheduleType\",\n          \"type\": \"scheduleType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"script\": {\n          \"name\": \"script\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"schedule_applicationId_application_applicationId_fk\": {\n          \"name\": \"schedule_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_composeId_compose_composeId_fk\": {\n          \"name\": \"schedule_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_serverId_server_serverId_fk\": {\n          \"name\": \"schedule_serverId_server_serverId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_userId_user_temp_id_fk\": {\n          \"name\": \"schedule_userId_user_temp_id_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.rollback\": {\n      \"name\": \"rollback\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"rollbackId\": {\n          \"name\": \"rollbackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"version\": {\n          \"name\": \"version\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fullContext\": {\n          \"name\": \"fullContext\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"rollback_deploymentId_deployment_deploymentId_fk\": {\n          \"name\": \"rollback_deploymentId_deployment_deploymentId_fk\",\n          \"tableFrom\": \"rollback\",\n          \"tableTo\": \"deployment\",\n          \"columnsFrom\": [\n            \"deploymentId\"\n          ],\n          \"columnsTo\": [\n            \"deploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"drop\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.backupType\": {\n      \"name\": \"backupType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"database\",\n        \"compose\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\",\n        \"web-server\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.triggerType\": {\n      \"name\": \"triggerType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"push\",\n        \"tag\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    },\n    \"public.scheduleType\": {\n      \"name\": \"scheduleType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"compose\",\n        \"server\",\n        \"dokploy-server\"\n      ]\n    },\n    \"public.shellType\": {\n      \"name\": \"shellType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bash\",\n        \"sh\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0099_snapshot.json",
    "content": "{\n  \"id\": \"71f68c87-ddb4-4e8c-b9fc-1db7fbcedf56\",\n  \"prevId\": \"edde8c54-b715-4db6-bc3a-85d435226083\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewCustomCertResolver\": {\n          \"name\": \"previewCustomCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"rollbackActive\": {\n          \"name\": \"rollbackActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"cleanCache\": {\n          \"name\": \"cleanCache\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBuildPath\": {\n          \"name\": \"giteaBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isStaticSpa\": {\n          \"name\": \"isStaticSpa\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"application_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'0 0 * * *'\"\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'user'\"\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"allowImpersonation\": {\n          \"name\": \"allowImpersonation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupType\": {\n          \"name\": \"backupType\",\n          \"type\": \"backupType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'database'\"\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_composeId_compose_composeId_fk\": {\n          \"name\": \"backup_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_userId_user_temp_id_fk\": {\n          \"name\": \"backup_userId_user_temp_id_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"no action\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"backup_appName_unique\": {\n          \"name\": \"backup_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pid\": {\n          \"name\": \"pid\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"startedAt\": {\n          \"name\": \"startedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"finishedAt\": {\n          \"name\": \"finishedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackId\": {\n          \"name\": \"rollbackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_scheduleId_schedule_scheduleId_fk\": {\n          \"name\": \"deployment_scheduleId_schedule_scheduleId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"schedule\",\n          \"columnsFrom\": [\n            \"scheduleId\"\n          ],\n          \"columnsTo\": [\n            \"scheduleId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_backupId_backup_backupId_fk\": {\n          \"name\": \"deployment_backupId_backup_backupId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"backup\",\n          \"columnsFrom\": [\n            \"backupId\"\n          ],\n          \"columnsTo\": [\n            \"backupId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_rollbackId_rollback_rollbackId_fk\": {\n          \"name\": \"deployment_rollbackId_rollback_rollbackId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"rollback\",\n          \"columnsFrom\": [\n            \"rollbackId\"\n          ],\n          \"columnsTo\": [\n            \"rollbackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"publishMode\": {\n          \"name\": \"publishMode\",\n          \"type\": \"publishModeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'host'\"\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"compose_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"git_provider_userId_user_temp_id_fk\": {\n          \"name\": \"git_provider_userId_user_temp_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitea\": {\n      \"name\": \"gitea\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"giteaUrl\": {\n          \"name\": \"giteaUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitea.com'\"\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_id\": {\n          \"name\": \"client_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_secret\": {\n          \"name\": \"client_secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scopes\": {\n          \"name\": \"scopes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'repo,repo:status,read:user,read:org'\"\n        },\n        \"last_authenticated_at\": {\n          \"name\": \"last_authenticated_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitea_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitea_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitea\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.schedule\": {\n      \"name\": \"schedule\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"cronExpression\": {\n          \"name\": \"cronExpression\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"shellType\": {\n          \"name\": \"shellType\",\n          \"type\": \"shellType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'bash'\"\n        },\n        \"scheduleType\": {\n          \"name\": \"scheduleType\",\n          \"type\": \"scheduleType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"script\": {\n          \"name\": \"script\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"schedule_applicationId_application_applicationId_fk\": {\n          \"name\": \"schedule_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_composeId_compose_composeId_fk\": {\n          \"name\": \"schedule_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_serverId_server_serverId_fk\": {\n          \"name\": \"schedule_serverId_server_serverId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_userId_user_temp_id_fk\": {\n          \"name\": \"schedule_userId_user_temp_id_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.rollback\": {\n      \"name\": \"rollback\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"rollbackId\": {\n          \"name\": \"rollbackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"version\": {\n          \"name\": \"version\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fullContext\": {\n          \"name\": \"fullContext\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"rollback_deploymentId_deployment_deploymentId_fk\": {\n          \"name\": \"rollback_deploymentId_deployment_deploymentId_fk\",\n          \"tableFrom\": \"rollback\",\n          \"tableTo\": \"deployment\",\n          \"columnsFrom\": [\n            \"deploymentId\"\n          ],\n          \"columnsTo\": [\n            \"deploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"drop\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.backupType\": {\n      \"name\": \"backupType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"database\",\n        \"compose\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\",\n        \"web-server\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.publishModeType\": {\n      \"name\": \"publishModeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"ingress\",\n        \"host\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.triggerType\": {\n      \"name\": \"triggerType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"push\",\n        \"tag\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    },\n    \"public.scheduleType\": {\n      \"name\": \"scheduleType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"compose\",\n        \"server\",\n        \"dokploy-server\"\n      ]\n    },\n    \"public.shellType\": {\n      \"name\": \"shellType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bash\",\n        \"sh\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0100_snapshot.json",
    "content": "{\n  \"id\": \"abe187f7-21c6-47c4-9492-038e866ded60\",\n  \"prevId\": \"71f68c87-ddb4-4e8c-b9fc-1db7fbcedf56\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewCustomCertResolver\": {\n          \"name\": \"previewCustomCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"rollbackActive\": {\n          \"name\": \"rollbackActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"cleanCache\": {\n          \"name\": \"cleanCache\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBuildPath\": {\n          \"name\": \"giteaBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isStaticSpa\": {\n          \"name\": \"isStaticSpa\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"application_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'0 0 * * *'\"\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'user'\"\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"allowImpersonation\": {\n          \"name\": \"allowImpersonation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"internalPath\": {\n          \"name\": \"internalPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"stripPath\": {\n          \"name\": \"stripPath\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupType\": {\n          \"name\": \"backupType\",\n          \"type\": \"backupType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'database'\"\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_composeId_compose_composeId_fk\": {\n          \"name\": \"backup_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_userId_user_temp_id_fk\": {\n          \"name\": \"backup_userId_user_temp_id_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"no action\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"backup_appName_unique\": {\n          \"name\": \"backup_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pid\": {\n          \"name\": \"pid\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"startedAt\": {\n          \"name\": \"startedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"finishedAt\": {\n          \"name\": \"finishedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackId\": {\n          \"name\": \"rollbackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_scheduleId_schedule_scheduleId_fk\": {\n          \"name\": \"deployment_scheduleId_schedule_scheduleId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"schedule\",\n          \"columnsFrom\": [\n            \"scheduleId\"\n          ],\n          \"columnsTo\": [\n            \"scheduleId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_backupId_backup_backupId_fk\": {\n          \"name\": \"deployment_backupId_backup_backupId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"backup\",\n          \"columnsFrom\": [\n            \"backupId\"\n          ],\n          \"columnsTo\": [\n            \"backupId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_rollbackId_rollback_rollbackId_fk\": {\n          \"name\": \"deployment_rollbackId_rollback_rollbackId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"rollback\",\n          \"columnsFrom\": [\n            \"rollbackId\"\n          ],\n          \"columnsTo\": [\n            \"rollbackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"publishMode\": {\n          \"name\": \"publishMode\",\n          \"type\": \"publishModeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'host'\"\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"compose_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"git_provider_userId_user_temp_id_fk\": {\n          \"name\": \"git_provider_userId_user_temp_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitea\": {\n      \"name\": \"gitea\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"giteaUrl\": {\n          \"name\": \"giteaUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitea.com'\"\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_id\": {\n          \"name\": \"client_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_secret\": {\n          \"name\": \"client_secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scopes\": {\n          \"name\": \"scopes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'repo,repo:status,read:user,read:org'\"\n        },\n        \"last_authenticated_at\": {\n          \"name\": \"last_authenticated_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitea_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitea_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitea\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.schedule\": {\n      \"name\": \"schedule\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"cronExpression\": {\n          \"name\": \"cronExpression\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"shellType\": {\n          \"name\": \"shellType\",\n          \"type\": \"shellType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'bash'\"\n        },\n        \"scheduleType\": {\n          \"name\": \"scheduleType\",\n          \"type\": \"scheduleType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"script\": {\n          \"name\": \"script\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"schedule_applicationId_application_applicationId_fk\": {\n          \"name\": \"schedule_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_composeId_compose_composeId_fk\": {\n          \"name\": \"schedule_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_serverId_server_serverId_fk\": {\n          \"name\": \"schedule_serverId_server_serverId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_userId_user_temp_id_fk\": {\n          \"name\": \"schedule_userId_user_temp_id_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.rollback\": {\n      \"name\": \"rollback\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"rollbackId\": {\n          \"name\": \"rollbackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"version\": {\n          \"name\": \"version\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fullContext\": {\n          \"name\": \"fullContext\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"rollback_deploymentId_deployment_deploymentId_fk\": {\n          \"name\": \"rollback_deploymentId_deployment_deploymentId_fk\",\n          \"tableFrom\": \"rollback\",\n          \"tableTo\": \"deployment\",\n          \"columnsFrom\": [\n            \"deploymentId\"\n          ],\n          \"columnsTo\": [\n            \"deploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"drop\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.backupType\": {\n      \"name\": \"backupType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"database\",\n        \"compose\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\",\n        \"web-server\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.publishModeType\": {\n      \"name\": \"publishModeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"ingress\",\n        \"host\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.triggerType\": {\n      \"name\": \"triggerType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"push\",\n        \"tag\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    },\n    \"public.scheduleType\": {\n      \"name\": \"scheduleType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"compose\",\n        \"server\",\n        \"dokploy-server\"\n      ]\n    },\n    \"public.shellType\": {\n      \"name\": \"shellType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bash\",\n        \"sh\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0101_snapshot.json",
    "content": "{\n  \"id\": \"69f87478-2c7c-4e43-ad98-7718bcd91259\",\n  \"prevId\": \"abe187f7-21c6-47c4-9492-038e866ded60\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewCustomCertResolver\": {\n          \"name\": \"previewCustomCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"rollbackActive\": {\n          \"name\": \"rollbackActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"cleanCache\": {\n          \"name\": \"cleanCache\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBuildPath\": {\n          \"name\": \"giteaBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isStaticSpa\": {\n          \"name\": \"isStaticSpa\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"application_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'0 0 * * *'\"\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'user'\"\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"allowImpersonation\": {\n          \"name\": \"allowImpersonation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"internalPath\": {\n          \"name\": \"internalPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"stripPath\": {\n          \"name\": \"stripPath\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupType\": {\n          \"name\": \"backupType\",\n          \"type\": \"backupType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'database'\"\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_composeId_compose_composeId_fk\": {\n          \"name\": \"backup_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_userId_user_temp_id_fk\": {\n          \"name\": \"backup_userId_user_temp_id_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"no action\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"backup_appName_unique\": {\n          \"name\": \"backup_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pid\": {\n          \"name\": \"pid\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"startedAt\": {\n          \"name\": \"startedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"finishedAt\": {\n          \"name\": \"finishedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackId\": {\n          \"name\": \"rollbackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeBackupId\": {\n          \"name\": \"volumeBackupId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_scheduleId_schedule_scheduleId_fk\": {\n          \"name\": \"deployment_scheduleId_schedule_scheduleId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"schedule\",\n          \"columnsFrom\": [\n            \"scheduleId\"\n          ],\n          \"columnsTo\": [\n            \"scheduleId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_backupId_backup_backupId_fk\": {\n          \"name\": \"deployment_backupId_backup_backupId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"backup\",\n          \"columnsFrom\": [\n            \"backupId\"\n          ],\n          \"columnsTo\": [\n            \"backupId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_rollbackId_rollback_rollbackId_fk\": {\n          \"name\": \"deployment_rollbackId_rollback_rollbackId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"rollback\",\n          \"columnsFrom\": [\n            \"rollbackId\"\n          ],\n          \"columnsTo\": [\n            \"rollbackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_volumeBackupId_volume_backup_volumeBackupId_fk\": {\n          \"name\": \"deployment_volumeBackupId_volume_backup_volumeBackupId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"volume_backup\",\n          \"columnsFrom\": [\n            \"volumeBackupId\"\n          ],\n          \"columnsTo\": [\n            \"volumeBackupId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"publishMode\": {\n          \"name\": \"publishMode\",\n          \"type\": \"publishModeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'host'\"\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"compose_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"git_provider_userId_user_temp_id_fk\": {\n          \"name\": \"git_provider_userId_user_temp_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitea\": {\n      \"name\": \"gitea\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"giteaUrl\": {\n          \"name\": \"giteaUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitea.com'\"\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_id\": {\n          \"name\": \"client_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_secret\": {\n          \"name\": \"client_secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scopes\": {\n          \"name\": \"scopes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'repo,repo:status,read:user,read:org'\"\n        },\n        \"last_authenticated_at\": {\n          \"name\": \"last_authenticated_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitea_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitea_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitea\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.schedule\": {\n      \"name\": \"schedule\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"cronExpression\": {\n          \"name\": \"cronExpression\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"shellType\": {\n          \"name\": \"shellType\",\n          \"type\": \"shellType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'bash'\"\n        },\n        \"scheduleType\": {\n          \"name\": \"scheduleType\",\n          \"type\": \"scheduleType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"script\": {\n          \"name\": \"script\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"schedule_applicationId_application_applicationId_fk\": {\n          \"name\": \"schedule_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_composeId_compose_composeId_fk\": {\n          \"name\": \"schedule_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_serverId_server_serverId_fk\": {\n          \"name\": \"schedule_serverId_server_serverId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_userId_user_temp_id_fk\": {\n          \"name\": \"schedule_userId_user_temp_id_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.rollback\": {\n      \"name\": \"rollback\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"rollbackId\": {\n          \"name\": \"rollbackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"version\": {\n          \"name\": \"version\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fullContext\": {\n          \"name\": \"fullContext\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"rollback_deploymentId_deployment_deploymentId_fk\": {\n          \"name\": \"rollback_deploymentId_deployment_deploymentId_fk\",\n          \"tableFrom\": \"rollback\",\n          \"tableTo\": \"deployment\",\n          \"columnsFrom\": [\n            \"deploymentId\"\n          ],\n          \"columnsTo\": [\n            \"deploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.volume_backup\": {\n      \"name\": \"volume_backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"volumeBackupId\": {\n          \"name\": \"volumeBackupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"turnOff\": {\n          \"name\": \"turnOff\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cronExpression\": {\n          \"name\": \"cronExpression\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"volume_backup_applicationId_application_applicationId_fk\": {\n          \"name\": \"volume_backup_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"volume_backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"volume_backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"volume_backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"volume_backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_redisId_redis_redisId_fk\": {\n          \"name\": \"volume_backup_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_composeId_compose_composeId_fk\": {\n          \"name\": \"volume_backup_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"volume_backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"drop\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.backupType\": {\n      \"name\": \"backupType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"database\",\n        \"compose\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\",\n        \"web-server\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.publishModeType\": {\n      \"name\": \"publishModeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"ingress\",\n        \"host\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.triggerType\": {\n      \"name\": \"triggerType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"push\",\n        \"tag\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    },\n    \"public.scheduleType\": {\n      \"name\": \"scheduleType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"compose\",\n        \"server\",\n        \"dokploy-server\"\n      ]\n    },\n    \"public.shellType\": {\n      \"name\": \"shellType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bash\",\n        \"sh\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0102_snapshot.json",
    "content": "{\n  \"id\": \"218e3c9b-ef86-4665-98af-56d65282b73b\",\n  \"prevId\": \"69f87478-2c7c-4e43-ad98-7718bcd91259\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewCustomCertResolver\": {\n          \"name\": \"previewCustomCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"rollbackActive\": {\n          \"name\": \"rollbackActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"cleanCache\": {\n          \"name\": \"cleanCache\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBuildPath\": {\n          \"name\": \"giteaBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isStaticSpa\": {\n          \"name\": \"isStaticSpa\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"application_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'0 0 * * *'\"\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'user'\"\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"allowImpersonation\": {\n          \"name\": \"allowImpersonation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"internalPath\": {\n          \"name\": \"internalPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"stripPath\": {\n          \"name\": \"stripPath\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupType\": {\n          \"name\": \"backupType\",\n          \"type\": \"backupType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'database'\"\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_composeId_compose_composeId_fk\": {\n          \"name\": \"backup_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_userId_user_temp_id_fk\": {\n          \"name\": \"backup_userId_user_temp_id_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"no action\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"backup_appName_unique\": {\n          \"name\": \"backup_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pid\": {\n          \"name\": \"pid\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"startedAt\": {\n          \"name\": \"startedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"finishedAt\": {\n          \"name\": \"finishedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackId\": {\n          \"name\": \"rollbackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeBackupId\": {\n          \"name\": \"volumeBackupId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_scheduleId_schedule_scheduleId_fk\": {\n          \"name\": \"deployment_scheduleId_schedule_scheduleId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"schedule\",\n          \"columnsFrom\": [\n            \"scheduleId\"\n          ],\n          \"columnsTo\": [\n            \"scheduleId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_backupId_backup_backupId_fk\": {\n          \"name\": \"deployment_backupId_backup_backupId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"backup\",\n          \"columnsFrom\": [\n            \"backupId\"\n          ],\n          \"columnsTo\": [\n            \"backupId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_rollbackId_rollback_rollbackId_fk\": {\n          \"name\": \"deployment_rollbackId_rollback_rollbackId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"rollback\",\n          \"columnsFrom\": [\n            \"rollbackId\"\n          ],\n          \"columnsTo\": [\n            \"rollbackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_volumeBackupId_volume_backup_volumeBackupId_fk\": {\n          \"name\": \"deployment_volumeBackupId_volume_backup_volumeBackupId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"volume_backup\",\n          \"columnsFrom\": [\n            \"volumeBackupId\"\n          ],\n          \"columnsTo\": [\n            \"volumeBackupId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"publishMode\": {\n          \"name\": \"publishMode\",\n          \"type\": \"publishModeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'host'\"\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeploymentsVolume\": {\n          \"name\": \"isolatedDeploymentsVolume\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"compose_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"git_provider_userId_user_temp_id_fk\": {\n          \"name\": \"git_provider_userId_user_temp_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitea\": {\n      \"name\": \"gitea\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"giteaUrl\": {\n          \"name\": \"giteaUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitea.com'\"\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_id\": {\n          \"name\": \"client_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_secret\": {\n          \"name\": \"client_secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scopes\": {\n          \"name\": \"scopes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'repo,repo:status,read:user,read:org'\"\n        },\n        \"last_authenticated_at\": {\n          \"name\": \"last_authenticated_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitea_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitea_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitea\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.schedule\": {\n      \"name\": \"schedule\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"cronExpression\": {\n          \"name\": \"cronExpression\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"shellType\": {\n          \"name\": \"shellType\",\n          \"type\": \"shellType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'bash'\"\n        },\n        \"scheduleType\": {\n          \"name\": \"scheduleType\",\n          \"type\": \"scheduleType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"script\": {\n          \"name\": \"script\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"schedule_applicationId_application_applicationId_fk\": {\n          \"name\": \"schedule_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_composeId_compose_composeId_fk\": {\n          \"name\": \"schedule_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_serverId_server_serverId_fk\": {\n          \"name\": \"schedule_serverId_server_serverId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_userId_user_temp_id_fk\": {\n          \"name\": \"schedule_userId_user_temp_id_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.rollback\": {\n      \"name\": \"rollback\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"rollbackId\": {\n          \"name\": \"rollbackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"version\": {\n          \"name\": \"version\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fullContext\": {\n          \"name\": \"fullContext\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"rollback_deploymentId_deployment_deploymentId_fk\": {\n          \"name\": \"rollback_deploymentId_deployment_deploymentId_fk\",\n          \"tableFrom\": \"rollback\",\n          \"tableTo\": \"deployment\",\n          \"columnsFrom\": [\n            \"deploymentId\"\n          ],\n          \"columnsTo\": [\n            \"deploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.volume_backup\": {\n      \"name\": \"volume_backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"volumeBackupId\": {\n          \"name\": \"volumeBackupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"turnOff\": {\n          \"name\": \"turnOff\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cronExpression\": {\n          \"name\": \"cronExpression\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"volume_backup_applicationId_application_applicationId_fk\": {\n          \"name\": \"volume_backup_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"volume_backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"volume_backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"volume_backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"volume_backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_redisId_redis_redisId_fk\": {\n          \"name\": \"volume_backup_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_composeId_compose_composeId_fk\": {\n          \"name\": \"volume_backup_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"volume_backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"drop\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.backupType\": {\n      \"name\": \"backupType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"database\",\n        \"compose\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\",\n        \"web-server\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.publishModeType\": {\n      \"name\": \"publishModeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"ingress\",\n        \"host\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.triggerType\": {\n      \"name\": \"triggerType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"push\",\n        \"tag\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    },\n    \"public.scheduleType\": {\n      \"name\": \"scheduleType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"compose\",\n        \"server\",\n        \"dokploy-server\"\n      ]\n    },\n    \"public.shellType\": {\n      \"name\": \"shellType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bash\",\n        \"sh\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0103_snapshot.json",
    "content": "{\n  \"id\": \"8bf085dd-e054-4ae6-811b-1d1a68dab752\",\n  \"prevId\": \"218e3c9b-ef86-4665-98af-56d65282b73b\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewCustomCertResolver\": {\n          \"name\": \"previewCustomCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewRequireCollaboratorPermissions\": {\n          \"name\": \"previewRequireCollaboratorPermissions\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": true\n        },\n        \"rollbackActive\": {\n          \"name\": \"rollbackActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"cleanCache\": {\n          \"name\": \"cleanCache\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBuildPath\": {\n          \"name\": \"giteaBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isStaticSpa\": {\n          \"name\": \"isStaticSpa\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"application_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'0 0 * * *'\"\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'user'\"\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"allowImpersonation\": {\n          \"name\": \"allowImpersonation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"internalPath\": {\n          \"name\": \"internalPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"stripPath\": {\n          \"name\": \"stripPath\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupType\": {\n          \"name\": \"backupType\",\n          \"type\": \"backupType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'database'\"\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_composeId_compose_composeId_fk\": {\n          \"name\": \"backup_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_userId_user_temp_id_fk\": {\n          \"name\": \"backup_userId_user_temp_id_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"no action\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"backup_appName_unique\": {\n          \"name\": \"backup_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pid\": {\n          \"name\": \"pid\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"startedAt\": {\n          \"name\": \"startedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"finishedAt\": {\n          \"name\": \"finishedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackId\": {\n          \"name\": \"rollbackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeBackupId\": {\n          \"name\": \"volumeBackupId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_scheduleId_schedule_scheduleId_fk\": {\n          \"name\": \"deployment_scheduleId_schedule_scheduleId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"schedule\",\n          \"columnsFrom\": [\n            \"scheduleId\"\n          ],\n          \"columnsTo\": [\n            \"scheduleId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_backupId_backup_backupId_fk\": {\n          \"name\": \"deployment_backupId_backup_backupId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"backup\",\n          \"columnsFrom\": [\n            \"backupId\"\n          ],\n          \"columnsTo\": [\n            \"backupId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_rollbackId_rollback_rollbackId_fk\": {\n          \"name\": \"deployment_rollbackId_rollback_rollbackId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"rollback\",\n          \"columnsFrom\": [\n            \"rollbackId\"\n          ],\n          \"columnsTo\": [\n            \"rollbackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_volumeBackupId_volume_backup_volumeBackupId_fk\": {\n          \"name\": \"deployment_volumeBackupId_volume_backup_volumeBackupId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"volume_backup\",\n          \"columnsFrom\": [\n            \"volumeBackupId\"\n          ],\n          \"columnsTo\": [\n            \"volumeBackupId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"publishMode\": {\n          \"name\": \"publishMode\",\n          \"type\": \"publishModeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'host'\"\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeploymentsVolume\": {\n          \"name\": \"isolatedDeploymentsVolume\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"compose_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"git_provider_userId_user_temp_id_fk\": {\n          \"name\": \"git_provider_userId_user_temp_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitea\": {\n      \"name\": \"gitea\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"giteaUrl\": {\n          \"name\": \"giteaUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitea.com'\"\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_id\": {\n          \"name\": \"client_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_secret\": {\n          \"name\": \"client_secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scopes\": {\n          \"name\": \"scopes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'repo,repo:status,read:user,read:org'\"\n        },\n        \"last_authenticated_at\": {\n          \"name\": \"last_authenticated_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitea_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitea_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitea\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.schedule\": {\n      \"name\": \"schedule\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"cronExpression\": {\n          \"name\": \"cronExpression\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"shellType\": {\n          \"name\": \"shellType\",\n          \"type\": \"shellType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'bash'\"\n        },\n        \"scheduleType\": {\n          \"name\": \"scheduleType\",\n          \"type\": \"scheduleType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"script\": {\n          \"name\": \"script\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"schedule_applicationId_application_applicationId_fk\": {\n          \"name\": \"schedule_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_composeId_compose_composeId_fk\": {\n          \"name\": \"schedule_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_serverId_server_serverId_fk\": {\n          \"name\": \"schedule_serverId_server_serverId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_userId_user_temp_id_fk\": {\n          \"name\": \"schedule_userId_user_temp_id_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.rollback\": {\n      \"name\": \"rollback\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"rollbackId\": {\n          \"name\": \"rollbackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"version\": {\n          \"name\": \"version\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fullContext\": {\n          \"name\": \"fullContext\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"rollback_deploymentId_deployment_deploymentId_fk\": {\n          \"name\": \"rollback_deploymentId_deployment_deploymentId_fk\",\n          \"tableFrom\": \"rollback\",\n          \"tableTo\": \"deployment\",\n          \"columnsFrom\": [\n            \"deploymentId\"\n          ],\n          \"columnsTo\": [\n            \"deploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.volume_backup\": {\n      \"name\": \"volume_backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"volumeBackupId\": {\n          \"name\": \"volumeBackupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"turnOff\": {\n          \"name\": \"turnOff\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cronExpression\": {\n          \"name\": \"cronExpression\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"volume_backup_applicationId_application_applicationId_fk\": {\n          \"name\": \"volume_backup_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"volume_backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"volume_backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"volume_backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"volume_backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_redisId_redis_redisId_fk\": {\n          \"name\": \"volume_backup_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_composeId_compose_composeId_fk\": {\n          \"name\": \"volume_backup_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"volume_backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"drop\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.backupType\": {\n      \"name\": \"backupType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"database\",\n        \"compose\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\",\n        \"web-server\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.publishModeType\": {\n      \"name\": \"publishModeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"ingress\",\n        \"host\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.triggerType\": {\n      \"name\": \"triggerType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"push\",\n        \"tag\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    },\n    \"public.scheduleType\": {\n      \"name\": \"scheduleType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"compose\",\n        \"server\",\n        \"dokploy-server\"\n      ]\n    },\n    \"public.shellType\": {\n      \"name\": \"shellType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bash\",\n        \"sh\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0104_snapshot.json",
    "content": "{\n  \"id\": \"84fb0854-3c32-4cbb-bd47-f4b9a448db29\",\n  \"prevId\": \"8bf085dd-e054-4ae6-811b-1d1a68dab752\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewCustomCertResolver\": {\n          \"name\": \"previewCustomCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewRequireCollaboratorPermissions\": {\n          \"name\": \"previewRequireCollaboratorPermissions\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": true\n        },\n        \"rollbackActive\": {\n          \"name\": \"rollbackActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"cleanCache\": {\n          \"name\": \"cleanCache\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBuildPath\": {\n          \"name\": \"giteaBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"railpackVersion\": {\n          \"name\": \"railpackVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'0.2.2'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isStaticSpa\": {\n          \"name\": \"isStaticSpa\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"application_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'0 0 * * *'\"\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'user'\"\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"allowImpersonation\": {\n          \"name\": \"allowImpersonation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"internalPath\": {\n          \"name\": \"internalPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"stripPath\": {\n          \"name\": \"stripPath\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupType\": {\n          \"name\": \"backupType\",\n          \"type\": \"backupType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'database'\"\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_composeId_compose_composeId_fk\": {\n          \"name\": \"backup_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_userId_user_temp_id_fk\": {\n          \"name\": \"backup_userId_user_temp_id_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"no action\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"backup_appName_unique\": {\n          \"name\": \"backup_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pid\": {\n          \"name\": \"pid\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"startedAt\": {\n          \"name\": \"startedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"finishedAt\": {\n          \"name\": \"finishedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackId\": {\n          \"name\": \"rollbackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeBackupId\": {\n          \"name\": \"volumeBackupId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_scheduleId_schedule_scheduleId_fk\": {\n          \"name\": \"deployment_scheduleId_schedule_scheduleId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"schedule\",\n          \"columnsFrom\": [\n            \"scheduleId\"\n          ],\n          \"columnsTo\": [\n            \"scheduleId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_backupId_backup_backupId_fk\": {\n          \"name\": \"deployment_backupId_backup_backupId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"backup\",\n          \"columnsFrom\": [\n            \"backupId\"\n          ],\n          \"columnsTo\": [\n            \"backupId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_rollbackId_rollback_rollbackId_fk\": {\n          \"name\": \"deployment_rollbackId_rollback_rollbackId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"rollback\",\n          \"columnsFrom\": [\n            \"rollbackId\"\n          ],\n          \"columnsTo\": [\n            \"rollbackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_volumeBackupId_volume_backup_volumeBackupId_fk\": {\n          \"name\": \"deployment_volumeBackupId_volume_backup_volumeBackupId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"volume_backup\",\n          \"columnsFrom\": [\n            \"volumeBackupId\"\n          ],\n          \"columnsTo\": [\n            \"volumeBackupId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"publishMode\": {\n          \"name\": \"publishMode\",\n          \"type\": \"publishModeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'host'\"\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeploymentsVolume\": {\n          \"name\": \"isolatedDeploymentsVolume\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"compose_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"git_provider_userId_user_temp_id_fk\": {\n          \"name\": \"git_provider_userId_user_temp_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitea\": {\n      \"name\": \"gitea\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"giteaUrl\": {\n          \"name\": \"giteaUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitea.com'\"\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_id\": {\n          \"name\": \"client_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_secret\": {\n          \"name\": \"client_secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scopes\": {\n          \"name\": \"scopes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'repo,repo:status,read:user,read:org'\"\n        },\n        \"last_authenticated_at\": {\n          \"name\": \"last_authenticated_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitea_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitea_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitea\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.schedule\": {\n      \"name\": \"schedule\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"cronExpression\": {\n          \"name\": \"cronExpression\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"shellType\": {\n          \"name\": \"shellType\",\n          \"type\": \"shellType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'bash'\"\n        },\n        \"scheduleType\": {\n          \"name\": \"scheduleType\",\n          \"type\": \"scheduleType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"script\": {\n          \"name\": \"script\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"schedule_applicationId_application_applicationId_fk\": {\n          \"name\": \"schedule_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_composeId_compose_composeId_fk\": {\n          \"name\": \"schedule_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_serverId_server_serverId_fk\": {\n          \"name\": \"schedule_serverId_server_serverId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_userId_user_temp_id_fk\": {\n          \"name\": \"schedule_userId_user_temp_id_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.rollback\": {\n      \"name\": \"rollback\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"rollbackId\": {\n          \"name\": \"rollbackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"version\": {\n          \"name\": \"version\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fullContext\": {\n          \"name\": \"fullContext\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"rollback_deploymentId_deployment_deploymentId_fk\": {\n          \"name\": \"rollback_deploymentId_deployment_deploymentId_fk\",\n          \"tableFrom\": \"rollback\",\n          \"tableTo\": \"deployment\",\n          \"columnsFrom\": [\n            \"deploymentId\"\n          ],\n          \"columnsTo\": [\n            \"deploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.volume_backup\": {\n      \"name\": \"volume_backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"volumeBackupId\": {\n          \"name\": \"volumeBackupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"turnOff\": {\n          \"name\": \"turnOff\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cronExpression\": {\n          \"name\": \"cronExpression\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"volume_backup_applicationId_application_applicationId_fk\": {\n          \"name\": \"volume_backup_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"volume_backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"volume_backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"volume_backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"volume_backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_redisId_redis_redisId_fk\": {\n          \"name\": \"volume_backup_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_composeId_compose_composeId_fk\": {\n          \"name\": \"volume_backup_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"volume_backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"drop\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.backupType\": {\n      \"name\": \"backupType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"database\",\n        \"compose\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\",\n        \"web-server\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.publishModeType\": {\n      \"name\": \"publishModeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"ingress\",\n        \"host\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.triggerType\": {\n      \"name\": \"triggerType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"push\",\n        \"tag\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    },\n    \"public.scheduleType\": {\n      \"name\": \"scheduleType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"compose\",\n        \"server\",\n        \"dokploy-server\"\n      ]\n    },\n    \"public.shellType\": {\n      \"name\": \"shellType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bash\",\n        \"sh\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0105_snapshot.json",
    "content": "{\n  \"id\": \"5883e786-525d-4828-ada1-e5ba723de5d7\",\n  \"prevId\": \"84fb0854-3c32-4cbb-bd47-f4b9a448db29\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewCustomCertResolver\": {\n          \"name\": \"previewCustomCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewRequireCollaboratorPermissions\": {\n          \"name\": \"previewRequireCollaboratorPermissions\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": true\n        },\n        \"rollbackActive\": {\n          \"name\": \"rollbackActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"cleanCache\": {\n          \"name\": \"cleanCache\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBuildPath\": {\n          \"name\": \"giteaBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"railpackVersion\": {\n          \"name\": \"railpackVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'0.2.2'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isStaticSpa\": {\n          \"name\": \"isStaticSpa\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"application_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'0 0 * * *'\"\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'user'\"\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"allowImpersonation\": {\n          \"name\": \"allowImpersonation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"internalPath\": {\n          \"name\": \"internalPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"stripPath\": {\n          \"name\": \"stripPath\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupType\": {\n          \"name\": \"backupType\",\n          \"type\": \"backupType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'database'\"\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_composeId_compose_composeId_fk\": {\n          \"name\": \"backup_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_userId_user_temp_id_fk\": {\n          \"name\": \"backup_userId_user_temp_id_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"no action\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"backup_appName_unique\": {\n          \"name\": \"backup_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pid\": {\n          \"name\": \"pid\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"startedAt\": {\n          \"name\": \"startedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"finishedAt\": {\n          \"name\": \"finishedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackId\": {\n          \"name\": \"rollbackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeBackupId\": {\n          \"name\": \"volumeBackupId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_scheduleId_schedule_scheduleId_fk\": {\n          \"name\": \"deployment_scheduleId_schedule_scheduleId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"schedule\",\n          \"columnsFrom\": [\n            \"scheduleId\"\n          ],\n          \"columnsTo\": [\n            \"scheduleId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_backupId_backup_backupId_fk\": {\n          \"name\": \"deployment_backupId_backup_backupId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"backup\",\n          \"columnsFrom\": [\n            \"backupId\"\n          ],\n          \"columnsTo\": [\n            \"backupId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_rollbackId_rollback_rollbackId_fk\": {\n          \"name\": \"deployment_rollbackId_rollback_rollbackId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"rollback\",\n          \"columnsFrom\": [\n            \"rollbackId\"\n          ],\n          \"columnsTo\": [\n            \"rollbackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_volumeBackupId_volume_backup_volumeBackupId_fk\": {\n          \"name\": \"deployment_volumeBackupId_volume_backup_volumeBackupId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"volume_backup\",\n          \"columnsFrom\": [\n            \"volumeBackupId\"\n          ],\n          \"columnsTo\": [\n            \"volumeBackupId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"publishMode\": {\n          \"name\": \"publishMode\",\n          \"type\": \"publishModeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'host'\"\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeploymentsVolume\": {\n          \"name\": \"isolatedDeploymentsVolume\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"compose_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"git_provider_userId_user_temp_id_fk\": {\n          \"name\": \"git_provider_userId_user_temp_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitea\": {\n      \"name\": \"gitea\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"giteaUrl\": {\n          \"name\": \"giteaUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitea.com'\"\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_id\": {\n          \"name\": \"client_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_secret\": {\n          \"name\": \"client_secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scopes\": {\n          \"name\": \"scopes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'repo,repo:status,read:user,read:org'\"\n        },\n        \"last_authenticated_at\": {\n          \"name\": \"last_authenticated_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitea_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitea_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitea\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.schedule\": {\n      \"name\": \"schedule\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"cronExpression\": {\n          \"name\": \"cronExpression\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"shellType\": {\n          \"name\": \"shellType\",\n          \"type\": \"shellType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'bash'\"\n        },\n        \"scheduleType\": {\n          \"name\": \"scheduleType\",\n          \"type\": \"scheduleType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"script\": {\n          \"name\": \"script\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"schedule_applicationId_application_applicationId_fk\": {\n          \"name\": \"schedule_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_composeId_compose_composeId_fk\": {\n          \"name\": \"schedule_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_serverId_server_serverId_fk\": {\n          \"name\": \"schedule_serverId_server_serverId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_userId_user_temp_id_fk\": {\n          \"name\": \"schedule_userId_user_temp_id_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.rollback\": {\n      \"name\": \"rollback\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"rollbackId\": {\n          \"name\": \"rollbackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"version\": {\n          \"name\": \"version\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fullContext\": {\n          \"name\": \"fullContext\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"rollback_deploymentId_deployment_deploymentId_fk\": {\n          \"name\": \"rollback_deploymentId_deployment_deploymentId_fk\",\n          \"tableFrom\": \"rollback\",\n          \"tableTo\": \"deployment\",\n          \"columnsFrom\": [\n            \"deploymentId\"\n          ],\n          \"columnsTo\": [\n            \"deploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.volume_backup\": {\n      \"name\": \"volume_backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"volumeBackupId\": {\n          \"name\": \"volumeBackupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"turnOff\": {\n          \"name\": \"turnOff\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cronExpression\": {\n          \"name\": \"cronExpression\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"volume_backup_applicationId_application_applicationId_fk\": {\n          \"name\": \"volume_backup_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"volume_backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"volume_backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"volume_backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"volume_backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_redisId_redis_redisId_fk\": {\n          \"name\": \"volume_backup_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_composeId_compose_composeId_fk\": {\n          \"name\": \"volume_backup_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"volume_backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"drop\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.backupType\": {\n      \"name\": \"backupType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"database\",\n        \"compose\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\",\n        \"web-server\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.publishModeType\": {\n      \"name\": \"publishModeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"ingress\",\n        \"host\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.triggerType\": {\n      \"name\": \"triggerType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"push\",\n        \"tag\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    },\n    \"public.scheduleType\": {\n      \"name\": \"scheduleType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"compose\",\n        \"server\",\n        \"dokploy-server\"\n      ]\n    },\n    \"public.shellType\": {\n      \"name\": \"shellType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bash\",\n        \"sh\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0106_snapshot.json",
    "content": "{\n  \"id\": \"5568024c-5daa-4554-a224-8a005a53f97c\",\n  \"prevId\": \"5883e786-525d-4828-ada1-e5ba723de5d7\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLabels\": {\n          \"name\": \"previewLabels\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewCustomCertResolver\": {\n          \"name\": \"previewCustomCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewRequireCollaboratorPermissions\": {\n          \"name\": \"previewRequireCollaboratorPermissions\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": true\n        },\n        \"rollbackActive\": {\n          \"name\": \"rollbackActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"cleanCache\": {\n          \"name\": \"cleanCache\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBuildPath\": {\n          \"name\": \"giteaBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"railpackVersion\": {\n          \"name\": \"railpackVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'0.2.2'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isStaticSpa\": {\n          \"name\": \"isStaticSpa\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_projectId_project_projectId_fk\": {\n          \"name\": \"application_projectId_project_projectId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"application_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_projectId_project_projectId_fk\": {\n          \"name\": \"postgres_projectId_project_projectId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'0 0 * * *'\"\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'user'\"\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"allowImpersonation\": {\n          \"name\": \"allowImpersonation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"internalPath\": {\n          \"name\": \"internalPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"stripPath\": {\n          \"name\": \"stripPath\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_projectId_project_projectId_fk\": {\n          \"name\": \"mariadb_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_projectId_project_projectId_fk\": {\n          \"name\": \"mongo_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_projectId_project_projectId_fk\": {\n          \"name\": \"mysql_projectId_project_projectId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupType\": {\n          \"name\": \"backupType\",\n          \"type\": \"backupType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'database'\"\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_composeId_compose_composeId_fk\": {\n          \"name\": \"backup_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_userId_user_temp_id_fk\": {\n          \"name\": \"backup_userId_user_temp_id_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"no action\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"backup_appName_unique\": {\n          \"name\": \"backup_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pid\": {\n          \"name\": \"pid\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"startedAt\": {\n          \"name\": \"startedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"finishedAt\": {\n          \"name\": \"finishedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackId\": {\n          \"name\": \"rollbackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeBackupId\": {\n          \"name\": \"volumeBackupId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_scheduleId_schedule_scheduleId_fk\": {\n          \"name\": \"deployment_scheduleId_schedule_scheduleId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"schedule\",\n          \"columnsFrom\": [\n            \"scheduleId\"\n          ],\n          \"columnsTo\": [\n            \"scheduleId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_backupId_backup_backupId_fk\": {\n          \"name\": \"deployment_backupId_backup_backupId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"backup\",\n          \"columnsFrom\": [\n            \"backupId\"\n          ],\n          \"columnsTo\": [\n            \"backupId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_rollbackId_rollback_rollbackId_fk\": {\n          \"name\": \"deployment_rollbackId_rollback_rollbackId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"rollback\",\n          \"columnsFrom\": [\n            \"rollbackId\"\n          ],\n          \"columnsTo\": [\n            \"rollbackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_volumeBackupId_volume_backup_volumeBackupId_fk\": {\n          \"name\": \"deployment_volumeBackupId_volume_backup_volumeBackupId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"volume_backup\",\n          \"columnsFrom\": [\n            \"volumeBackupId\"\n          ],\n          \"columnsTo\": [\n            \"volumeBackupId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"publishMode\": {\n          \"name\": \"publishMode\",\n          \"type\": \"publishModeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'host'\"\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_projectId_project_projectId_fk\": {\n          \"name\": \"redis_projectId_project_projectId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeploymentsVolume\": {\n          \"name\": \"isolatedDeploymentsVolume\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_projectId_project_projectId_fk\": {\n          \"name\": \"compose_projectId_project_projectId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"compose_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"git_provider_userId_user_temp_id_fk\": {\n          \"name\": \"git_provider_userId_user_temp_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitea\": {\n      \"name\": \"gitea\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"giteaUrl\": {\n          \"name\": \"giteaUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitea.com'\"\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_id\": {\n          \"name\": \"client_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_secret\": {\n          \"name\": \"client_secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scopes\": {\n          \"name\": \"scopes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'repo,repo:status,read:user,read:org'\"\n        },\n        \"last_authenticated_at\": {\n          \"name\": \"last_authenticated_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitea_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitea_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitea\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.schedule\": {\n      \"name\": \"schedule\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"cronExpression\": {\n          \"name\": \"cronExpression\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"shellType\": {\n          \"name\": \"shellType\",\n          \"type\": \"shellType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'bash'\"\n        },\n        \"scheduleType\": {\n          \"name\": \"scheduleType\",\n          \"type\": \"scheduleType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"script\": {\n          \"name\": \"script\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"schedule_applicationId_application_applicationId_fk\": {\n          \"name\": \"schedule_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_composeId_compose_composeId_fk\": {\n          \"name\": \"schedule_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_serverId_server_serverId_fk\": {\n          \"name\": \"schedule_serverId_server_serverId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_userId_user_temp_id_fk\": {\n          \"name\": \"schedule_userId_user_temp_id_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.rollback\": {\n      \"name\": \"rollback\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"rollbackId\": {\n          \"name\": \"rollbackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"version\": {\n          \"name\": \"version\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fullContext\": {\n          \"name\": \"fullContext\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"rollback_deploymentId_deployment_deploymentId_fk\": {\n          \"name\": \"rollback_deploymentId_deployment_deploymentId_fk\",\n          \"tableFrom\": \"rollback\",\n          \"tableTo\": \"deployment\",\n          \"columnsFrom\": [\n            \"deploymentId\"\n          ],\n          \"columnsTo\": [\n            \"deploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.volume_backup\": {\n      \"name\": \"volume_backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"volumeBackupId\": {\n          \"name\": \"volumeBackupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"turnOff\": {\n          \"name\": \"turnOff\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cronExpression\": {\n          \"name\": \"cronExpression\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"volume_backup_applicationId_application_applicationId_fk\": {\n          \"name\": \"volume_backup_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"volume_backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"volume_backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"volume_backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"volume_backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_redisId_redis_redisId_fk\": {\n          \"name\": \"volume_backup_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_composeId_compose_composeId_fk\": {\n          \"name\": \"volume_backup_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"volume_backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"drop\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.backupType\": {\n      \"name\": \"backupType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"database\",\n        \"compose\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\",\n        \"web-server\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.publishModeType\": {\n      \"name\": \"publishModeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"ingress\",\n        \"host\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.triggerType\": {\n      \"name\": \"triggerType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"push\",\n        \"tag\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"raw\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    },\n    \"public.scheduleType\": {\n      \"name\": \"scheduleType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"compose\",\n        \"server\",\n        \"dokploy-server\"\n      ]\n    },\n    \"public.shellType\": {\n      \"name\": \"shellType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bash\",\n        \"sh\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0107_snapshot.json",
    "content": "{\n  \"id\": \"9b77fa3f-52d5-4488-930b-1d7ef304af19\",\n  \"prevId\": \"5568024c-5daa-4554-a224-8a005a53f97c\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLabels\": {\n          \"name\": \"previewLabels\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewCustomCertResolver\": {\n          \"name\": \"previewCustomCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewRequireCollaboratorPermissions\": {\n          \"name\": \"previewRequireCollaboratorPermissions\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": true\n        },\n        \"rollbackActive\": {\n          \"name\": \"rollbackActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"cleanCache\": {\n          \"name\": \"cleanCache\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBuildPath\": {\n          \"name\": \"giteaBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"railpackVersion\": {\n          \"name\": \"railpackVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'0.2.2'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isStaticSpa\": {\n          \"name\": \"isStaticSpa\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_environmentId_environment_environmentId_fk\": {\n          \"name\": \"application_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"application_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupType\": {\n          \"name\": \"backupType\",\n          \"type\": \"backupType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'database'\"\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_composeId_compose_composeId_fk\": {\n          \"name\": \"backup_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_userId_user_temp_id_fk\": {\n          \"name\": \"backup_userId_user_temp_id_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"no action\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"backup_appName_unique\": {\n          \"name\": \"backup_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeploymentsVolume\": {\n          \"name\": \"isolatedDeploymentsVolume\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_environmentId_environment_environmentId_fk\": {\n          \"name\": \"compose_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"compose_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pid\": {\n          \"name\": \"pid\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"startedAt\": {\n          \"name\": \"startedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"finishedAt\": {\n          \"name\": \"finishedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackId\": {\n          \"name\": \"rollbackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeBackupId\": {\n          \"name\": \"volumeBackupId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_scheduleId_schedule_scheduleId_fk\": {\n          \"name\": \"deployment_scheduleId_schedule_scheduleId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"schedule\",\n          \"columnsFrom\": [\n            \"scheduleId\"\n          ],\n          \"columnsTo\": [\n            \"scheduleId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_backupId_backup_backupId_fk\": {\n          \"name\": \"deployment_backupId_backup_backupId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"backup\",\n          \"columnsFrom\": [\n            \"backupId\"\n          ],\n          \"columnsTo\": [\n            \"backupId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_rollbackId_rollback_rollbackId_fk\": {\n          \"name\": \"deployment_rollbackId_rollback_rollbackId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"rollback\",\n          \"columnsFrom\": [\n            \"rollbackId\"\n          ],\n          \"columnsTo\": [\n            \"rollbackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_volumeBackupId_volume_backup_volumeBackupId_fk\": {\n          \"name\": \"deployment_volumeBackupId_volume_backup_volumeBackupId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"volume_backup\",\n          \"columnsFrom\": [\n            \"volumeBackupId\"\n          ],\n          \"columnsTo\": [\n            \"volumeBackupId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"internalPath\": {\n          \"name\": \"internalPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"stripPath\": {\n          \"name\": \"stripPath\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.environment\": {\n      \"name\": \"environment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"environment_projectId_project_projectId_fk\": {\n          \"name\": \"environment_projectId_project_projectId_fk\",\n          \"tableFrom\": \"environment\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"git_provider_userId_user_temp_id_fk\": {\n          \"name\": \"git_provider_userId_user_temp_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitea\": {\n      \"name\": \"gitea\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"giteaUrl\": {\n          \"name\": \"giteaUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitea.com'\"\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_id\": {\n          \"name\": \"client_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_secret\": {\n          \"name\": \"client_secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scopes\": {\n          \"name\": \"scopes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'repo,repo:status,read:user,read:org'\"\n        },\n        \"last_authenticated_at\": {\n          \"name\": \"last_authenticated_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitea_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitea_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitea\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_environmentId_environment_environmentId_fk\": {\n          \"name\": \"mariadb_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_environmentId_environment_environmentId_fk\": {\n          \"name\": \"mongo_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_environmentId_environment_environmentId_fk\": {\n          \"name\": \"mysql_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"publishMode\": {\n          \"name\": \"publishMode\",\n          \"type\": \"publishModeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'host'\"\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_environmentId_environment_environmentId_fk\": {\n          \"name\": \"postgres_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_environmentId_environment_environmentId_fk\": {\n          \"name\": \"redis_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.rollback\": {\n      \"name\": \"rollback\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"rollbackId\": {\n          \"name\": \"rollbackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"version\": {\n          \"name\": \"version\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fullContext\": {\n          \"name\": \"fullContext\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"rollback_deploymentId_deployment_deploymentId_fk\": {\n          \"name\": \"rollback_deploymentId_deployment_deploymentId_fk\",\n          \"tableFrom\": \"rollback\",\n          \"tableTo\": \"deployment\",\n          \"columnsFrom\": [\n            \"deploymentId\"\n          ],\n          \"columnsTo\": [\n            \"deploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.schedule\": {\n      \"name\": \"schedule\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"cronExpression\": {\n          \"name\": \"cronExpression\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"shellType\": {\n          \"name\": \"shellType\",\n          \"type\": \"shellType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'bash'\"\n        },\n        \"scheduleType\": {\n          \"name\": \"scheduleType\",\n          \"type\": \"scheduleType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"script\": {\n          \"name\": \"script\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"schedule_applicationId_application_applicationId_fk\": {\n          \"name\": \"schedule_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_composeId_compose_composeId_fk\": {\n          \"name\": \"schedule_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_serverId_server_serverId_fk\": {\n          \"name\": \"schedule_serverId_server_serverId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_userId_user_temp_id_fk\": {\n          \"name\": \"schedule_userId_user_temp_id_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'0 0 * * *'\"\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'user'\"\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"allowImpersonation\": {\n          \"name\": \"allowImpersonation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.volume_backup\": {\n      \"name\": \"volume_backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"volumeBackupId\": {\n          \"name\": \"volumeBackupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"turnOff\": {\n          \"name\": \"turnOff\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cronExpression\": {\n          \"name\": \"cronExpression\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"volume_backup_applicationId_application_applicationId_fk\": {\n          \"name\": \"volume_backup_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"volume_backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"volume_backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"volume_backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"volume_backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_redisId_redis_redisId_fk\": {\n          \"name\": \"volume_backup_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_composeId_compose_composeId_fk\": {\n          \"name\": \"volume_backup_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"volume_backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"drop\"\n      ]\n    },\n    \"public.backupType\": {\n      \"name\": \"backupType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"database\",\n        \"compose\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\",\n        \"web-server\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"raw\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.publishModeType\": {\n      \"name\": \"publishModeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"ingress\",\n        \"host\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.scheduleType\": {\n      \"name\": \"scheduleType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"compose\",\n        \"server\",\n        \"dokploy-server\"\n      ]\n    },\n    \"public.shellType\": {\n      \"name\": \"shellType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bash\",\n        \"sh\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.triggerType\": {\n      \"name\": \"triggerType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"push\",\n        \"tag\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0109_snapshot.json",
    "content": "{\n  \"id\": \"b5e88b4f-1396-4456-b338-65c93e2194fa\",\n  \"prevId\": \"2d54f3c4-4e0c-4253-8fdc-a4c56ae270de\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accessedEnvironments\": {\n          \"name\": \"accessedEnvironments\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLabels\": {\n          \"name\": \"previewLabels\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewCustomCertResolver\": {\n          \"name\": \"previewCustomCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewRequireCollaboratorPermissions\": {\n          \"name\": \"previewRequireCollaboratorPermissions\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": true\n        },\n        \"rollbackActive\": {\n          \"name\": \"rollbackActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"cleanCache\": {\n          \"name\": \"cleanCache\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBuildPath\": {\n          \"name\": \"giteaBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"railpackVersion\": {\n          \"name\": \"railpackVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'0.2.2'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isStaticSpa\": {\n          \"name\": \"isStaticSpa\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_environmentId_environment_environmentId_fk\": {\n          \"name\": \"application_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"application_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupType\": {\n          \"name\": \"backupType\",\n          \"type\": \"backupType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'database'\"\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_composeId_compose_composeId_fk\": {\n          \"name\": \"backup_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_userId_user_temp_id_fk\": {\n          \"name\": \"backup_userId_user_temp_id_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"no action\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"backup_appName_unique\": {\n          \"name\": \"backup_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeploymentsVolume\": {\n          \"name\": \"isolatedDeploymentsVolume\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_environmentId_environment_environmentId_fk\": {\n          \"name\": \"compose_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"compose_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pid\": {\n          \"name\": \"pid\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"startedAt\": {\n          \"name\": \"startedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"finishedAt\": {\n          \"name\": \"finishedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackId\": {\n          \"name\": \"rollbackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeBackupId\": {\n          \"name\": \"volumeBackupId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_scheduleId_schedule_scheduleId_fk\": {\n          \"name\": \"deployment_scheduleId_schedule_scheduleId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"schedule\",\n          \"columnsFrom\": [\n            \"scheduleId\"\n          ],\n          \"columnsTo\": [\n            \"scheduleId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_backupId_backup_backupId_fk\": {\n          \"name\": \"deployment_backupId_backup_backupId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"backup\",\n          \"columnsFrom\": [\n            \"backupId\"\n          ],\n          \"columnsTo\": [\n            \"backupId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_rollbackId_rollback_rollbackId_fk\": {\n          \"name\": \"deployment_rollbackId_rollback_rollbackId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"rollback\",\n          \"columnsFrom\": [\n            \"rollbackId\"\n          ],\n          \"columnsTo\": [\n            \"rollbackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_volumeBackupId_volume_backup_volumeBackupId_fk\": {\n          \"name\": \"deployment_volumeBackupId_volume_backup_volumeBackupId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"volume_backup\",\n          \"columnsFrom\": [\n            \"volumeBackupId\"\n          ],\n          \"columnsTo\": [\n            \"volumeBackupId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"internalPath\": {\n          \"name\": \"internalPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"stripPath\": {\n          \"name\": \"stripPath\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.environment\": {\n      \"name\": \"environment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"environment_projectId_project_projectId_fk\": {\n          \"name\": \"environment_projectId_project_projectId_fk\",\n          \"tableFrom\": \"environment\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"git_provider_userId_user_temp_id_fk\": {\n          \"name\": \"git_provider_userId_user_temp_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitea\": {\n      \"name\": \"gitea\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"giteaUrl\": {\n          \"name\": \"giteaUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitea.com'\"\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_id\": {\n          \"name\": \"client_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_secret\": {\n          \"name\": \"client_secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scopes\": {\n          \"name\": \"scopes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'repo,repo:status,read:user,read:org'\"\n        },\n        \"last_authenticated_at\": {\n          \"name\": \"last_authenticated_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitea_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitea_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitea\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_environmentId_environment_environmentId_fk\": {\n          \"name\": \"mariadb_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_environmentId_environment_environmentId_fk\": {\n          \"name\": \"mongo_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_environmentId_environment_environmentId_fk\": {\n          \"name\": \"mysql_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"publishMode\": {\n          \"name\": \"publishMode\",\n          \"type\": \"publishModeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'host'\"\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_environmentId_environment_environmentId_fk\": {\n          \"name\": \"postgres_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_environmentId_environment_environmentId_fk\": {\n          \"name\": \"redis_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.rollback\": {\n      \"name\": \"rollback\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"rollbackId\": {\n          \"name\": \"rollbackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"version\": {\n          \"name\": \"version\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fullContext\": {\n          \"name\": \"fullContext\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"rollback_deploymentId_deployment_deploymentId_fk\": {\n          \"name\": \"rollback_deploymentId_deployment_deploymentId_fk\",\n          \"tableFrom\": \"rollback\",\n          \"tableTo\": \"deployment\",\n          \"columnsFrom\": [\n            \"deploymentId\"\n          ],\n          \"columnsTo\": [\n            \"deploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.schedule\": {\n      \"name\": \"schedule\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"cronExpression\": {\n          \"name\": \"cronExpression\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"shellType\": {\n          \"name\": \"shellType\",\n          \"type\": \"shellType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'bash'\"\n        },\n        \"scheduleType\": {\n          \"name\": \"scheduleType\",\n          \"type\": \"scheduleType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"script\": {\n          \"name\": \"script\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"schedule_applicationId_application_applicationId_fk\": {\n          \"name\": \"schedule_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_composeId_compose_composeId_fk\": {\n          \"name\": \"schedule_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_serverId_server_serverId_fk\": {\n          \"name\": \"schedule_serverId_server_serverId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_userId_user_temp_id_fk\": {\n          \"name\": \"schedule_userId_user_temp_id_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'0 0 * * *'\"\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'user'\"\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"allowImpersonation\": {\n          \"name\": \"allowImpersonation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.volume_backup\": {\n      \"name\": \"volume_backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"volumeBackupId\": {\n          \"name\": \"volumeBackupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"turnOff\": {\n          \"name\": \"turnOff\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cronExpression\": {\n          \"name\": \"cronExpression\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"volume_backup_applicationId_application_applicationId_fk\": {\n          \"name\": \"volume_backup_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"volume_backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"volume_backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"volume_backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"volume_backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_redisId_redis_redisId_fk\": {\n          \"name\": \"volume_backup_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_composeId_compose_composeId_fk\": {\n          \"name\": \"volume_backup_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"volume_backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"drop\"\n      ]\n    },\n    \"public.backupType\": {\n      \"name\": \"backupType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"database\",\n        \"compose\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\",\n        \"web-server\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"raw\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.publishModeType\": {\n      \"name\": \"publishModeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"ingress\",\n        \"host\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.scheduleType\": {\n      \"name\": \"scheduleType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"compose\",\n        \"server\",\n        \"dokploy-server\"\n      ]\n    },\n    \"public.shellType\": {\n      \"name\": \"shellType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bash\",\n        \"sh\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.triggerType\": {\n      \"name\": \"triggerType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"push\",\n        \"tag\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0110_snapshot.json",
    "content": "{\n  \"id\": \"9f9b4142-e739-4c21-8618-676d62e9b5ae\",\n  \"prevId\": \"b5e88b4f-1396-4456-b338-65c93e2194fa\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accessedEnvironments\": {\n          \"name\": \"accessedEnvironments\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLabels\": {\n          \"name\": \"previewLabels\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewCustomCertResolver\": {\n          \"name\": \"previewCustomCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewRequireCollaboratorPermissions\": {\n          \"name\": \"previewRequireCollaboratorPermissions\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": true\n        },\n        \"rollbackActive\": {\n          \"name\": \"rollbackActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"cleanCache\": {\n          \"name\": \"cleanCache\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBuildPath\": {\n          \"name\": \"giteaBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"railpackVersion\": {\n          \"name\": \"railpackVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'0.2.2'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isStaticSpa\": {\n          \"name\": \"isStaticSpa\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_environmentId_environment_environmentId_fk\": {\n          \"name\": \"application_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"application_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupType\": {\n          \"name\": \"backupType\",\n          \"type\": \"backupType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'database'\"\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_composeId_compose_composeId_fk\": {\n          \"name\": \"backup_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_userId_user_temp_id_fk\": {\n          \"name\": \"backup_userId_user_temp_id_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"no action\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"backup_appName_unique\": {\n          \"name\": \"backup_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeploymentsVolume\": {\n          \"name\": \"isolatedDeploymentsVolume\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_environmentId_environment_environmentId_fk\": {\n          \"name\": \"compose_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"compose_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pid\": {\n          \"name\": \"pid\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"startedAt\": {\n          \"name\": \"startedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"finishedAt\": {\n          \"name\": \"finishedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackId\": {\n          \"name\": \"rollbackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeBackupId\": {\n          \"name\": \"volumeBackupId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_scheduleId_schedule_scheduleId_fk\": {\n          \"name\": \"deployment_scheduleId_schedule_scheduleId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"schedule\",\n          \"columnsFrom\": [\n            \"scheduleId\"\n          ],\n          \"columnsTo\": [\n            \"scheduleId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_backupId_backup_backupId_fk\": {\n          \"name\": \"deployment_backupId_backup_backupId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"backup\",\n          \"columnsFrom\": [\n            \"backupId\"\n          ],\n          \"columnsTo\": [\n            \"backupId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_rollbackId_rollback_rollbackId_fk\": {\n          \"name\": \"deployment_rollbackId_rollback_rollbackId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"rollback\",\n          \"columnsFrom\": [\n            \"rollbackId\"\n          ],\n          \"columnsTo\": [\n            \"rollbackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_volumeBackupId_volume_backup_volumeBackupId_fk\": {\n          \"name\": \"deployment_volumeBackupId_volume_backup_volumeBackupId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"volume_backup\",\n          \"columnsFrom\": [\n            \"volumeBackupId\"\n          ],\n          \"columnsTo\": [\n            \"volumeBackupId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"internalPath\": {\n          \"name\": \"internalPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"stripPath\": {\n          \"name\": \"stripPath\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.environment\": {\n      \"name\": \"environment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"environment_projectId_project_projectId_fk\": {\n          \"name\": \"environment_projectId_project_projectId_fk\",\n          \"tableFrom\": \"environment\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"git_provider_userId_user_temp_id_fk\": {\n          \"name\": \"git_provider_userId_user_temp_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitea\": {\n      \"name\": \"gitea\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"giteaUrl\": {\n          \"name\": \"giteaUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitea.com'\"\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_id\": {\n          \"name\": \"client_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_secret\": {\n          \"name\": \"client_secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scopes\": {\n          \"name\": \"scopes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'repo,repo:status,read:user,read:org'\"\n        },\n        \"last_authenticated_at\": {\n          \"name\": \"last_authenticated_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitea_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitea_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitea\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_environmentId_environment_environmentId_fk\": {\n          \"name\": \"mariadb_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_environmentId_environment_environmentId_fk\": {\n          \"name\": \"mongo_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_environmentId_environment_environmentId_fk\": {\n          \"name\": \"mysql_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ntfyId\": {\n          \"name\": \"ntfyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_ntfyId_ntfy_ntfyId_fk\": {\n          \"name\": \"notification_ntfyId_ntfy_ntfyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"ntfy\",\n          \"columnsFrom\": [\n            \"ntfyId\"\n          ],\n          \"columnsTo\": [\n            \"ntfyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ntfy\": {\n      \"name\": \"ntfy\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"ntfyId\": {\n          \"name\": \"ntfyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"topic\": {\n          \"name\": \"topic\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessToken\": {\n          \"name\": \"accessToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 3\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"publishMode\": {\n          \"name\": \"publishMode\",\n          \"type\": \"publishModeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'host'\"\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_environmentId_environment_environmentId_fk\": {\n          \"name\": \"postgres_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_environmentId_environment_environmentId_fk\": {\n          \"name\": \"redis_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.rollback\": {\n      \"name\": \"rollback\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"rollbackId\": {\n          \"name\": \"rollbackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"version\": {\n          \"name\": \"version\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fullContext\": {\n          \"name\": \"fullContext\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"rollback_deploymentId_deployment_deploymentId_fk\": {\n          \"name\": \"rollback_deploymentId_deployment_deploymentId_fk\",\n          \"tableFrom\": \"rollback\",\n          \"tableTo\": \"deployment\",\n          \"columnsFrom\": [\n            \"deploymentId\"\n          ],\n          \"columnsTo\": [\n            \"deploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.schedule\": {\n      \"name\": \"schedule\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"cronExpression\": {\n          \"name\": \"cronExpression\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"shellType\": {\n          \"name\": \"shellType\",\n          \"type\": \"shellType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'bash'\"\n        },\n        \"scheduleType\": {\n          \"name\": \"scheduleType\",\n          \"type\": \"scheduleType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"script\": {\n          \"name\": \"script\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"schedule_applicationId_application_applicationId_fk\": {\n          \"name\": \"schedule_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_composeId_compose_composeId_fk\": {\n          \"name\": \"schedule_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_serverId_server_serverId_fk\": {\n          \"name\": \"schedule_serverId_server_serverId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_userId_user_temp_id_fk\": {\n          \"name\": \"schedule_userId_user_temp_id_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'0 0 * * *'\"\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'user'\"\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"allowImpersonation\": {\n          \"name\": \"allowImpersonation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.volume_backup\": {\n      \"name\": \"volume_backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"volumeBackupId\": {\n          \"name\": \"volumeBackupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"turnOff\": {\n          \"name\": \"turnOff\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cronExpression\": {\n          \"name\": \"cronExpression\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"volume_backup_applicationId_application_applicationId_fk\": {\n          \"name\": \"volume_backup_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"volume_backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"volume_backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"volume_backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"volume_backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_redisId_redis_redisId_fk\": {\n          \"name\": \"volume_backup_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_composeId_compose_composeId_fk\": {\n          \"name\": \"volume_backup_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"volume_backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"drop\"\n      ]\n    },\n    \"public.backupType\": {\n      \"name\": \"backupType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"database\",\n        \"compose\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\",\n        \"web-server\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"raw\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\",\n        \"ntfy\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.publishModeType\": {\n      \"name\": \"publishModeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"ingress\",\n        \"host\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.scheduleType\": {\n      \"name\": \"scheduleType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"compose\",\n        \"server\",\n        \"dokploy-server\"\n      ]\n    },\n    \"public.shellType\": {\n      \"name\": \"shellType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bash\",\n        \"sh\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.triggerType\": {\n      \"name\": \"triggerType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"push\",\n        \"tag\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0111_snapshot.json",
    "content": "{\n  \"id\": \"4512f45f-c14f-4bbe-a5f3-7470ae505d4f\",\n  \"prevId\": \"9f9b4142-e739-4c21-8618-676d62e9b5ae\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accessedEnvironments\": {\n          \"name\": \"accessedEnvironments\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLabels\": {\n          \"name\": \"previewLabels\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewCustomCertResolver\": {\n          \"name\": \"previewCustomCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewRequireCollaboratorPermissions\": {\n          \"name\": \"previewRequireCollaboratorPermissions\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": true\n        },\n        \"rollbackActive\": {\n          \"name\": \"rollbackActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"cleanCache\": {\n          \"name\": \"cleanCache\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBuildPath\": {\n          \"name\": \"giteaBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"railpackVersion\": {\n          \"name\": \"railpackVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'0.2.2'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isStaticSpa\": {\n          \"name\": \"isStaticSpa\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_environmentId_environment_environmentId_fk\": {\n          \"name\": \"application_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"application_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupType\": {\n          \"name\": \"backupType\",\n          \"type\": \"backupType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'database'\"\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_composeId_compose_composeId_fk\": {\n          \"name\": \"backup_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_userId_user_temp_id_fk\": {\n          \"name\": \"backup_userId_user_temp_id_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"no action\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"backup_appName_unique\": {\n          \"name\": \"backup_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"apiToken\": {\n          \"name\": \"apiToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeploymentsVolume\": {\n          \"name\": \"isolatedDeploymentsVolume\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_environmentId_environment_environmentId_fk\": {\n          \"name\": \"compose_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"compose_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pid\": {\n          \"name\": \"pid\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"startedAt\": {\n          \"name\": \"startedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"finishedAt\": {\n          \"name\": \"finishedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackId\": {\n          \"name\": \"rollbackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeBackupId\": {\n          \"name\": \"volumeBackupId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_scheduleId_schedule_scheduleId_fk\": {\n          \"name\": \"deployment_scheduleId_schedule_scheduleId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"schedule\",\n          \"columnsFrom\": [\n            \"scheduleId\"\n          ],\n          \"columnsTo\": [\n            \"scheduleId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_backupId_backup_backupId_fk\": {\n          \"name\": \"deployment_backupId_backup_backupId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"backup\",\n          \"columnsFrom\": [\n            \"backupId\"\n          ],\n          \"columnsTo\": [\n            \"backupId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_rollbackId_rollback_rollbackId_fk\": {\n          \"name\": \"deployment_rollbackId_rollback_rollbackId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"rollback\",\n          \"columnsFrom\": [\n            \"rollbackId\"\n          ],\n          \"columnsTo\": [\n            \"rollbackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_volumeBackupId_volume_backup_volumeBackupId_fk\": {\n          \"name\": \"deployment_volumeBackupId_volume_backup_volumeBackupId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"volume_backup\",\n          \"columnsFrom\": [\n            \"volumeBackupId\"\n          ],\n          \"columnsTo\": [\n            \"volumeBackupId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"internalPath\": {\n          \"name\": \"internalPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"stripPath\": {\n          \"name\": \"stripPath\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.environment\": {\n      \"name\": \"environment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"environment_projectId_project_projectId_fk\": {\n          \"name\": \"environment_projectId_project_projectId_fk\",\n          \"tableFrom\": \"environment\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"git_provider_userId_user_temp_id_fk\": {\n          \"name\": \"git_provider_userId_user_temp_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitea\": {\n      \"name\": \"gitea\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"giteaUrl\": {\n          \"name\": \"giteaUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitea.com'\"\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_id\": {\n          \"name\": \"client_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_secret\": {\n          \"name\": \"client_secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scopes\": {\n          \"name\": \"scopes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'repo,repo:status,read:user,read:org'\"\n        },\n        \"last_authenticated_at\": {\n          \"name\": \"last_authenticated_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitea_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitea_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitea\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_environmentId_environment_environmentId_fk\": {\n          \"name\": \"mariadb_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_environmentId_environment_environmentId_fk\": {\n          \"name\": \"mongo_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_environmentId_environment_environmentId_fk\": {\n          \"name\": \"mysql_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ntfyId\": {\n          \"name\": \"ntfyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_ntfyId_ntfy_ntfyId_fk\": {\n          \"name\": \"notification_ntfyId_ntfy_ntfyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"ntfy\",\n          \"columnsFrom\": [\n            \"ntfyId\"\n          ],\n          \"columnsTo\": [\n            \"ntfyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ntfy\": {\n      \"name\": \"ntfy\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"ntfyId\": {\n          \"name\": \"ntfyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"topic\": {\n          \"name\": \"topic\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessToken\": {\n          \"name\": \"accessToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 3\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"publishMode\": {\n          \"name\": \"publishMode\",\n          \"type\": \"publishModeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'host'\"\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_environmentId_environment_environmentId_fk\": {\n          \"name\": \"postgres_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_environmentId_environment_environmentId_fk\": {\n          \"name\": \"redis_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.rollback\": {\n      \"name\": \"rollback\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"rollbackId\": {\n          \"name\": \"rollbackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"version\": {\n          \"name\": \"version\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fullContext\": {\n          \"name\": \"fullContext\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"rollback_deploymentId_deployment_deploymentId_fk\": {\n          \"name\": \"rollback_deploymentId_deployment_deploymentId_fk\",\n          \"tableFrom\": \"rollback\",\n          \"tableTo\": \"deployment\",\n          \"columnsFrom\": [\n            \"deploymentId\"\n          ],\n          \"columnsTo\": [\n            \"deploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.schedule\": {\n      \"name\": \"schedule\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"cronExpression\": {\n          \"name\": \"cronExpression\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"shellType\": {\n          \"name\": \"shellType\",\n          \"type\": \"shellType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'bash'\"\n        },\n        \"scheduleType\": {\n          \"name\": \"scheduleType\",\n          \"type\": \"scheduleType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"script\": {\n          \"name\": \"script\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"schedule_applicationId_application_applicationId_fk\": {\n          \"name\": \"schedule_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_composeId_compose_composeId_fk\": {\n          \"name\": \"schedule_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_serverId_server_serverId_fk\": {\n          \"name\": \"schedule_serverId_server_serverId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_userId_user_temp_id_fk\": {\n          \"name\": \"schedule_userId_user_temp_id_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'0 0 * * *'\"\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'user'\"\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"allowImpersonation\": {\n          \"name\": \"allowImpersonation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.volume_backup\": {\n      \"name\": \"volume_backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"volumeBackupId\": {\n          \"name\": \"volumeBackupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"turnOff\": {\n          \"name\": \"turnOff\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cronExpression\": {\n          \"name\": \"cronExpression\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"volume_backup_applicationId_application_applicationId_fk\": {\n          \"name\": \"volume_backup_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"volume_backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"volume_backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"volume_backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"volume_backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_redisId_redis_redisId_fk\": {\n          \"name\": \"volume_backup_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_composeId_compose_composeId_fk\": {\n          \"name\": \"volume_backup_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"volume_backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"drop\"\n      ]\n    },\n    \"public.backupType\": {\n      \"name\": \"backupType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"database\",\n        \"compose\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\",\n        \"web-server\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"raw\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\",\n        \"ntfy\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.publishModeType\": {\n      \"name\": \"publishModeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"ingress\",\n        \"host\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.scheduleType\": {\n      \"name\": \"scheduleType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"compose\",\n        \"server\",\n        \"dokploy-server\"\n      ]\n    },\n    \"public.shellType\": {\n      \"name\": \"shellType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bash\",\n        \"sh\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.triggerType\": {\n      \"name\": \"triggerType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"push\",\n        \"tag\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0115_snapshot.json",
    "content": "{\n  \"id\": \"b3bfd4b0-5ad1-4a76-8858-1e585c3ef9dc\",\n  \"prevId\": \"70e92aa8-56d1-4842-b844-775cb8198849\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateEnvironments\": {\n          \"name\": \"canCreateEnvironments\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accessedEnvironments\": {\n          \"name\": \"accessedEnvironments\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLabels\": {\n          \"name\": \"previewLabels\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewCustomCertResolver\": {\n          \"name\": \"previewCustomCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewRequireCollaboratorPermissions\": {\n          \"name\": \"previewRequireCollaboratorPermissions\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": true\n        },\n        \"rollbackActive\": {\n          \"name\": \"rollbackActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"cleanCache\": {\n          \"name\": \"cleanCache\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBuildPath\": {\n          \"name\": \"giteaBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stopGracePeriodSwarm\": {\n          \"name\": \"stopGracePeriodSwarm\",\n          \"type\": \"bigint\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"railpackVersion\": {\n          \"name\": \"railpackVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'0.2.2'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isStaticSpa\": {\n          \"name\": \"isStaticSpa\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_environmentId_environment_environmentId_fk\": {\n          \"name\": \"application_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"application_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupType\": {\n          \"name\": \"backupType\",\n          \"type\": \"backupType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'database'\"\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_composeId_compose_composeId_fk\": {\n          \"name\": \"backup_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_userId_user_temp_id_fk\": {\n          \"name\": \"backup_userId_user_temp_id_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"no action\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"backup_appName_unique\": {\n          \"name\": \"backup_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketEmail\": {\n          \"name\": \"bitbucketEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"apiToken\": {\n          \"name\": \"apiToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeploymentsVolume\": {\n          \"name\": \"isolatedDeploymentsVolume\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_environmentId_environment_environmentId_fk\": {\n          \"name\": \"compose_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"compose_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pid\": {\n          \"name\": \"pid\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"startedAt\": {\n          \"name\": \"startedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"finishedAt\": {\n          \"name\": \"finishedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackId\": {\n          \"name\": \"rollbackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeBackupId\": {\n          \"name\": \"volumeBackupId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_scheduleId_schedule_scheduleId_fk\": {\n          \"name\": \"deployment_scheduleId_schedule_scheduleId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"schedule\",\n          \"columnsFrom\": [\n            \"scheduleId\"\n          ],\n          \"columnsTo\": [\n            \"scheduleId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_backupId_backup_backupId_fk\": {\n          \"name\": \"deployment_backupId_backup_backupId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"backup\",\n          \"columnsFrom\": [\n            \"backupId\"\n          ],\n          \"columnsTo\": [\n            \"backupId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_rollbackId_rollback_rollbackId_fk\": {\n          \"name\": \"deployment_rollbackId_rollback_rollbackId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"rollback\",\n          \"columnsFrom\": [\n            \"rollbackId\"\n          ],\n          \"columnsTo\": [\n            \"rollbackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_volumeBackupId_volume_backup_volumeBackupId_fk\": {\n          \"name\": \"deployment_volumeBackupId_volume_backup_volumeBackupId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"volume_backup\",\n          \"columnsFrom\": [\n            \"volumeBackupId\"\n          ],\n          \"columnsTo\": [\n            \"volumeBackupId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"internalPath\": {\n          \"name\": \"internalPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"stripPath\": {\n          \"name\": \"stripPath\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.environment\": {\n      \"name\": \"environment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"environment_projectId_project_projectId_fk\": {\n          \"name\": \"environment_projectId_project_projectId_fk\",\n          \"tableFrom\": \"environment\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"git_provider_userId_user_temp_id_fk\": {\n          \"name\": \"git_provider_userId_user_temp_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitea\": {\n      \"name\": \"gitea\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"giteaUrl\": {\n          \"name\": \"giteaUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitea.com'\"\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_id\": {\n          \"name\": \"client_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_secret\": {\n          \"name\": \"client_secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scopes\": {\n          \"name\": \"scopes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'repo,repo:status,read:user,read:org'\"\n        },\n        \"last_authenticated_at\": {\n          \"name\": \"last_authenticated_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitea_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitea_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitea\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stopGracePeriodSwarm\": {\n          \"name\": \"stopGracePeriodSwarm\",\n          \"type\": \"bigint\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_environmentId_environment_environmentId_fk\": {\n          \"name\": \"mariadb_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stopGracePeriodSwarm\": {\n          \"name\": \"stopGracePeriodSwarm\",\n          \"type\": \"bigint\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_environmentId_environment_environmentId_fk\": {\n          \"name\": \"mongo_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stopGracePeriodSwarm\": {\n          \"name\": \"stopGracePeriodSwarm\",\n          \"type\": \"bigint\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_environmentId_environment_environmentId_fk\": {\n          \"name\": \"mysql_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ntfyId\": {\n          \"name\": \"ntfyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_ntfyId_ntfy_ntfyId_fk\": {\n          \"name\": \"notification_ntfyId_ntfy_ntfyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"ntfy\",\n          \"columnsFrom\": [\n            \"ntfyId\"\n          ],\n          \"columnsTo\": [\n            \"ntfyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ntfy\": {\n      \"name\": \"ntfy\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"ntfyId\": {\n          \"name\": \"ntfyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"topic\": {\n          \"name\": \"topic\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessToken\": {\n          \"name\": \"accessToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 3\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"publishMode\": {\n          \"name\": \"publishMode\",\n          \"type\": \"publishModeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'host'\"\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stopGracePeriodSwarm\": {\n          \"name\": \"stopGracePeriodSwarm\",\n          \"type\": \"bigint\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_environmentId_environment_environmentId_fk\": {\n          \"name\": \"postgres_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stopGracePeriodSwarm\": {\n          \"name\": \"stopGracePeriodSwarm\",\n          \"type\": \"bigint\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_environmentId_environment_environmentId_fk\": {\n          \"name\": \"redis_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.rollback\": {\n      \"name\": \"rollback\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"rollbackId\": {\n          \"name\": \"rollbackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"version\": {\n          \"name\": \"version\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fullContext\": {\n          \"name\": \"fullContext\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"rollback_deploymentId_deployment_deploymentId_fk\": {\n          \"name\": \"rollback_deploymentId_deployment_deploymentId_fk\",\n          \"tableFrom\": \"rollback\",\n          \"tableTo\": \"deployment\",\n          \"columnsFrom\": [\n            \"deploymentId\"\n          ],\n          \"columnsTo\": [\n            \"deploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.schedule\": {\n      \"name\": \"schedule\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"cronExpression\": {\n          \"name\": \"cronExpression\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"shellType\": {\n          \"name\": \"shellType\",\n          \"type\": \"shellType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'bash'\"\n        },\n        \"scheduleType\": {\n          \"name\": \"scheduleType\",\n          \"type\": \"scheduleType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"script\": {\n          \"name\": \"script\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"schedule_applicationId_application_applicationId_fk\": {\n          \"name\": \"schedule_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_composeId_compose_composeId_fk\": {\n          \"name\": \"schedule_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_serverId_server_serverId_fk\": {\n          \"name\": \"schedule_serverId_server_serverId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_userId_user_temp_id_fk\": {\n          \"name\": \"schedule_userId_user_temp_id_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'0 0 * * *'\"\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'user'\"\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"allowImpersonation\": {\n          \"name\": \"allowImpersonation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.volume_backup\": {\n      \"name\": \"volume_backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"volumeBackupId\": {\n          \"name\": \"volumeBackupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"turnOff\": {\n          \"name\": \"turnOff\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cronExpression\": {\n          \"name\": \"cronExpression\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"volume_backup_applicationId_application_applicationId_fk\": {\n          \"name\": \"volume_backup_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"volume_backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"volume_backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"volume_backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"volume_backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_redisId_redis_redisId_fk\": {\n          \"name\": \"volume_backup_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_composeId_compose_composeId_fk\": {\n          \"name\": \"volume_backup_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"volume_backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"drop\"\n      ]\n    },\n    \"public.backupType\": {\n      \"name\": \"backupType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"database\",\n        \"compose\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\",\n        \"web-server\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"raw\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\",\n        \"cancelled\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\",\n        \"ntfy\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.publishModeType\": {\n      \"name\": \"publishModeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"ingress\",\n        \"host\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.scheduleType\": {\n      \"name\": \"scheduleType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"compose\",\n        \"server\",\n        \"dokploy-server\"\n      ]\n    },\n    \"public.shellType\": {\n      \"name\": \"shellType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bash\",\n        \"sh\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.triggerType\": {\n      \"name\": \"triggerType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"push\",\n        \"tag\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0116_snapshot.json",
    "content": "{\n  \"id\": \"def4c7aa-bf14-4060-8f54-60ef3a79a5ea\",\n  \"prevId\": \"b3bfd4b0-5ad1-4a76-8858-1e585c3ef9dc\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteEnvironments\": {\n          \"name\": \"canDeleteEnvironments\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateEnvironments\": {\n          \"name\": \"canCreateEnvironments\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accessedEnvironments\": {\n          \"name\": \"accessedEnvironments\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLabels\": {\n          \"name\": \"previewLabels\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewCustomCertResolver\": {\n          \"name\": \"previewCustomCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewRequireCollaboratorPermissions\": {\n          \"name\": \"previewRequireCollaboratorPermissions\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": true\n        },\n        \"rollbackActive\": {\n          \"name\": \"rollbackActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"cleanCache\": {\n          \"name\": \"cleanCache\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBuildPath\": {\n          \"name\": \"giteaBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stopGracePeriodSwarm\": {\n          \"name\": \"stopGracePeriodSwarm\",\n          \"type\": \"bigint\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"railpackVersion\": {\n          \"name\": \"railpackVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'0.2.2'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isStaticSpa\": {\n          \"name\": \"isStaticSpa\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_environmentId_environment_environmentId_fk\": {\n          \"name\": \"application_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"application_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupType\": {\n          \"name\": \"backupType\",\n          \"type\": \"backupType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'database'\"\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_composeId_compose_composeId_fk\": {\n          \"name\": \"backup_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_userId_user_temp_id_fk\": {\n          \"name\": \"backup_userId_user_temp_id_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"no action\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"backup_appName_unique\": {\n          \"name\": \"backup_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketEmail\": {\n          \"name\": \"bitbucketEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"apiToken\": {\n          \"name\": \"apiToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeploymentsVolume\": {\n          \"name\": \"isolatedDeploymentsVolume\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_environmentId_environment_environmentId_fk\": {\n          \"name\": \"compose_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"compose_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pid\": {\n          \"name\": \"pid\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"startedAt\": {\n          \"name\": \"startedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"finishedAt\": {\n          \"name\": \"finishedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackId\": {\n          \"name\": \"rollbackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeBackupId\": {\n          \"name\": \"volumeBackupId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_scheduleId_schedule_scheduleId_fk\": {\n          \"name\": \"deployment_scheduleId_schedule_scheduleId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"schedule\",\n          \"columnsFrom\": [\n            \"scheduleId\"\n          ],\n          \"columnsTo\": [\n            \"scheduleId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_backupId_backup_backupId_fk\": {\n          \"name\": \"deployment_backupId_backup_backupId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"backup\",\n          \"columnsFrom\": [\n            \"backupId\"\n          ],\n          \"columnsTo\": [\n            \"backupId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_rollbackId_rollback_rollbackId_fk\": {\n          \"name\": \"deployment_rollbackId_rollback_rollbackId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"rollback\",\n          \"columnsFrom\": [\n            \"rollbackId\"\n          ],\n          \"columnsTo\": [\n            \"rollbackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_volumeBackupId_volume_backup_volumeBackupId_fk\": {\n          \"name\": \"deployment_volumeBackupId_volume_backup_volumeBackupId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"volume_backup\",\n          \"columnsFrom\": [\n            \"volumeBackupId\"\n          ],\n          \"columnsTo\": [\n            \"volumeBackupId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"internalPath\": {\n          \"name\": \"internalPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"stripPath\": {\n          \"name\": \"stripPath\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.environment\": {\n      \"name\": \"environment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"environment_projectId_project_projectId_fk\": {\n          \"name\": \"environment_projectId_project_projectId_fk\",\n          \"tableFrom\": \"environment\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"git_provider_userId_user_temp_id_fk\": {\n          \"name\": \"git_provider_userId_user_temp_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitea\": {\n      \"name\": \"gitea\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"giteaUrl\": {\n          \"name\": \"giteaUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitea.com'\"\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_id\": {\n          \"name\": \"client_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_secret\": {\n          \"name\": \"client_secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scopes\": {\n          \"name\": \"scopes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'repo,repo:status,read:user,read:org'\"\n        },\n        \"last_authenticated_at\": {\n          \"name\": \"last_authenticated_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitea_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitea_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitea\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stopGracePeriodSwarm\": {\n          \"name\": \"stopGracePeriodSwarm\",\n          \"type\": \"bigint\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_environmentId_environment_environmentId_fk\": {\n          \"name\": \"mariadb_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stopGracePeriodSwarm\": {\n          \"name\": \"stopGracePeriodSwarm\",\n          \"type\": \"bigint\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_environmentId_environment_environmentId_fk\": {\n          \"name\": \"mongo_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stopGracePeriodSwarm\": {\n          \"name\": \"stopGracePeriodSwarm\",\n          \"type\": \"bigint\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_environmentId_environment_environmentId_fk\": {\n          \"name\": \"mysql_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ntfyId\": {\n          \"name\": \"ntfyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_ntfyId_ntfy_ntfyId_fk\": {\n          \"name\": \"notification_ntfyId_ntfy_ntfyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"ntfy\",\n          \"columnsFrom\": [\n            \"ntfyId\"\n          ],\n          \"columnsTo\": [\n            \"ntfyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ntfy\": {\n      \"name\": \"ntfy\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"ntfyId\": {\n          \"name\": \"ntfyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"topic\": {\n          \"name\": \"topic\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessToken\": {\n          \"name\": \"accessToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 3\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"publishMode\": {\n          \"name\": \"publishMode\",\n          \"type\": \"publishModeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'host'\"\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stopGracePeriodSwarm\": {\n          \"name\": \"stopGracePeriodSwarm\",\n          \"type\": \"bigint\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_environmentId_environment_environmentId_fk\": {\n          \"name\": \"postgres_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stopGracePeriodSwarm\": {\n          \"name\": \"stopGracePeriodSwarm\",\n          \"type\": \"bigint\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_environmentId_environment_environmentId_fk\": {\n          \"name\": \"redis_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.rollback\": {\n      \"name\": \"rollback\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"rollbackId\": {\n          \"name\": \"rollbackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"version\": {\n          \"name\": \"version\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fullContext\": {\n          \"name\": \"fullContext\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"rollback_deploymentId_deployment_deploymentId_fk\": {\n          \"name\": \"rollback_deploymentId_deployment_deploymentId_fk\",\n          \"tableFrom\": \"rollback\",\n          \"tableTo\": \"deployment\",\n          \"columnsFrom\": [\n            \"deploymentId\"\n          ],\n          \"columnsTo\": [\n            \"deploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.schedule\": {\n      \"name\": \"schedule\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"cronExpression\": {\n          \"name\": \"cronExpression\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"shellType\": {\n          \"name\": \"shellType\",\n          \"type\": \"shellType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'bash'\"\n        },\n        \"scheduleType\": {\n          \"name\": \"scheduleType\",\n          \"type\": \"scheduleType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"script\": {\n          \"name\": \"script\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"schedule_applicationId_application_applicationId_fk\": {\n          \"name\": \"schedule_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_composeId_compose_composeId_fk\": {\n          \"name\": \"schedule_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_serverId_server_serverId_fk\": {\n          \"name\": \"schedule_serverId_server_serverId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_userId_user_temp_id_fk\": {\n          \"name\": \"schedule_userId_user_temp_id_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'0 0 * * *'\"\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'user'\"\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"allowImpersonation\": {\n          \"name\": \"allowImpersonation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.volume_backup\": {\n      \"name\": \"volume_backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"volumeBackupId\": {\n          \"name\": \"volumeBackupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"turnOff\": {\n          \"name\": \"turnOff\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cronExpression\": {\n          \"name\": \"cronExpression\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"volume_backup_applicationId_application_applicationId_fk\": {\n          \"name\": \"volume_backup_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"volume_backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"volume_backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"volume_backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"volume_backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_redisId_redis_redisId_fk\": {\n          \"name\": \"volume_backup_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_composeId_compose_composeId_fk\": {\n          \"name\": \"volume_backup_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"volume_backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"drop\"\n      ]\n    },\n    \"public.backupType\": {\n      \"name\": \"backupType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"database\",\n        \"compose\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\",\n        \"web-server\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"raw\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\",\n        \"cancelled\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\",\n        \"ntfy\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.publishModeType\": {\n      \"name\": \"publishModeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"ingress\",\n        \"host\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.scheduleType\": {\n      \"name\": \"scheduleType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"compose\",\n        \"server\",\n        \"dokploy-server\"\n      ]\n    },\n    \"public.shellType\": {\n      \"name\": \"shellType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bash\",\n        \"sh\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.triggerType\": {\n      \"name\": \"triggerType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"push\",\n        \"tag\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0117_snapshot.json",
    "content": "{\n  \"id\": \"d9e974ba-cc49-41ff-b4af-48cdbc470c02\",\n  \"prevId\": \"def4c7aa-bf14-4060-8f54-60ef3a79a5ea\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_temp_id_fk\": {\n          \"name\": \"account_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"account\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_temp_id_fk\": {\n          \"name\": \"apikey_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"invitation_inviter_id_user_temp_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_temp_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteEnvironments\": {\n          \"name\": \"canDeleteEnvironments\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateEnvironments\": {\n          \"name\": \"canCreateEnvironments\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accessedEnvironments\": {\n          \"name\": \"accessedEnvironments\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"member_user_id_user_temp_id_fk\": {\n          \"name\": \"member_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"member\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_temp_id_fk\": {\n          \"name\": \"organization_owner_id_user_temp_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"slug\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_temp_id_fk\": {\n          \"name\": \"two_factor_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildSecrets\": {\n          \"name\": \"previewBuildSecrets\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLabels\": {\n          \"name\": \"previewLabels\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewCustomCertResolver\": {\n          \"name\": \"previewCustomCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewRequireCollaboratorPermissions\": {\n          \"name\": \"previewRequireCollaboratorPermissions\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": true\n        },\n        \"rollbackActive\": {\n          \"name\": \"rollbackActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildSecrets\": {\n          \"name\": \"buildSecrets\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"cleanCache\": {\n          \"name\": \"cleanCache\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBuildPath\": {\n          \"name\": \"giteaBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stopGracePeriodSwarm\": {\n          \"name\": \"stopGracePeriodSwarm\",\n          \"type\": \"bigint\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"railpackVersion\": {\n          \"name\": \"railpackVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'0.2.2'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isStaticSpa\": {\n          \"name\": \"isStaticSpa\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"registry\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_environmentId_environment_environmentId_fk\": {\n          \"name\": \"application_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"application_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupType\": {\n          \"name\": \"backupType\",\n          \"type\": \"backupType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'database'\"\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_composeId_compose_composeId_fk\": {\n          \"name\": \"backup_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"backup_userId_user_temp_id_fk\": {\n          \"name\": \"backup_userId_user_temp_id_fk\",\n          \"tableFrom\": \"backup\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"no action\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"backup_appName_unique\": {\n          \"name\": \"backup_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketEmail\": {\n          \"name\": \"bitbucketEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"apiToken\": {\n          \"name\": \"apiToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"certificatePath\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeploymentsVolume\": {\n          \"name\": \"isolatedDeploymentsVolume\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_environmentId_environment_environmentId_fk\": {\n          \"name\": \"compose_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"github\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"compose_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"gitea\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pid\": {\n          \"name\": \"pid\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"startedAt\": {\n          \"name\": \"startedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"finishedAt\": {\n          \"name\": \"finishedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackId\": {\n          \"name\": \"rollbackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeBackupId\": {\n          \"name\": \"volumeBackupId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_scheduleId_schedule_scheduleId_fk\": {\n          \"name\": \"deployment_scheduleId_schedule_scheduleId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"schedule\",\n          \"columnsFrom\": [\n            \"scheduleId\"\n          ],\n          \"columnsTo\": [\n            \"scheduleId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_backupId_backup_backupId_fk\": {\n          \"name\": \"deployment_backupId_backup_backupId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"backup\",\n          \"columnsFrom\": [\n            \"backupId\"\n          ],\n          \"columnsTo\": [\n            \"backupId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_rollbackId_rollback_rollbackId_fk\": {\n          \"name\": \"deployment_rollbackId_rollback_rollbackId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"rollback\",\n          \"columnsFrom\": [\n            \"rollbackId\"\n          ],\n          \"columnsTo\": [\n            \"rollbackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"deployment_volumeBackupId_volume_backup_volumeBackupId_fk\": {\n          \"name\": \"deployment_volumeBackupId_volume_backup_volumeBackupId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"tableTo\": \"volume_backup\",\n          \"columnsFrom\": [\n            \"volumeBackupId\"\n          ],\n          \"columnsTo\": [\n            \"volumeBackupId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"internalPath\": {\n          \"name\": \"internalPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"stripPath\": {\n          \"name\": \"stripPath\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"tableTo\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.environment\": {\n      \"name\": \"environment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"environment_projectId_project_projectId_fk\": {\n          \"name\": \"environment_projectId_project_projectId_fk\",\n          \"tableFrom\": \"environment\",\n          \"tableTo\": \"project\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"git_provider_userId_user_temp_id_fk\": {\n          \"name\": \"git_provider_userId_user_temp_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitea\": {\n      \"name\": \"gitea\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"giteaUrl\": {\n          \"name\": \"giteaUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitea.com'\"\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_id\": {\n          \"name\": \"client_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_secret\": {\n          \"name\": \"client_secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scopes\": {\n          \"name\": \"scopes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'repo,repo:status,read:user,read:org'\"\n        },\n        \"last_authenticated_at\": {\n          \"name\": \"last_authenticated_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitea_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitea_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitea\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"tableTo\": \"git_provider\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stopGracePeriodSwarm\": {\n          \"name\": \"stopGracePeriodSwarm\",\n          \"type\": \"bigint\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_environmentId_environment_environmentId_fk\": {\n          \"name\": \"mariadb_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stopGracePeriodSwarm\": {\n          \"name\": \"stopGracePeriodSwarm\",\n          \"type\": \"bigint\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_environmentId_environment_environmentId_fk\": {\n          \"name\": \"mongo_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stopGracePeriodSwarm\": {\n          \"name\": \"stopGracePeriodSwarm\",\n          \"type\": \"bigint\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_environmentId_environment_environmentId_fk\": {\n          \"name\": \"mysql_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ntfyId\": {\n          \"name\": \"ntfyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"slack\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"telegram\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"discord\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"email\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"gotify\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_ntfyId_ntfy_ntfyId_fk\": {\n          \"name\": \"notification_ntfyId_ntfy_ntfyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"ntfy\",\n          \"columnsFrom\": [\n            \"ntfyId\"\n          ],\n          \"columnsTo\": [\n            \"ntfyId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ntfy\": {\n      \"name\": \"ntfy\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"ntfyId\": {\n          \"name\": \"ntfyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"topic\": {\n          \"name\": \"topic\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessToken\": {\n          \"name\": \"accessToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 3\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"publishMode\": {\n          \"name\": \"publishMode\",\n          \"type\": \"publishModeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'host'\"\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stopGracePeriodSwarm\": {\n          \"name\": \"stopGracePeriodSwarm\",\n          \"type\": \"bigint\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_environmentId_environment_environmentId_fk\": {\n          \"name\": \"postgres_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"tableTo\": \"domain\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stopGracePeriodSwarm\": {\n          \"name\": \"stopGracePeriodSwarm\",\n          \"type\": \"bigint\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_environmentId_environment_environmentId_fk\": {\n          \"name\": \"redis_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"environment\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"appName\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.rollback\": {\n      \"name\": \"rollback\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"rollbackId\": {\n          \"name\": \"rollbackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"version\": {\n          \"name\": \"version\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fullContext\": {\n          \"name\": \"fullContext\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"rollback_deploymentId_deployment_deploymentId_fk\": {\n          \"name\": \"rollback_deploymentId_deployment_deploymentId_fk\",\n          \"tableFrom\": \"rollback\",\n          \"tableTo\": \"deployment\",\n          \"columnsFrom\": [\n            \"deploymentId\"\n          ],\n          \"columnsTo\": [\n            \"deploymentId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.schedule\": {\n      \"name\": \"schedule\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"cronExpression\": {\n          \"name\": \"cronExpression\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"shellType\": {\n          \"name\": \"shellType\",\n          \"type\": \"shellType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'bash'\"\n        },\n        \"scheduleType\": {\n          \"name\": \"scheduleType\",\n          \"type\": \"scheduleType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"script\": {\n          \"name\": \"script\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"schedule_applicationId_application_applicationId_fk\": {\n          \"name\": \"schedule_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_composeId_compose_composeId_fk\": {\n          \"name\": \"schedule_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_serverId_server_serverId_fk\": {\n          \"name\": \"schedule_serverId_server_serverId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"server\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"schedule_userId_user_temp_id_fk\": {\n          \"name\": \"schedule_userId_user_temp_id_fk\",\n          \"tableFrom\": \"schedule\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"tableTo\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onDelete\": \"set null\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_temp_id_fk\": {\n          \"name\": \"session_temp_user_id_user_temp_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"tableTo\": \"user_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"token\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"tableTo\": \"organization\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user_temp\": {\n      \"name\": \"user_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'0 0 * * *'\"\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'user'\"\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"allowImpersonation\": {\n          \"name\": \"allowImpersonation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_temp_email_unique\": {\n          \"name\": \"user_temp_email_unique\",\n          \"nullsNotDistinct\": false,\n          \"columns\": [\n            \"email\"\n          ]\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.volume_backup\": {\n      \"name\": \"volume_backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"volumeBackupId\": {\n          \"name\": \"volumeBackupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"turnOff\": {\n          \"name\": \"turnOff\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cronExpression\": {\n          \"name\": \"cronExpression\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"volume_backup_applicationId_application_applicationId_fk\": {\n          \"name\": \"volume_backup_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"application\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"volume_backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"postgres\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"volume_backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"mariadb\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"volume_backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"mongo\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"volume_backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"mysql\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_redisId_redis_redisId_fk\": {\n          \"name\": \"volume_backup_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"redis\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_composeId_compose_composeId_fk\": {\n          \"name\": \"volume_backup_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"compose\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        },\n        \"volume_backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"volume_backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"tableTo\": \"destination\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onDelete\": \"cascade\",\n          \"onUpdate\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"drop\"\n      ]\n    },\n    \"public.backupType\": {\n      \"name\": \"backupType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"database\",\n        \"compose\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\",\n        \"web-server\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"raw\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\",\n        \"cancelled\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\",\n        \"ntfy\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.publishModeType\": {\n      \"name\": \"publishModeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"ingress\",\n        \"host\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.scheduleType\": {\n      \"name\": \"scheduleType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"compose\",\n        \"server\",\n        \"dokploy-server\"\n      ]\n    },\n    \"public.shellType\": {\n      \"name\": \"shellType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bash\",\n        \"sh\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.triggerType\": {\n      \"name\": \"triggerType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"push\",\n        \"tag\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"views\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/drizzle/meta/0121_snapshot.json",
    "content": "{\n  \"id\": \"6d1361fc-3a46-4016-b6db-42351c20393c\",\n  \"prevId\": \"bbe005b3-d5e0-4e93-8305-ba3b9a2e3f3d\",\n  \"version\": \"7\",\n  \"dialect\": \"postgresql\",\n  \"tables\": {\n    \"public.account\": {\n      \"name\": \"account\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"account_id\": {\n          \"name\": \"account_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider_id\": {\n          \"name\": \"provider_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"id_token\": {\n          \"name\": \"id_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token_expires_at\": {\n          \"name\": \"access_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token_expires_at\": {\n          \"name\": \"refresh_token_expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scope\": {\n          \"name\": \"scope\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is2FAEnabled\": {\n          \"name\": \"is2FAEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"resetPasswordToken\": {\n          \"name\": \"resetPasswordToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"resetPasswordExpiresAt\": {\n          \"name\": \"resetPasswordExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationToken\": {\n          \"name\": \"confirmationToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"confirmationExpiresAt\": {\n          \"name\": \"confirmationExpiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"account_user_id_user_id_fk\": {\n          \"name\": \"account_user_id_user_id_fk\",\n          \"tableFrom\": \"account\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"user\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.apikey\": {\n      \"name\": \"apikey\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"start\": {\n          \"name\": \"start\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"key\": {\n          \"name\": \"key\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"refill_interval\": {\n          \"name\": \"refill_interval\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refill_amount\": {\n          \"name\": \"refill_amount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_refill_at\": {\n          \"name\": \"last_refill_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_enabled\": {\n          \"name\": \"rate_limit_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_time_window\": {\n          \"name\": \"rate_limit_time_window\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rate_limit_max\": {\n          \"name\": \"rate_limit_max\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"request_count\": {\n          \"name\": \"request_count\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"remaining\": {\n          \"name\": \"remaining\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"last_request\": {\n          \"name\": \"last_request\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permissions\": {\n          \"name\": \"permissions\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"apikey_user_id_user_id_fk\": {\n          \"name\": \"apikey_user_id_user_id_fk\",\n          \"tableFrom\": \"apikey\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"user\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.invitation\": {\n      \"name\": \"invitation\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"inviter_id\": {\n          \"name\": \"inviter_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"invitation_organization_id_organization_id_fk\": {\n          \"name\": \"invitation_organization_id_organization_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"tableTo\": \"organization\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"invitation_inviter_id_user_id_fk\": {\n          \"name\": \"invitation_inviter_id_user_id_fk\",\n          \"tableFrom\": \"invitation\",\n          \"columnsFrom\": [\n            \"inviter_id\"\n          ],\n          \"tableTo\": \"user\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.member\": {\n      \"name\": \"member\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"organization_id\": {\n          \"name\": \"organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"team_id\": {\n          \"name\": \"team_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"is_default\": {\n          \"name\": \"is_default\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateProjects\": {\n          \"name\": \"canCreateProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToSSHKeys\": {\n          \"name\": \"canAccessToSSHKeys\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateServices\": {\n          \"name\": \"canCreateServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteProjects\": {\n          \"name\": \"canDeleteProjects\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteServices\": {\n          \"name\": \"canDeleteServices\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToDocker\": {\n          \"name\": \"canAccessToDocker\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToAPI\": {\n          \"name\": \"canAccessToAPI\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToGitProviders\": {\n          \"name\": \"canAccessToGitProviders\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canAccessToTraefikFiles\": {\n          \"name\": \"canAccessToTraefikFiles\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canDeleteEnvironments\": {\n          \"name\": \"canDeleteEnvironments\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"canCreateEnvironments\": {\n          \"name\": \"canCreateEnvironments\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"accesedProjects\": {\n          \"name\": \"accesedProjects\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accessedEnvironments\": {\n          \"name\": \"accessedEnvironments\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        },\n        \"accesedServices\": {\n          \"name\": \"accesedServices\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"ARRAY[]::text[]\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"member_organization_id_organization_id_fk\": {\n          \"name\": \"member_organization_id_organization_id_fk\",\n          \"tableFrom\": \"member\",\n          \"columnsFrom\": [\n            \"organization_id\"\n          ],\n          \"tableTo\": \"organization\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"member_user_id_user_id_fk\": {\n          \"name\": \"member_user_id_user_id_fk\",\n          \"tableFrom\": \"member\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"user\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.organization\": {\n      \"name\": \"organization\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slug\": {\n          \"name\": \"slug\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"logo\": {\n          \"name\": \"logo\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner_id\": {\n          \"name\": \"owner_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"organization_owner_id_user_id_fk\": {\n          \"name\": \"organization_owner_id_user_id_fk\",\n          \"tableFrom\": \"organization\",\n          \"columnsFrom\": [\n            \"owner_id\"\n          ],\n          \"tableTo\": \"user\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"organization_slug_unique\": {\n          \"name\": \"organization_slug_unique\",\n          \"columns\": [\n            \"slug\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.two_factor\": {\n      \"name\": \"two_factor\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"backup_codes\": {\n          \"name\": \"backup_codes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"two_factor_user_id_user_id_fk\": {\n          \"name\": \"two_factor_user_id_user_id_fk\",\n          \"tableFrom\": \"two_factor\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"user\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.verification\": {\n      \"name\": \"verification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"identifier\": {\n          \"name\": \"identifier\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"value\": {\n          \"name\": \"value\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ai\": {\n      \"name\": \"ai\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"aiId\": {\n          \"name\": \"aiId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiUrl\": {\n          \"name\": \"apiUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"apiKey\": {\n          \"name\": \"apiKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"model\": {\n          \"name\": \"model\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"isEnabled\": {\n          \"name\": \"isEnabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ai_organizationId_organization_id_fk\": {\n          \"name\": \"ai_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ai\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"tableTo\": \"organization\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.application\": {\n      \"name\": \"application\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewEnv\": {\n          \"name\": \"previewEnv\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildArgs\": {\n          \"name\": \"previewBuildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewBuildSecrets\": {\n          \"name\": \"previewBuildSecrets\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLabels\": {\n          \"name\": \"previewLabels\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewWildcard\": {\n          \"name\": \"previewWildcard\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewPort\": {\n          \"name\": \"previewPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"previewHttps\": {\n          \"name\": \"previewHttps\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"previewPath\": {\n          \"name\": \"previewPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"previewCustomCertResolver\": {\n          \"name\": \"previewCustomCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewLimit\": {\n          \"name\": \"previewLimit\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3\n        },\n        \"isPreviewDeploymentsActive\": {\n          \"name\": \"isPreviewDeploymentsActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewRequireCollaboratorPermissions\": {\n          \"name\": \"previewRequireCollaboratorPermissions\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": true\n        },\n        \"rollbackActive\": {\n          \"name\": \"rollbackActive\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"buildArgs\": {\n          \"name\": \"buildArgs\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildSecrets\": {\n          \"name\": \"buildSecrets\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"subtitle\": {\n          \"name\": \"subtitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"cleanCache\": {\n          \"name\": \"cleanCache\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"buildPath\": {\n          \"name\": \"buildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBuildPath\": {\n          \"name\": \"gitlabBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBuildPath\": {\n          \"name\": \"giteaBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBuildPath\": {\n          \"name\": \"bitbucketBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBuildPath\": {\n          \"name\": \"customGitBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerfile\": {\n          \"name\": \"dockerfile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerContextPath\": {\n          \"name\": \"dockerContextPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerBuildStage\": {\n          \"name\": \"dockerBuildStage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dropBuildPath\": {\n          \"name\": \"dropBuildPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stopGracePeriodSwarm\": {\n          \"name\": \"stopGracePeriodSwarm\",\n          \"type\": \"bigint\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"endpointSpecSwarm\": {\n          \"name\": \"endpointSpecSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"buildType\": {\n          \"name\": \"buildType\",\n          \"type\": \"buildType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'nixpacks'\"\n        },\n        \"railpackVersion\": {\n          \"name\": \"railpackVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'0.2.2'\"\n        },\n        \"herokuVersion\": {\n          \"name\": \"herokuVersion\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'24'\"\n        },\n        \"publishDirectory\": {\n          \"name\": \"publishDirectory\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isStaticSpa\": {\n          \"name\": \"isStaticSpa\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"application_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_registryId_registry_registryId_fk\": {\n          \"name\": \"application_registryId_registry_registryId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"registryId\"\n          ],\n          \"tableTo\": \"registry\",\n          \"columnsTo\": [\n            \"registryId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_environmentId_environment_environmentId_fk\": {\n          \"name\": \"application_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"tableTo\": \"environment\",\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"application_githubId_github_githubId_fk\": {\n          \"name\": \"application_githubId_github_githubId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"application_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"application_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"tableTo\": \"gitea\",\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"application_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"application_serverId_server_serverId_fk\": {\n          \"name\": \"application_serverId_server_serverId_fk\",\n          \"tableFrom\": \"application\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"application_appName_unique\": {\n          \"name\": \"application_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.backup\": {\n      \"name\": \"backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"schedule\": {\n          \"name\": \"schedule\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"database\": {\n          \"name\": \"database\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupType\": {\n          \"name\": \"backupType\",\n          \"type\": \"backupType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'database'\"\n        },\n        \"databaseType\": {\n          \"name\": \"databaseType\",\n          \"type\": \"databaseType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metadata\": {\n          \"name\": \"metadata\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_composeId_compose_composeId_fk\": {\n          \"name\": \"backup_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"backup_userId_user_id_fk\": {\n          \"name\": \"backup_userId_user_id_fk\",\n          \"tableFrom\": \"backup\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"tableTo\": \"user\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"no action\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"backup_appName_unique\": {\n          \"name\": \"backup_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.bitbucket\": {\n      \"name\": \"bitbucket\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"bitbucketUsername\": {\n          \"name\": \"bitbucketUsername\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketEmail\": {\n          \"name\": \"bitbucketEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"appPassword\": {\n          \"name\": \"appPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"apiToken\": {\n          \"name\": \"apiToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketWorkspaceName\": {\n          \"name\": \"bitbucketWorkspaceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"bitbucket_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"bitbucket\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.certificate\": {\n      \"name\": \"certificate\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"certificateId\": {\n          \"name\": \"certificateId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificateData\": {\n          \"name\": \"certificateData\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"certificatePath\": {\n          \"name\": \"certificatePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"autoRenew\": {\n          \"name\": \"autoRenew\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"certificate_organizationId_organization_id_fk\": {\n          \"name\": \"certificate_organizationId_organization_id_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"tableTo\": \"organization\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"certificate_serverId_server_serverId_fk\": {\n          \"name\": \"certificate_serverId_server_serverId_fk\",\n          \"tableFrom\": \"certificate\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"certificate_certificatePath_unique\": {\n          \"name\": \"certificate_certificatePath_unique\",\n          \"columns\": [\n            \"certificatePath\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.compose\": {\n      \"name\": \"compose\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeFile\": {\n          \"name\": \"composeFile\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"refreshToken\": {\n          \"name\": \"refreshToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sourceType\": {\n          \"name\": \"sourceType\",\n          \"type\": \"sourceTypeCompose\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"composeType\": {\n          \"name\": \"composeType\",\n          \"type\": \"composeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'docker-compose'\"\n        },\n        \"repository\": {\n          \"name\": \"repository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"owner\": {\n          \"name\": \"owner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"autoDeploy\": {\n          \"name\": \"autoDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabProjectId\": {\n          \"name\": \"gitlabProjectId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabRepository\": {\n          \"name\": \"gitlabRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabOwner\": {\n          \"name\": \"gitlabOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabBranch\": {\n          \"name\": \"gitlabBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabPathNamespace\": {\n          \"name\": \"gitlabPathNamespace\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketRepository\": {\n          \"name\": \"bitbucketRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketOwner\": {\n          \"name\": \"bitbucketOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketBranch\": {\n          \"name\": \"bitbucketBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaRepository\": {\n          \"name\": \"giteaRepository\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaOwner\": {\n          \"name\": \"giteaOwner\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaBranch\": {\n          \"name\": \"giteaBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitUrl\": {\n          \"name\": \"customGitUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitBranch\": {\n          \"name\": \"customGitBranch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customGitSSHKeyId\": {\n          \"name\": \"customGitSSHKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"enableSubmodules\": {\n          \"name\": \"enableSubmodules\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"composePath\": {\n          \"name\": \"composePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'./docker-compose.yml'\"\n        },\n        \"suffix\": {\n          \"name\": \"suffix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"randomize\": {\n          \"name\": \"randomize\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeployment\": {\n          \"name\": \"isolatedDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"isolatedDeploymentsVolume\": {\n          \"name\": \"isolatedDeploymentsVolume\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"triggerType\": {\n          \"name\": \"triggerType\",\n          \"type\": \"triggerType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'push'\"\n        },\n        \"composeStatus\": {\n          \"name\": \"composeStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"watchPaths\": {\n          \"name\": \"watchPaths\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"bitbucketId\": {\n          \"name\": \"bitbucketId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"compose_customGitSSHKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"customGitSSHKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_environmentId_environment_environmentId_fk\": {\n          \"name\": \"compose_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"tableTo\": \"environment\",\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"compose_githubId_github_githubId_fk\": {\n          \"name\": \"compose_githubId_github_githubId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"githubId\"\n          ],\n          \"tableTo\": \"github\",\n          \"columnsTo\": [\n            \"githubId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_gitlabId_gitlab_gitlabId_fk\": {\n          \"name\": \"compose_gitlabId_gitlab_gitlabId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"gitlabId\"\n          ],\n          \"tableTo\": \"gitlab\",\n          \"columnsTo\": [\n            \"gitlabId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_bitbucketId_bitbucket_bitbucketId_fk\": {\n          \"name\": \"compose_bitbucketId_bitbucket_bitbucketId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"bitbucketId\"\n          ],\n          \"tableTo\": \"bitbucket\",\n          \"columnsTo\": [\n            \"bitbucketId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_giteaId_gitea_giteaId_fk\": {\n          \"name\": \"compose_giteaId_gitea_giteaId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"giteaId\"\n          ],\n          \"tableTo\": \"gitea\",\n          \"columnsTo\": [\n            \"giteaId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        },\n        \"compose_serverId_server_serverId_fk\": {\n          \"name\": \"compose_serverId_server_serverId_fk\",\n          \"tableFrom\": \"compose\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.deployment\": {\n      \"name\": \"deployment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"title\": {\n          \"name\": \"title\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"status\": {\n          \"name\": \"status\",\n          \"type\": \"deploymentStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'running'\"\n        },\n        \"logPath\": {\n          \"name\": \"logPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pid\": {\n          \"name\": \"pid\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"isPreviewDeployment\": {\n          \"name\": \"isPreviewDeployment\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"startedAt\": {\n          \"name\": \"startedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"finishedAt\": {\n          \"name\": \"finishedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"errorMessage\": {\n          \"name\": \"errorMessage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"backupId\": {\n          \"name\": \"backupId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackId\": {\n          \"name\": \"rollbackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeBackupId\": {\n          \"name\": \"volumeBackupId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"deployment_applicationId_application_applicationId_fk\": {\n          \"name\": \"deployment_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_composeId_compose_composeId_fk\": {\n          \"name\": \"deployment_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_serverId_server_serverId_fk\": {\n          \"name\": \"deployment_serverId_server_serverId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"tableTo\": \"preview_deployments\",\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_scheduleId_schedule_scheduleId_fk\": {\n          \"name\": \"deployment_scheduleId_schedule_scheduleId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"scheduleId\"\n          ],\n          \"tableTo\": \"schedule\",\n          \"columnsTo\": [\n            \"scheduleId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_backupId_backup_backupId_fk\": {\n          \"name\": \"deployment_backupId_backup_backupId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"backupId\"\n          ],\n          \"tableTo\": \"backup\",\n          \"columnsTo\": [\n            \"backupId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_rollbackId_rollback_rollbackId_fk\": {\n          \"name\": \"deployment_rollbackId_rollback_rollbackId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"rollbackId\"\n          ],\n          \"tableTo\": \"rollback\",\n          \"columnsTo\": [\n            \"rollbackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"deployment_volumeBackupId_volume_backup_volumeBackupId_fk\": {\n          \"name\": \"deployment_volumeBackupId_volume_backup_volumeBackupId_fk\",\n          \"tableFrom\": \"deployment\",\n          \"columnsFrom\": [\n            \"volumeBackupId\"\n          ],\n          \"tableTo\": \"volume_backup\",\n          \"columnsTo\": [\n            \"volumeBackupId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.destination\": {\n      \"name\": \"destination\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"provider\": {\n          \"name\": \"provider\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"accessKey\": {\n          \"name\": \"accessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"secretAccessKey\": {\n          \"name\": \"secretAccessKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"bucket\": {\n          \"name\": \"bucket\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"region\": {\n          \"name\": \"region\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"endpoint\": {\n          \"name\": \"endpoint\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"now()\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"destination_organizationId_organization_id_fk\": {\n          \"name\": \"destination_organizationId_organization_id_fk\",\n          \"tableFrom\": \"destination\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"tableTo\": \"organization\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.domain\": {\n      \"name\": \"domain\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": 3000\n        },\n        \"path\": {\n          \"name\": \"path\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"domainType\": {\n          \"name\": \"domainType\",\n          \"type\": \"domainType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'application'\"\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"customCertResolver\": {\n          \"name\": \"customCertResolver\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"internalPath\": {\n          \"name\": \"internalPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'/'\"\n        },\n        \"stripPath\": {\n          \"name\": \"stripPath\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"domain_composeId_compose_composeId_fk\": {\n          \"name\": \"domain_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_applicationId_application_applicationId_fk\": {\n          \"name\": \"domain_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\": {\n          \"name\": \"domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk\",\n          \"tableFrom\": \"domain\",\n          \"columnsFrom\": [\n            \"previewDeploymentId\"\n          ],\n          \"tableTo\": \"preview_deployments\",\n          \"columnsTo\": [\n            \"previewDeploymentId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.environment\": {\n      \"name\": \"environment\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"environment_projectId_project_projectId_fk\": {\n          \"name\": \"environment_projectId_project_projectId_fk\",\n          \"tableFrom\": \"environment\",\n          \"columnsFrom\": [\n            \"projectId\"\n          ],\n          \"tableTo\": \"project\",\n          \"columnsTo\": [\n            \"projectId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.git_provider\": {\n      \"name\": \"git_provider\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"providerType\": {\n          \"name\": \"providerType\",\n          \"type\": \"gitProviderType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'github'\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"git_provider_organizationId_organization_id_fk\": {\n          \"name\": \"git_provider_organizationId_organization_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"tableTo\": \"organization\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"git_provider_userId_user_id_fk\": {\n          \"name\": \"git_provider_userId_user_id_fk\",\n          \"tableFrom\": \"git_provider\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"tableTo\": \"user\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitea\": {\n      \"name\": \"gitea\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"giteaId\": {\n          \"name\": \"giteaId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"giteaUrl\": {\n          \"name\": \"giteaUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitea.com'\"\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_id\": {\n          \"name\": \"client_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"client_secret\": {\n          \"name\": \"client_secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"scopes\": {\n          \"name\": \"scopes\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'repo,repo:status,read:user,read:org'\"\n        },\n        \"last_authenticated_at\": {\n          \"name\": \"last_authenticated_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitea_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitea_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitea\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.github\": {\n      \"name\": \"github\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"githubId\": {\n          \"name\": \"githubId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"githubAppName\": {\n          \"name\": \"githubAppName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubAppId\": {\n          \"name\": \"githubAppId\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientId\": {\n          \"name\": \"githubClientId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubClientSecret\": {\n          \"name\": \"githubClientSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubInstallationId\": {\n          \"name\": \"githubInstallationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubPrivateKey\": {\n          \"name\": \"githubPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"githubWebhookSecret\": {\n          \"name\": \"githubWebhookSecret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"github_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"github_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"github\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gitlab\": {\n      \"name\": \"gitlab\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gitlabId\": {\n          \"name\": \"gitlabId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"gitlabUrl\": {\n          \"name\": \"gitlabUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'https://gitlab.com'\"\n        },\n        \"application_id\": {\n          \"name\": \"application_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redirect_uri\": {\n          \"name\": \"redirect_uri\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"secret\": {\n          \"name\": \"secret\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"access_token\": {\n          \"name\": \"access_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"refresh_token\": {\n          \"name\": \"refresh_token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"group_name\": {\n          \"name\": \"group_name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gitProviderId\": {\n          \"name\": \"gitProviderId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"gitlab_gitProviderId_git_provider_gitProviderId_fk\": {\n          \"name\": \"gitlab_gitProviderId_git_provider_gitProviderId_fk\",\n          \"tableFrom\": \"gitlab\",\n          \"columnsFrom\": [\n            \"gitProviderId\"\n          ],\n          \"tableTo\": \"git_provider\",\n          \"columnsTo\": [\n            \"gitProviderId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mariadb\": {\n      \"name\": \"mariadb\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stopGracePeriodSwarm\": {\n          \"name\": \"stopGracePeriodSwarm\",\n          \"type\": \"bigint\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"endpointSpecSwarm\": {\n          \"name\": \"endpointSpecSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mariadb_environmentId_environment_environmentId_fk\": {\n          \"name\": \"mariadb_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"tableTo\": \"environment\",\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mariadb_serverId_server_serverId_fk\": {\n          \"name\": \"mariadb_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mariadb\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mariadb_appName_unique\": {\n          \"name\": \"mariadb_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mongo\": {\n      \"name\": \"mongo\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stopGracePeriodSwarm\": {\n          \"name\": \"stopGracePeriodSwarm\",\n          \"type\": \"bigint\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"endpointSpecSwarm\": {\n          \"name\": \"endpointSpecSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicaSets\": {\n          \"name\": \"replicaSets\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mongo_environmentId_environment_environmentId_fk\": {\n          \"name\": \"mongo_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"tableTo\": \"environment\",\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mongo_serverId_server_serverId_fk\": {\n          \"name\": \"mongo_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mongo\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mongo_appName_unique\": {\n          \"name\": \"mongo_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mount\": {\n      \"name\": \"mount\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mountId\": {\n          \"name\": \"mountId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"type\": {\n          \"name\": \"type\",\n          \"type\": \"mountType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"hostPath\": {\n          \"name\": \"hostPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"filePath\": {\n          \"name\": \"filePath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"content\": {\n          \"name\": \"content\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"mountPath\": {\n          \"name\": \"mountPath\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mount_applicationId_application_applicationId_fk\": {\n          \"name\": \"mount_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"mount_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"mount_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"mount_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"mount_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_redisId_redis_redisId_fk\": {\n          \"name\": \"mount_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mount_composeId_compose_composeId_fk\": {\n          \"name\": \"mount_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"mount\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.mysql\": {\n      \"name\": \"mysql\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"rootPassword\": {\n          \"name\": \"rootPassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stopGracePeriodSwarm\": {\n          \"name\": \"stopGracePeriodSwarm\",\n          \"type\": \"bigint\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"endpointSpecSwarm\": {\n          \"name\": \"endpointSpecSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"mysql_environmentId_environment_environmentId_fk\": {\n          \"name\": \"mysql_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"tableTo\": \"environment\",\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"mysql_serverId_server_serverId_fk\": {\n          \"name\": \"mysql_serverId_server_serverId_fk\",\n          \"tableFrom\": \"mysql\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"mysql_appName_unique\": {\n          \"name\": \"mysql_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.discord\": {\n      \"name\": \"discord\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.email\": {\n      \"name\": \"email\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"smtpServer\": {\n          \"name\": \"smtpServer\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"smtpPort\": {\n          \"name\": \"smtpPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fromAddress\": {\n          \"name\": \"fromAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"toAddress\": {\n          \"name\": \"toAddress\",\n          \"type\": \"text[]\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.gotify\": {\n      \"name\": \"gotify\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appToken\": {\n          \"name\": \"appToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 5\n        },\n        \"decoration\": {\n          \"name\": \"decoration\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.lark\": {\n      \"name\": \"lark\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"larkId\": {\n          \"name\": \"larkId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.notification\": {\n      \"name\": \"notification\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"notificationId\": {\n          \"name\": \"notificationId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appDeploy\": {\n          \"name\": \"appDeploy\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"appBuildError\": {\n          \"name\": \"appBuildError\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"databaseBackup\": {\n          \"name\": \"databaseBackup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dokployRestart\": {\n          \"name\": \"dokployRestart\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"dockerCleanup\": {\n          \"name\": \"dockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"serverThreshold\": {\n          \"name\": \"serverThreshold\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"notificationType\": {\n          \"name\": \"notificationType\",\n          \"type\": \"notificationType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"discordId\": {\n          \"name\": \"discordId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"emailId\": {\n          \"name\": \"emailId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"gotifyId\": {\n          \"name\": \"gotifyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ntfyId\": {\n          \"name\": \"ntfyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"larkId\": {\n          \"name\": \"larkId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"notification_slackId_slack_slackId_fk\": {\n          \"name\": \"notification_slackId_slack_slackId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"slackId\"\n          ],\n          \"tableTo\": \"slack\",\n          \"columnsTo\": [\n            \"slackId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_telegramId_telegram_telegramId_fk\": {\n          \"name\": \"notification_telegramId_telegram_telegramId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"telegramId\"\n          ],\n          \"tableTo\": \"telegram\",\n          \"columnsTo\": [\n            \"telegramId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_discordId_discord_discordId_fk\": {\n          \"name\": \"notification_discordId_discord_discordId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"discordId\"\n          ],\n          \"tableTo\": \"discord\",\n          \"columnsTo\": [\n            \"discordId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_emailId_email_emailId_fk\": {\n          \"name\": \"notification_emailId_email_emailId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"emailId\"\n          ],\n          \"tableTo\": \"email\",\n          \"columnsTo\": [\n            \"emailId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_gotifyId_gotify_gotifyId_fk\": {\n          \"name\": \"notification_gotifyId_gotify_gotifyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"gotifyId\"\n          ],\n          \"tableTo\": \"gotify\",\n          \"columnsTo\": [\n            \"gotifyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_ntfyId_ntfy_ntfyId_fk\": {\n          \"name\": \"notification_ntfyId_ntfy_ntfyId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"ntfyId\"\n          ],\n          \"tableTo\": \"ntfy\",\n          \"columnsTo\": [\n            \"ntfyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_larkId_lark_larkId_fk\": {\n          \"name\": \"notification_larkId_lark_larkId_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"larkId\"\n          ],\n          \"tableTo\": \"lark\",\n          \"columnsTo\": [\n            \"larkId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"notification_organizationId_organization_id_fk\": {\n          \"name\": \"notification_organizationId_organization_id_fk\",\n          \"tableFrom\": \"notification\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"tableTo\": \"organization\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ntfy\": {\n      \"name\": \"ntfy\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"ntfyId\": {\n          \"name\": \"ntfyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"serverUrl\": {\n          \"name\": \"serverUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"topic\": {\n          \"name\": \"topic\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"accessToken\": {\n          \"name\": \"accessToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"priority\": {\n          \"name\": \"priority\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 3\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.slack\": {\n      \"name\": \"slack\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"slackId\": {\n          \"name\": \"slackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"webhookUrl\": {\n          \"name\": \"webhookUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"channel\": {\n          \"name\": \"channel\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.telegram\": {\n      \"name\": \"telegram\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"telegramId\": {\n          \"name\": \"telegramId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"botToken\": {\n          \"name\": \"botToken\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"chatId\": {\n          \"name\": \"chatId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"messageThreadId\": {\n          \"name\": \"messageThreadId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.port\": {\n      \"name\": \"port\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"portId\": {\n          \"name\": \"portId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"publishedPort\": {\n          \"name\": \"publishedPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"publishMode\": {\n          \"name\": \"publishMode\",\n          \"type\": \"publishModeType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'host'\"\n        },\n        \"targetPort\": {\n          \"name\": \"targetPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"protocol\": {\n          \"name\": \"protocol\",\n          \"type\": \"protocolType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"port_applicationId_application_applicationId_fk\": {\n          \"name\": \"port_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"port\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.postgres\": {\n      \"name\": \"postgres\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseName\": {\n          \"name\": \"databaseName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databaseUser\": {\n          \"name\": \"databaseUser\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"databasePassword\": {\n          \"name\": \"databasePassword\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stopGracePeriodSwarm\": {\n          \"name\": \"stopGracePeriodSwarm\",\n          \"type\": \"bigint\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"endpointSpecSwarm\": {\n          \"name\": \"endpointSpecSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"postgres_environmentId_environment_environmentId_fk\": {\n          \"name\": \"postgres_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"tableTo\": \"environment\",\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"postgres_serverId_server_serverId_fk\": {\n          \"name\": \"postgres_serverId_server_serverId_fk\",\n          \"tableFrom\": \"postgres\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"postgres_appName_unique\": {\n          \"name\": \"postgres_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.preview_deployments\": {\n      \"name\": \"preview_deployments\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"previewDeploymentId\": {\n          \"name\": \"previewDeploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"branch\": {\n          \"name\": \"branch\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestId\": {\n          \"name\": \"pullRequestId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestNumber\": {\n          \"name\": \"pullRequestNumber\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestURL\": {\n          \"name\": \"pullRequestURL\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestTitle\": {\n          \"name\": \"pullRequestTitle\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"pullRequestCommentId\": {\n          \"name\": \"pullRequestCommentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"previewStatus\": {\n          \"name\": \"previewStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"domainId\": {\n          \"name\": \"domainId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"expiresAt\": {\n          \"name\": \"expiresAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"preview_deployments_applicationId_application_applicationId_fk\": {\n          \"name\": \"preview_deployments_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"preview_deployments_domainId_domain_domainId_fk\": {\n          \"name\": \"preview_deployments_domainId_domain_domainId_fk\",\n          \"tableFrom\": \"preview_deployments\",\n          \"columnsFrom\": [\n            \"domainId\"\n          ],\n          \"tableTo\": \"domain\",\n          \"columnsTo\": [\n            \"domainId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"preview_deployments_appName_unique\": {\n          \"name\": \"preview_deployments_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.project\": {\n      \"name\": \"project\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"projectId\": {\n          \"name\": \"projectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"project_organizationId_organization_id_fk\": {\n          \"name\": \"project_organizationId_organization_id_fk\",\n          \"tableFrom\": \"project\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"tableTo\": \"organization\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redirect\": {\n      \"name\": \"redirect\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redirectId\": {\n          \"name\": \"redirectId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"regex\": {\n          \"name\": \"regex\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"replacement\": {\n          \"name\": \"replacement\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"permanent\": {\n          \"name\": \"permanent\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"uniqueConfigKey\": {\n          \"name\": \"uniqueConfigKey\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redirect_applicationId_application_applicationId_fk\": {\n          \"name\": \"redirect_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"redirect\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.redis\": {\n      \"name\": \"redis\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"dockerImage\": {\n          \"name\": \"dockerImage\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"env\": {\n          \"name\": \"env\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryReservation\": {\n          \"name\": \"memoryReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"memoryLimit\": {\n          \"name\": \"memoryLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuReservation\": {\n          \"name\": \"cpuReservation\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"cpuLimit\": {\n          \"name\": \"cpuLimit\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"externalPort\": {\n          \"name\": \"externalPort\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationStatus\": {\n          \"name\": \"applicationStatus\",\n          \"type\": \"applicationStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'idle'\"\n        },\n        \"healthCheckSwarm\": {\n          \"name\": \"healthCheckSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"restartPolicySwarm\": {\n          \"name\": \"restartPolicySwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"placementSwarm\": {\n          \"name\": \"placementSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updateConfigSwarm\": {\n          \"name\": \"updateConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"rollbackConfigSwarm\": {\n          \"name\": \"rollbackConfigSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"modeSwarm\": {\n          \"name\": \"modeSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"labelsSwarm\": {\n          \"name\": \"labelsSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"networkSwarm\": {\n          \"name\": \"networkSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stopGracePeriodSwarm\": {\n          \"name\": \"stopGracePeriodSwarm\",\n          \"type\": \"bigint\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"endpointSpecSwarm\": {\n          \"name\": \"endpointSpecSwarm\",\n          \"type\": \"json\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"replicas\": {\n          \"name\": \"replicas\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 1\n        },\n        \"environmentId\": {\n          \"name\": \"environmentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"redis_environmentId_environment_environmentId_fk\": {\n          \"name\": \"redis_environmentId_environment_environmentId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"environmentId\"\n          ],\n          \"tableTo\": \"environment\",\n          \"columnsTo\": [\n            \"environmentId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"redis_serverId_server_serverId_fk\": {\n          \"name\": \"redis_serverId_server_serverId_fk\",\n          \"tableFrom\": \"redis\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"redis_appName_unique\": {\n          \"name\": \"redis_appName_unique\",\n          \"columns\": [\n            \"appName\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.registry\": {\n      \"name\": \"registry\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"registryId\": {\n          \"name\": \"registryId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"registryName\": {\n          \"name\": \"registryName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"imagePrefix\": {\n          \"name\": \"imagePrefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"registryUrl\": {\n          \"name\": \"registryUrl\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"selfHosted\": {\n          \"name\": \"selfHosted\",\n          \"type\": \"RegistryType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'cloud'\"\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"registry_organizationId_organization_id_fk\": {\n          \"name\": \"registry_organizationId_organization_id_fk\",\n          \"tableFrom\": \"registry\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"tableTo\": \"organization\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.rollback\": {\n      \"name\": \"rollback\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"rollbackId\": {\n          \"name\": \"rollbackId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"deploymentId\": {\n          \"name\": \"deploymentId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"version\": {\n          \"name\": \"version\",\n          \"type\": \"serial\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"fullContext\": {\n          \"name\": \"fullContext\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"rollback_deploymentId_deployment_deploymentId_fk\": {\n          \"name\": \"rollback_deploymentId_deployment_deploymentId_fk\",\n          \"tableFrom\": \"rollback\",\n          \"columnsFrom\": [\n            \"deploymentId\"\n          ],\n          \"tableTo\": \"deployment\",\n          \"columnsTo\": [\n            \"deploymentId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.schedule\": {\n      \"name\": \"schedule\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"scheduleId\": {\n          \"name\": \"scheduleId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"cronExpression\": {\n          \"name\": \"cronExpression\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"shellType\": {\n          \"name\": \"shellType\",\n          \"type\": \"shellType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'bash'\"\n        },\n        \"scheduleType\": {\n          \"name\": \"scheduleType\",\n          \"type\": \"scheduleType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"script\": {\n          \"name\": \"script\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"userId\": {\n          \"name\": \"userId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"schedule_applicationId_application_applicationId_fk\": {\n          \"name\": \"schedule_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"schedule_composeId_compose_composeId_fk\": {\n          \"name\": \"schedule_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"schedule_serverId_server_serverId_fk\": {\n          \"name\": \"schedule_serverId_server_serverId_fk\",\n          \"tableFrom\": \"schedule\",\n          \"columnsFrom\": [\n            \"serverId\"\n          ],\n          \"tableTo\": \"server\",\n          \"columnsTo\": [\n            \"serverId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"schedule_userId_user_id_fk\": {\n          \"name\": \"schedule_userId_user_id_fk\",\n          \"tableFrom\": \"schedule\",\n          \"columnsFrom\": [\n            \"userId\"\n          ],\n          \"tableTo\": \"user\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.security\": {\n      \"name\": \"security\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"securityId\": {\n          \"name\": \"securityId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"password\": {\n          \"name\": \"password\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"security_applicationId_application_applicationId_fk\": {\n          \"name\": \"security_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"security\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"security_username_applicationId_unique\": {\n          \"name\": \"security_username_applicationId_unique\",\n          \"columns\": [\n            \"username\",\n            \"applicationId\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.server\": {\n      \"name\": \"server\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"serverId\": {\n          \"name\": \"serverId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ipAddress\": {\n          \"name\": \"ipAddress\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"port\": {\n          \"name\": \"port\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"username\": {\n          \"name\": \"username\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'root'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverStatus\": {\n          \"name\": \"serverStatus\",\n          \"type\": \"serverStatus\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'active'\"\n        },\n        \"command\": {\n          \"name\": \"command\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Remote\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"cronJob\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"server_organizationId_organization_id_fk\": {\n          \"name\": \"server_organizationId_organization_id_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"tableTo\": \"organization\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"server_sshKeyId_ssh-key_sshKeyId_fk\": {\n          \"name\": \"server_sshKeyId_ssh-key_sshKeyId_fk\",\n          \"tableFrom\": \"server\",\n          \"columnsFrom\": [\n            \"sshKeyId\"\n          ],\n          \"tableTo\": \"ssh-key\",\n          \"columnsTo\": [\n            \"sshKeyId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"set null\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.session_temp\": {\n      \"name\": \"session_temp\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"expires_at\": {\n          \"name\": \"expires_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"token\": {\n          \"name\": \"token\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"ip_address\": {\n          \"name\": \"ip_address\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_agent\": {\n          \"name\": \"user_agent\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"user_id\": {\n          \"name\": \"user_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"impersonated_by\": {\n          \"name\": \"impersonated_by\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"active_organization_id\": {\n          \"name\": \"active_organization_id\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"session_temp_user_id_user_id_fk\": {\n          \"name\": \"session_temp_user_id_user_id_fk\",\n          \"tableFrom\": \"session_temp\",\n          \"columnsFrom\": [\n            \"user_id\"\n          ],\n          \"tableTo\": \"user\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"session_temp_token_unique\": {\n          \"name\": \"session_temp_token_unique\",\n          \"columns\": [\n            \"token\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.ssh-key\": {\n      \"name\": \"ssh-key\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"sshKeyId\": {\n          \"name\": \"sshKeyId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"privateKey\": {\n          \"name\": \"privateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"publicKey\": {\n          \"name\": \"publicKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"description\": {\n          \"name\": \"description\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"lastUsedAt\": {\n          \"name\": \"lastUsedAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"organizationId\": {\n          \"name\": \"organizationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"ssh-key_organizationId_organization_id_fk\": {\n          \"name\": \"ssh-key_organizationId_organization_id_fk\",\n          \"tableFrom\": \"ssh-key\",\n          \"columnsFrom\": [\n            \"organizationId\"\n          ],\n          \"tableTo\": \"organization\",\n          \"columnsTo\": [\n            \"id\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.user\": {\n      \"name\": \"user\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"id\": {\n          \"name\": \"id\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"''\"\n        },\n        \"isRegistered\": {\n          \"name\": \"isRegistered\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"expirationDate\": {\n          \"name\": \"expirationDate\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"created_at\": {\n          \"name\": \"created_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"now()\"\n        },\n        \"two_factor_enabled\": {\n          \"name\": \"two_factor_enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"email\": {\n          \"name\": \"email\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"email_verified\": {\n          \"name\": \"email_verified\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"image\": {\n          \"name\": \"image\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"banned\": {\n          \"name\": \"banned\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_reason\": {\n          \"name\": \"ban_reason\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"ban_expires\": {\n          \"name\": \"ban_expires\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"updated_at\": {\n          \"name\": \"updated_at\",\n          \"type\": \"timestamp\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serverIp\": {\n          \"name\": \"serverIp\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"certificateType\": {\n          \"name\": \"certificateType\",\n          \"type\": \"certificateType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'none'\"\n        },\n        \"https\": {\n          \"name\": \"https\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"host\": {\n          \"name\": \"host\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"letsEncryptEmail\": {\n          \"name\": \"letsEncryptEmail\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"sshPrivateKey\": {\n          \"name\": \"sshPrivateKey\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enableDockerCleanup\": {\n          \"name\": \"enableDockerCleanup\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"logCleanupCron\": {\n          \"name\": \"logCleanupCron\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false,\n          \"default\": \"'0 0 * * *'\"\n        },\n        \"role\": {\n          \"name\": \"role\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'user'\"\n        },\n        \"enablePaidFeatures\": {\n          \"name\": \"enablePaidFeatures\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"allowImpersonation\": {\n          \"name\": \"allowImpersonation\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"metricsConfig\": {\n          \"name\": \"metricsConfig\",\n          \"type\": \"jsonb\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'{\\\"server\\\":{\\\"type\\\":\\\"Dokploy\\\",\\\"refreshRate\\\":60,\\\"port\\\":4500,\\\"token\\\":\\\"\\\",\\\"retentionDays\\\":2,\\\"cronJob\\\":\\\"\\\",\\\"urlCallback\\\":\\\"\\\",\\\"thresholds\\\":{\\\"cpu\\\":0,\\\"memory\\\":0}},\\\"containers\\\":{\\\"refreshRate\\\":60,\\\"services\\\":{\\\"include\\\":[],\\\"exclude\\\":[]}}}'::jsonb\"\n        },\n        \"cleanupCacheApplications\": {\n          \"name\": \"cleanupCacheApplications\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnPreviews\": {\n          \"name\": \"cleanupCacheOnPreviews\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cleanupCacheOnCompose\": {\n          \"name\": \"cleanupCacheOnCompose\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"stripeCustomerId\": {\n          \"name\": \"stripeCustomerId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"stripeSubscriptionId\": {\n          \"name\": \"stripeSubscriptionId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"serversQuantity\": {\n          \"name\": \"serversQuantity\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": 0\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {},\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {\n        \"user_email_unique\": {\n          \"name\": \"user_email_unique\",\n          \"columns\": [\n            \"email\"\n          ],\n          \"nullsNotDistinct\": false\n        }\n      },\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    },\n    \"public.volume_backup\": {\n      \"name\": \"volume_backup\",\n      \"schema\": \"\",\n      \"columns\": {\n        \"volumeBackupId\": {\n          \"name\": \"volumeBackupId\",\n          \"type\": \"text\",\n          \"primaryKey\": true,\n          \"notNull\": true\n        },\n        \"name\": {\n          \"name\": \"name\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"volumeName\": {\n          \"name\": \"volumeName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"prefix\": {\n          \"name\": \"prefix\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceType\": {\n          \"name\": \"serviceType\",\n          \"type\": \"serviceType\",\n          \"typeSchema\": \"public\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": \"'application'\"\n        },\n        \"appName\": {\n          \"name\": \"appName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"serviceName\": {\n          \"name\": \"serviceName\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"turnOff\": {\n          \"name\": \"turnOff\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": true,\n          \"default\": false\n        },\n        \"cronExpression\": {\n          \"name\": \"cronExpression\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"keepLatestCount\": {\n          \"name\": \"keepLatestCount\",\n          \"type\": \"integer\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"enabled\": {\n          \"name\": \"enabled\",\n          \"type\": \"boolean\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"applicationId\": {\n          \"name\": \"applicationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"postgresId\": {\n          \"name\": \"postgresId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mariadbId\": {\n          \"name\": \"mariadbId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mongoId\": {\n          \"name\": \"mongoId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"mysqlId\": {\n          \"name\": \"mysqlId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"redisId\": {\n          \"name\": \"redisId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"composeId\": {\n          \"name\": \"composeId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": false\n        },\n        \"createdAt\": {\n          \"name\": \"createdAt\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        },\n        \"destinationId\": {\n          \"name\": \"destinationId\",\n          \"type\": \"text\",\n          \"primaryKey\": false,\n          \"notNull\": true\n        }\n      },\n      \"indexes\": {},\n      \"foreignKeys\": {\n        \"volume_backup_applicationId_application_applicationId_fk\": {\n          \"name\": \"volume_backup_applicationId_application_applicationId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"columnsFrom\": [\n            \"applicationId\"\n          ],\n          \"tableTo\": \"application\",\n          \"columnsTo\": [\n            \"applicationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"volume_backup_postgresId_postgres_postgresId_fk\": {\n          \"name\": \"volume_backup_postgresId_postgres_postgresId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"columnsFrom\": [\n            \"postgresId\"\n          ],\n          \"tableTo\": \"postgres\",\n          \"columnsTo\": [\n            \"postgresId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"volume_backup_mariadbId_mariadb_mariadbId_fk\": {\n          \"name\": \"volume_backup_mariadbId_mariadb_mariadbId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"columnsFrom\": [\n            \"mariadbId\"\n          ],\n          \"tableTo\": \"mariadb\",\n          \"columnsTo\": [\n            \"mariadbId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"volume_backup_mongoId_mongo_mongoId_fk\": {\n          \"name\": \"volume_backup_mongoId_mongo_mongoId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"columnsFrom\": [\n            \"mongoId\"\n          ],\n          \"tableTo\": \"mongo\",\n          \"columnsTo\": [\n            \"mongoId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"volume_backup_mysqlId_mysql_mysqlId_fk\": {\n          \"name\": \"volume_backup_mysqlId_mysql_mysqlId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"columnsFrom\": [\n            \"mysqlId\"\n          ],\n          \"tableTo\": \"mysql\",\n          \"columnsTo\": [\n            \"mysqlId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"volume_backup_redisId_redis_redisId_fk\": {\n          \"name\": \"volume_backup_redisId_redis_redisId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"columnsFrom\": [\n            \"redisId\"\n          ],\n          \"tableTo\": \"redis\",\n          \"columnsTo\": [\n            \"redisId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"volume_backup_composeId_compose_composeId_fk\": {\n          \"name\": \"volume_backup_composeId_compose_composeId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"columnsFrom\": [\n            \"composeId\"\n          ],\n          \"tableTo\": \"compose\",\n          \"columnsTo\": [\n            \"composeId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        },\n        \"volume_backup_destinationId_destination_destinationId_fk\": {\n          \"name\": \"volume_backup_destinationId_destination_destinationId_fk\",\n          \"tableFrom\": \"volume_backup\",\n          \"columnsFrom\": [\n            \"destinationId\"\n          ],\n          \"tableTo\": \"destination\",\n          \"columnsTo\": [\n            \"destinationId\"\n          ],\n          \"onUpdate\": \"no action\",\n          \"onDelete\": \"cascade\"\n        }\n      },\n      \"compositePrimaryKeys\": {},\n      \"uniqueConstraints\": {},\n      \"policies\": {},\n      \"checkConstraints\": {},\n      \"isRLSEnabled\": false\n    }\n  },\n  \"enums\": {\n    \"public.buildType\": {\n      \"name\": \"buildType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"dockerfile\",\n        \"heroku_buildpacks\",\n        \"paketo_buildpacks\",\n        \"nixpacks\",\n        \"static\",\n        \"railpack\"\n      ]\n    },\n    \"public.sourceType\": {\n      \"name\": \"sourceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker\",\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"drop\"\n      ]\n    },\n    \"public.backupType\": {\n      \"name\": \"backupType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"database\",\n        \"compose\"\n      ]\n    },\n    \"public.databaseType\": {\n      \"name\": \"databaseType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"postgres\",\n        \"mariadb\",\n        \"mysql\",\n        \"mongo\",\n        \"web-server\"\n      ]\n    },\n    \"public.composeType\": {\n      \"name\": \"composeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"docker-compose\",\n        \"stack\"\n      ]\n    },\n    \"public.sourceTypeCompose\": {\n      \"name\": \"sourceTypeCompose\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"git\",\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\",\n        \"raw\"\n      ]\n    },\n    \"public.deploymentStatus\": {\n      \"name\": \"deploymentStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"running\",\n        \"done\",\n        \"error\",\n        \"cancelled\"\n      ]\n    },\n    \"public.domainType\": {\n      \"name\": \"domainType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"compose\",\n        \"application\",\n        \"preview\"\n      ]\n    },\n    \"public.gitProviderType\": {\n      \"name\": \"gitProviderType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"github\",\n        \"gitlab\",\n        \"bitbucket\",\n        \"gitea\"\n      ]\n    },\n    \"public.mountType\": {\n      \"name\": \"mountType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bind\",\n        \"volume\",\n        \"file\"\n      ]\n    },\n    \"public.serviceType\": {\n      \"name\": \"serviceType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"postgres\",\n        \"mysql\",\n        \"mariadb\",\n        \"mongo\",\n        \"redis\",\n        \"compose\"\n      ]\n    },\n    \"public.notificationType\": {\n      \"name\": \"notificationType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"slack\",\n        \"telegram\",\n        \"discord\",\n        \"email\",\n        \"gotify\",\n        \"ntfy\",\n        \"lark\"\n      ]\n    },\n    \"public.protocolType\": {\n      \"name\": \"protocolType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"tcp\",\n        \"udp\"\n      ]\n    },\n    \"public.publishModeType\": {\n      \"name\": \"publishModeType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"ingress\",\n        \"host\"\n      ]\n    },\n    \"public.RegistryType\": {\n      \"name\": \"RegistryType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"selfHosted\",\n        \"cloud\"\n      ]\n    },\n    \"public.scheduleType\": {\n      \"name\": \"scheduleType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"application\",\n        \"compose\",\n        \"server\",\n        \"dokploy-server\"\n      ]\n    },\n    \"public.shellType\": {\n      \"name\": \"shellType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"bash\",\n        \"sh\"\n      ]\n    },\n    \"public.serverStatus\": {\n      \"name\": \"serverStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"active\",\n        \"inactive\"\n      ]\n    },\n    \"public.applicationStatus\": {\n      \"name\": \"applicationStatus\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"idle\",\n        \"running\",\n        \"done\",\n        \"error\"\n      ]\n    },\n    \"public.certificateType\": {\n      \"name\": \"certificateType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"letsencrypt\",\n        \"none\",\n        \"custom\"\n      ]\n    },\n    \"public.triggerType\": {\n      \"name\": \"triggerType\",\n      \"schema\": \"public\",\n      \"values\": [\n        \"push\",\n        \"tag\"\n      ]\n    }\n  },\n  \"schemas\": {},\n  \"views\": {},\n  \"sequences\": {},\n  \"roles\": {},\n  \"policies\": {},\n  \"_meta\": {\n    \"columns\": {},\n    \"schemas\": {},\n    \"tables\": {}\n  }\n}"
  },
  {
    "path": "apps/dokploy/templates/templates.ts",
    "content": ""
  }
]